Os As-Ii
Os As-Ii
Os As-Ii
OPERATING SYSTEMS
UNIT-II
2 | Page
OPERATING SYSTEMS
3 | Page
OPERATING SYSTEMS
4 | Page
5 | Page
6 | Page
The process could issue an I/O request and then be placed in an I/O
queue.
The process could be removed forcibly from the CPU, as the result
of an interrupt and be put back in the ready queue.
OPERATING SYSTEMS
7 | Page
8 | Page
OPERATING SYSTEMS
9 | Page
queue. The CPU scheduler picks the first process from the ready queue,
sets a timer to interrupt after 1 time quantum, and dispatches the process.
If the process is having CPU burst of less than 1 time quantum, the
process will release the CPU voluntarily. The scheduler will then
proceed to the next process in the ready queue. If the CPU burst is
longer than 1 time quantum times will go off and will cause an interrupt
to the OS. A context switch will be executed and the processes will be
put at the tail of the ready queue. The CPU schedulers will then select
the next process in the ready queue. The average waiting time is very
long.
Eg.
10 | P a g e
If the processes arrive in the order P1, P2, P3 and served in FCFS order,
we get the result in the following Gantt chart
OPERATING SYSTEMS
11 | P a g e
OPERATING SYSTEMS
12 | P a g e
Draw Gantt chart and find the average waiting time using SJF
scheduling?
SJF: Shortest job first come
Non-preemptive
13 | P a g e
Quantum time = 3 ms
14 | P a g e
15 | P a g e
OPERATING SYSTEMS