Scheduling Flashcards

1
Q

Where are multiple jobs managed?

A

memory

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

what kind of alternation takes place with jobs?

A

those waiting to use the CPU and those waiting for IO.

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

the key to multiprogramming is [x]

A

scheduling

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

what does the high level scheduler do?

A

determines which programs are admitted to the system for scheduling

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

the high level scheduler controls the [x x x]

A

degree of multiprogamming

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

In a batch system, where do newly scheduled jobs go and how are they held?

A

routed to disk and held in a queue or waiting line

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

when adding a job, the high level scheduler must take two decisions. what are they?

A

1) scheduler needs to know it can take on one or more processes
2) it needs to decide which jobs to turn into processes

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

how often does the high-level scheduler execute?

A

relatively infrequently.

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

what coarse decision does the scheduler usually make?

A

whether or not to take on a new process

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

what is the short term scheduler also known as

A

dispatcher

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

how often does the short term scheduler run

A

frequently

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

from a high level, what does the short term scheduler decide

A

which job to execute next

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

the status of a process at any point in time is its [x]

A

state

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

what are the five states of a process?

A
new
ready
running
waiting
halted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

define new for a process state

A

the program has been admitted but is not ready to execute. It needs to be moved from the operating system to a ready state.

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

define ready for a process state

A

process is ready to execute and is awaiting access to the processor

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

define running for a process state

A

the process is being executed by the processor

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

define waiting for a process state

A

the process is suspended from execution waiting for some resource, like I/O

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

define halted for a process state

A

the process has terminated and will be destroyed by the operating system. Oooo errrr

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

what must the operating system hold about each process?

A

its state

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

where does the operating system hold the process state information?

A

process control block

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

what eight things are held in the process control block?

A
identifier 
state
priority
program counter
memory pointers
context data
I/O status information
Accounting information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

define identifier for the process control block

A

a unique id associated with a process

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

define state for the process control block

A

the state of the process

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

define priority for process control block

A

relative priority to other processes

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

define program counter for process control block

A

the address of the next instruction in the program to be executed.

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

define memory pointer for process control block

A

the starting and ending location of the process in memory

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

define context data for process control block

A

data present in the registers while the process is executed

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

define I/O status information

A

includes outstanding I/O requests, I/O devices (eg., tape drives) assigned to this process, a list of files assigned to the process, and so on.

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

define accounting information

A

information on processor time and clock time being used

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

when the processor accepts a new job or a request, what does it do?

A

creates a blank process control block

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

when the process block is fully filled in, what happens to the process state?

A

it is moved to ready

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

What happens in an I/O operation?

A

Processor saves current context data and the program for A in A’s process control block.

The operating system may perform some work like initiating I/O stuff.

Short term scheduler decides which process should be executed next.

The operating system instructs processor to restore B’s context data and proceed with B.

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

What is the long-term queue

A

a lost of jobs waiting to use the system

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

What is the short-term queue

A

a queue of processes in the ready state

36
Q

what is the general method for short term scheduling?

A

round robin, giving processes equal time

37
Q

Talk about how jobs move through the system in terms of getting space on the CPU

A

Process request is placed on long-term queue.

When resources become available, a process request becomes a process.

Process then placed in ready state and put on short term queue.

38
Q

Personal computers affected scheduling in two ways. Name them.

A

1) Most programs became single active process.

2) Computers are faster.

39
Q

In addition to picking the right process, the scheduler has to worry about [x] because [y] is expensive

A
x = making efficient use of the CPU
y = process switches are expensive
40
Q

what happens with a process switch?

A

a switch from user mode to kernel mode happens
state of current process must be saved (including registers) in process table
a new process must be selected by running the scheduling algorithm
MMU must be reloaded with memory map of new process
new process is started

41
Q

what does a process switch usually invalidate and what does this do?

A

entire memory cache

usually forces dynamic reloading

42
Q

what is a compute-bound process?

A

a process that spends most of its time computing

43
Q

what is an I/O bound process?

A

a process that spends most of its time waiting for I/O

44
Q

compute-bound process typically have [x] CPU bursts and thus [y] I/O waits

A
x = long
y = infrequent
45
Q

I/O-bound process typically have [x] CPU bursts and thus [y] I/O waits

A
x = short
y = long
46
Q

what is the key factor with I/O-bound and compute-bound?

A

the length of the CPU burst, not the length of the I/O burst.

47
Q

If an I/O bound process wants to run, it should [x]

A

get a chance so it can issue its disk request and keep the disk busy

48
Q

what are the five time slots a scheduler has to make a decision

A

when a new process is created

when a process ends

when a process blocks on I/O and some other process has to be picked

when an I/O interrupt occurs

if a hardware clock provides interrupts, you’d need to schedule at the interrupt

49
Q

what does a nonpreemptive scheduling algorithm do?

A

picks a process to run and then just lets it run until it blocks or until it voluntarily releases

50
Q

what does a preemptive scheduling algorithm do?

A

picks a process and then lets it run for some fixed amount of time

51
Q

what are the three systems to consider in scheduling?

A

batch
interactive
real time

52
Q

what is important about a batch system

A

there are no users waiting at a terminal

53
Q

what algorithms can be run on a batch system. why?

A

both types are fine. fewer process switches == better performance overall.

54
Q

in an interactive environment, [x] is essential

A

preemptive

55
Q

why is preemptive essential in an interactive environment

A

because you don’t want a process hogging the CPU when a user attempts to interact with the device

56
Q

what is the key difference between an interactive and real-time environment?

A

real-time only run programs that are intended to further the application at hand.

interactive are general-purpose and user facing.

57
Q

What is fairness for scheduling?

A

Comparable processes should get comparable service.

58
Q

what is policy enforcement for scheduling?

A

seeing that stated policy is carried out

59
Q

what is balance for scheduling?

A

all parts of the system should be busy

60
Q

batch job scheduling: what is throughput

A

the number of jobs per hour that a system completed

61
Q

batch system: what is turnaround time

A

the average time to complete a batch job

62
Q

batch systems: what is CPU utilisation

A

making sure CPU is busy

63
Q

interactive systems: what is response time

A

time between a command and a result

64
Q

interactive systems: what is proportionality

A

meeting user expectations related to speed

65
Q

real time system: what is meeting deadlines?

A

cannot lose data

think of computer that scrapes a source. it needs to do it otherwise there are failures. imagine GA

66
Q

real time system: what is predictability?

A

avoiding multimedia degredation

67
Q

Name the 3 batch system scheduling algorithms

A

FIFO
Shortest job first
shortest remaining time next

68
Q

how is first come first serve implemented?

A

linked list

blocked process goes to end of queue

69
Q

first come first serve is non or preemptive?

A

non preemptive

70
Q

how is shortest run time implemented?

A

1) assumes run time in advance

2) only optimal when all jobs available

71
Q

shortest run time is non or pre?

A

non preemptive

72
Q

describe shortest remaining time next?

A

preemptive of shortest remaining time.

scheduler always chooses process with shortest remaining time.

means short jobs get priority.

73
Q

describe round robin scheduling

A

process assigned a quantum.

if process exceeds, CPU preempted and process switch occurs. process put to end of queue.

74
Q

describe quantum time decisions

A

too short = too many process switches and low CPU efficiency
too long = poor response to interactive requests.

75
Q

describe priority scheduling

A

each process assigned a priority and the runnable process with the highest priority is allowed to run

76
Q

to prevent high priority processes running forever, what two things might a scheduler do?

A

1) reduce priority of currently running process at clock tick. means if there’s a process that’s higher a process switch will occur.
2) use a quantum and if one uses it up, then process switch to next highest priority process

77
Q

why might a priority scheduler give I/O bound processes CPU immediately?

A

given CPU to let it start it next I/O request, which can be taken care of in parallel with another process computing.

78
Q

which scheduling algorithms risk starvation?

A

shortest process next, shortest remaining time.

79
Q

which scheduling algorithms are high overhead?

A

shortest process next, shortest running time.

80
Q

describe multiple queues and scheduling

A

moving processes down a priority if they exceed their quantum. in swapping out, it would be given an additional quantum.

81
Q

what is the most common scheduling algorithm for threads?

A

round robin and priority scheduling

82
Q

what should you think about with user threads and scheduling?

A

kernel not away of threads. it picks process A. decides to run A1. if quantum exceeds, it’ll block. if it resumes A1 is on again.

83
Q

what is the major difference between switching for user and kernel threads?

A

thread switch with user-level is a bit of machine code.

thread switch at kernel level = full context switch, changing memory map, invalidating cache.

84
Q

why is thread level scheduling good for I/O

A

having a thread block on I/O does not suspend entire process. user thread would.

85
Q

what can user level threads employ that kernel threads cannot?

A

application-specific thread scheduler.

they know what each thread does and can sort optimise accordingly.