Scheduling Flashcards

1
Q

Boot Sequence

A

(1) CPU loads boot program from ROM, (2) the boot program examines and checks the memory configuration, builds a configuration structure describing the hardware, loads the OS kernel and gives it the configuration structure, (3) initializes OS

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

Initializing the OS

A

(1) initialize kernel structures, (2) initialize the state of all hardware devices, (3) creates a number of processes to start operation. (4) if there are user programs, those are run, else it enters the idle loop

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

OS wakes up from…

A

Interrupts, exception, and system calls (traps)

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

Multiprogramming / Concurrency

A

One process running while one or more on I/O to increase system utilization and throughput

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

Context Switch

A

Changing from one process to another

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

What are the steps of a context switch?

A

(1) Process is running, (2) Process is blocked or interrupted, (3) Switch to kernel, (4) OS saves process state to PCB, (5) OS chooses new process to run, (6) OS loads its state from PCB, (7) Process is running

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

When does the kernel run the scheduler?

A

A process switches from running to blocked, a process is created or terminated. an interrupt occurs

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

Non-preemptive System

A

Scheduler runs when a process is blocked, not because of an interrupt

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

Preemptive System

A

OS makes scheduling decisions during interrupts, but requires interrupt to give control back to OS

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

Throughput

A

number of processes completed during a unit of time

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

Turnaround Time

A

length of time to run a process from initialization to termination

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

CPU utilization

A

percentage of time that the CPU is busy

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

Response Time

A

time between issuing a command and getting a result

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

Waiting Time

A

Total amount of time that the process is in the ready queue

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

What are the 5 criteria for comparing scheduling algorithms?

A

Throughput, turnaround time, cpu utilization, response time, and waiting time

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

To maximize throughput you should be…

A

minimizing overhead and efficiently using the system resources (CPU, I/O)

17
Q

The Ideal CPU Scheduler

A

Maximizes CPU utilization and throughput, minimizes response time, waiting time, and turnaround time

18
Q

Shell

A

interactive application-level program that runs other programs on behalf of the user. It performs a sequence of read/evaluate steps and then terminates.

19
Q

Signal

A

a small message that notifies a process than an event of some type as occurred in the system.

20
Q

2 reasons a signal is sent

A

(1) kernel detected a system event or (2) process invoked kill function

21
Q

Pending Signal

A

a sent signal that has not yet been received. There can be at most one of these.

22
Q

Issues with signals

A

(1) pending signals are blocked, (2) pending signals are not queued, (3) system calls can be interrupted

23
Q

Nonlocal jumps

A

user level control that transfers control directly from one function to another. Allows for immediate return from a deeply nested function call. (setjmp will save current environment before jumping)

24
Q

Selecting a time slice for round robin

A
  • too small: throughput suffers because too much time is spent on context switching
  • too big: waiting time suffers and it degenerates to FCFS
25
Q

SJF

A

Shortest Job First. I/O bound jobs will get priority over CPU jobs because its less work.

26
Q

Using past to predict the future

A

The policy becomes /adaptive/. If the process is I/O bound in the past, it is likely to be I/O bound in the future. The scheduler will favor jobs that use relatively little CPU

27
Q

Multi-Level Feedback Queues

A

Highest priority and shortest jobs are at the top level. The time slices increase exponentially at lower levels. This policy can cause starvation. If the context switch comes from an I/O it gets moved up a level.

28
Q

What kinds of systems want what criteria the most?

A

Interactive systems want good response time while batch systems are more about turnaround time.