Documente Academic
Documente Profesional
Documente Cultură
Process
an instance of a program in execution
Program
consists of only 3 statements
can either be
I/O bound
CPU bound
Figure 3.2
Process Scheduler
3 Types of schedulers
Long-term scheduler (job / admission)
Short-term scheduler (cpu)
Medium-term scheduler (Midterm)
OS Scheduler
Long-term Scheduler
Decides which of the new processes
are added to the pool of processes
ready for execution,
and determines which of the
processes is to be released or
terminated
Medium-term Scheduler
Short-term Scheduler
Decides as to which of the available
processes will be allotted the
processor and for how long
Process Scheduling
CPU Scheduling
sequence or order of process
execution as they are allotted the
processor.
CPU Scheduling Algorithm
The many ways of allotting the
processor to a specific job or process
Preemptive algorithm
Problem 1
Job
Priority
J1
13
J2
J3
J4
15
J5
17
Priority algorithm
Round Robin
Problem 2
Process
A
B
C
D
E
Arrival
Time
0
6
6
8
10
Burst
Time
4
8
3
9
6
Priority
3
2
4
1
5
Problem 4
Process
A
B
C
D
E
Arrival
Time
0
0
2
3
10
Burst
Time
15
7
4
7
10
Priority
5
4
3
2
1
Problem 5
Process
A
B
C
D
E
Arrival
Time
0
0
2
3
10
Burst
Time
15
7
4
7
10
Priority
5
4
3
2
1
Problem 6
Process
A
B
C
D
E
Arrival
Time
0
7
5
2
3
Burst
Time
10
3
8
4
9
Priority
4
1
2
1
3
Problem 7
Job
Arrival Time
Burst Time
Priority
11
18
35
15
14
13
26
11
30
PROBLEM 8
Q0 LOW SJF
Q1 HIGH FCFS
Arrival
Queue
Time
Level
P1
Q0
P2
Q1
P3
Q0
P4
Q1
P5
Q0
P6
Q1
Process
Burst Time
Problem 9
LEVEL 0 RR Q= 2
LEVEL 1 RR Q= 4
LEVEL 2 SJF
Process
A
B
C
D
E
F
G
Arrival
Time
0
6
18
35
6
14
26
Burst Time
11
5
1
8
16
13
10