Lecture 6 Flashcards

1
Q

CPU - I/O Burst Cycle

A

Process execution consists of a cycle of CPU execution (CPU burst) and I/O wait (I/O burst)

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

I/O-bound processes spend more time in ____ than ____

A

I/O than CPU

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

CPU-bound processes spend more time in ____ than ____

A

CPU than I/O

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

Scheduling Steps (big picture)

A
  • Jobs go to secondary storage (disk)
  • Job scheduler chooses some to go to memory (ready queue)
  • CPU scheduler chooses a job from the queue to run on CPU
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Medium-term scheduler

A
  • May move some partially executed jobs back to disk to enhance performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Long-term scheduler

A
  • Selects which processes should be brought into the ready queue
  • Controls the degree of multiprogramming
  • Invoked infrequently (seconds or even minutes), can be slow
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Long-term scheduler should maintain a good mix of ____ and ____ in in the systems

A

CPU-bound, I/O-bound jobs

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

Short-term scheduler

A
  • Selects which process should be executed next and allocates CPU to it
  • Invoked frequently (milliseconds), must be fast
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

CPU scheduling can be…

A
  • Nonpreemptive

- Preemptive

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

Nonpreemptive scheduling

A

Once a process is allocated the CPU, it does not leave unless:

  • It has to wait for something
  • It terminates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Preemptive scheduling

A

OS can preempt a process from the CPU at anytime

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

Is preemptive or nonpreemptive more difficult to program?

A

Preemptive, because the consistency of data shared between processes and kernel data structures needs to be maintained

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

Dispatcher

A

Once a process has been selected to run on CPU, the dispatcher allocates the CPU to the selected process by switching context, switching to user mode, jumping to the right place in the process and starting it

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

Dispatch Latency

A

Time it takes for the dispatcher to stop one process and start another

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

Scheduling Criteria

A
  • Maximize CPU Utilization
  • Maximize Throughput
  • Minimize Turnaround Time (time from submission to termination)
  • Minimize Waiting Time in ready queue
  • Minimize Response Time from when a request is submitted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly