Lecture 7: CPU Scheduling P1 Flashcards

1
Q

Define: CPU-I/O Burst-Cycle

A

Process execution consists of a cycle of CPU execution and I/O wait time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When does CPU Scheduling decisions occur?

A

1) When a process switches from running to waiting state
2) When a process switches from running to ready state
3) When a process terminates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define Non-preemptive vs preemptive.

A

Preemptive: process relinquishes CPU voluntarily after time interval before it finishes or until it finishes if the time it takes to finish is shorter than the time interval
Non-preemptive: process relinquishes CPU only after it finishes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Are OS-specific processes (tied to OS services for example) allowed to be preempted?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List the Scheduling Evaluation Metrics used to evaluate a scheduling algorithms.

A

1) CPU Utilization
2) Throughput
3) Turnaround Time
4) Waiting Time
5) Response Time
6) Predictability
7) Faireness

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define: CPU Utilization Metric

A

Percentage of time the CPU is not idle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define: Throughput (as a metric for evaluating scheduling algorithms

A

Completed processes per time unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define: Turnaround Time

A

Submission to completion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define: Waiting Time

A

Time spent on the ready queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define: Response Time

A

Response Latency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define: Predictability

A

Variance in any of 6 other metrics used to evaluate scheduling algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define: Fairness

A

Minimize process starvation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

List the Scheduling Algorithms we’ve learned:

A

1) First Come, First Served (FCFS)
2) Last in, First Out (LIFO)
3) Shortest Job First
4) Round Robin (RR)
5) May use priorities to determine who runs next, (dynamic vs. static algorithms)
6) Multilevel Queueing
7) Multilevel Queueing with Feedback
8) Lottery

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe First Come, First Served (FCFS)

A
  • The process that requests the CPU first is allocated to the CPU first.
  • Can calculate average wait time if you know the time duration of the CPU burst for each process
  • shorter processes executing first is better because they can then enter the I/O burst while the next process enters a CPU burst ie. the CPU is never idle. If a long slow process enters CPU burst first, then it will leave for I/O bust, along with the next shorter processes leaving for I/O burst resulting in the CPU sitting idle.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe Last In Last Out (LIFO)

A
  • New process are placed at head of ready queue; improves response time for nerdy created processes.
  • This may lead to CPU starvation for the early processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly