Group – 9
Presented by - 1. Siddhartha Pande
2. Pratik Bakshi
3. Sudeep Banerjee
4. Punit Beriwal
5. Soupal Kumar Dey
 To design an algorithm that improves upon the
waiting time and the turnaround time of Round
Robin Cpu Scheduling keeping the essence of
it.
 Scheduling is a key concept in computer multitasking
,multiprocessing operating system and real-time
operating system designs. It refers to the way processes
are assigned to run on the available CPUs, since there are
typically many more processes running than there are
available CPUs. This assignment is carried out by
softwares known as a scheduler and dispatcher.
 The scheduler is concerned mainly with:
 CPU Utilization - to keep the CPU as busy as possible.
 Throughput - number of processes that complete their
execution per time unit.
 Turnaround - total time between submission of a
process and its completion.
 Waiting time - amount of time a process has been
waiting in the ready queue.
 Response time - amount of time it takes from when a
request was submitted until the first response is
produced.
 Fairness - Equal CPU time to each thread.
 Max CPU utilization
 Max throughput
 Min turnaround time
 Min waiting time
 Min response time
 First Come First Served(FCFS)
 Shortest Job First(SJF)
 Priority Scheduling
 Round Robin Scheduling(RR)
 Multi Level Queue
 Multi Level Feedback Queue
 Timesharing is the technique of scheduling a computer's
time so that they are shared across multiple tasks and
multiple users, with each user having the illusion that his
or her computation is going on continuously.
 Multitasking, in an operating system, is allowing a user to
perform more than one computer task (such as the
operation of an application program) at a time.
 Microsoft Windows 2000, IBM's OS/390, and Linux are
examples of operating systems that can do multitasking
(almost all of today's operating systems can).
 Time sharing systems implement the concept of
multitasking.
 It is of two types:
 1.Co-operative timesharing/multitasking .
 2.Pre-emptive timesharing/multitasking.
 1.Round Robin Scheduling.
 2.Multi Level Feedback Queue
 Round-robin (RR) is one of the simplest scheduling
algorithms for processes in an operating system ,which
assigns time slices to each process in equal portions and
in circular order, handling all processes without priority
(also known as cyclic executive). Round-robin scheduling
is both simple and easy to implement, and starvation-
free.
 Each process gets a small unit of CPU time (time quantum), usually
10-100 milliseconds. After this time has elapsed, the process is
preempted and added to the end of the ready queue.
 If there are n processes in the ready queue and the time quantum is q,
then each process gets 1/n of the CPU time in chunks of at most q
time units at once. No process waits more than (n-1)q time units.
 Performance
 q large  FIFO
 q small  High overhead: Must be large with respect to context
switch, otherwise overhead is too high.
 The main drawback of Round Robin algorithm
lies in the absence of taking into consideration
the priorities of the tasks.
 Henceforth we have designed an algorithm based
on it that provides us with an improved
efficiency.
 Each task/process can be assigned a priority ranging from 1 to
5 (5 being the highest and 1 being the lowest priority assigned
) in that order.
 Processes are grouped according to their priorities in queues
.(thus there being 5 queues) and processing starts from the
highest priority task available.
 Each queue can consist of a maximum of 10 processes with the
time quantum being 10 ms.
 Queues are processed according to their priority.(ie priority 5
queue is processed first , then 4 and so on …)
 Priority 5 queue is processed 2 times and then control
switches to the following queues which are all processed
single time.
Priority 5 Priority 4 Priority 3 Priority 2 Priority 1
P1 P2 P3 P4 P5 P6 P7 P8 P9 P10
5 4 5 4 3 3 2 1 1 1
P1 P3 P7 p11 p17 p23 p27 p54 p89
QUEUE FOR PRIORITY 5
TIME QUANTUM=10ms
PRIORITISED QUEUES IN ROUND ROBIN
READY QUEUE
P1 P2 P3 P4 P5 P6 P7 P8 P9 P10
1 10 18 20 6 5 4 18 6 10
5 5 2 1 3 4 4 1 5 2
P1 P2 P7
0 1 11
P6 P7
17 22
P5
26
P3 P10 P3
32 42 52
P4 P8 P4 P8
60 70 80 90 98
PROCESS
BURST TIME
ms
PRIORITY
AVERAGE WAITING TIME=(0+1+11+17+22+26+42+70+80+42)/10
= 31.1 ms
AVERAGE TURN AROUND TIME=(1+11+17+22+26+32+52+60+90+98)/10
=40.9 ms
0
10
20
30
40
50
60
Average
waiting time
Average
TurnAround
Time
Round Robin
Our algorithm
P1 P2 P3 P4 P5 P6 P7
5 5 1 4 2 3 1
10 15 6 8 7 12 9
2 5 3 4 8 10 12
PROCESS
PRIORITY
BURSTTIME ms
ARRIVAL TIME
ms
ROUND ROBIN SCHEDULING
ALGORITHM
OUR ALGORITHM
AVERAGE WAITING TIME
= 29.14 ms
AVERAGE WAITING TIME
=27.42 ms
AVERAGE TURN AROUND
TIME =39 ms
AVERAGE TURN AROUND
TIME =37.14 ms
0
5
10
15
20
25
30
35
40
45
Average
waiting time
Average turn
around time
Round robin
Our algorithm
1. When we have processes that have mixed priorities our algorithm
gives better results compared to Round Robin.
2. When most of the processes are high priority processes then
the efficiency of our algorithm turns out to be even better.
3. When most of the processes are low priority then efficiency does
not differ much from Round Robin.
4. When all the processes have the same priority then our algorithm
simply reduces to Round Robin Scheduling Algorithm.
 The ratio of no of processing times of priority queue 5 to that
of priority queue 4 is p:q(current ratio being 2:1).
 Apposite time quantum.
 Developing a function for priority for tasks where priority of a
task=priority given by user + time function(time
elapsed).Processes can be shifted to a higher queue as their
priority increases.
 We hope that by implementing the above mentioned things we
get a further improved efficiency.
Cpu scheduling algorithm on windows

Cpu scheduling algorithm on windows

  • 1.
    Group – 9 Presentedby - 1. Siddhartha Pande 2. Pratik Bakshi 3. Sudeep Banerjee 4. Punit Beriwal 5. Soupal Kumar Dey
  • 2.
     To designan algorithm that improves upon the waiting time and the turnaround time of Round Robin Cpu Scheduling keeping the essence of it.
  • 3.
     Scheduling isa key concept in computer multitasking ,multiprocessing operating system and real-time operating system designs. It refers to the way processes are assigned to run on the available CPUs, since there are typically many more processes running than there are available CPUs. This assignment is carried out by softwares known as a scheduler and dispatcher.
  • 4.
     The scheduleris concerned mainly with:  CPU Utilization - to keep the CPU as busy as possible.  Throughput - number of processes that complete their execution per time unit.  Turnaround - total time between submission of a process and its completion.  Waiting time - amount of time a process has been waiting in the ready queue.  Response time - amount of time it takes from when a request was submitted until the first response is produced.  Fairness - Equal CPU time to each thread.
  • 5.
     Max CPUutilization  Max throughput  Min turnaround time  Min waiting time  Min response time
  • 6.
     First ComeFirst Served(FCFS)  Shortest Job First(SJF)  Priority Scheduling  Round Robin Scheduling(RR)  Multi Level Queue  Multi Level Feedback Queue
  • 7.
     Timesharing isthe technique of scheduling a computer's time so that they are shared across multiple tasks and multiple users, with each user having the illusion that his or her computation is going on continuously.
  • 9.
     Multitasking, inan operating system, is allowing a user to perform more than one computer task (such as the operation of an application program) at a time.  Microsoft Windows 2000, IBM's OS/390, and Linux are examples of operating systems that can do multitasking (almost all of today's operating systems can).
  • 11.
     Time sharingsystems implement the concept of multitasking.  It is of two types:  1.Co-operative timesharing/multitasking .  2.Pre-emptive timesharing/multitasking.
  • 12.
     1.Round RobinScheduling.  2.Multi Level Feedback Queue
  • 13.
     Round-robin (RR)is one of the simplest scheduling algorithms for processes in an operating system ,which assigns time slices to each process in equal portions and in circular order, handling all processes without priority (also known as cyclic executive). Round-robin scheduling is both simple and easy to implement, and starvation- free.
  • 14.
     Each processgets a small unit of CPU time (time quantum), usually 10-100 milliseconds. After this time has elapsed, the process is preempted and added to the end of the ready queue.  If there are n processes in the ready queue and the time quantum is q, then each process gets 1/n of the CPU time in chunks of at most q time units at once. No process waits more than (n-1)q time units.  Performance  q large  FIFO  q small  High overhead: Must be large with respect to context switch, otherwise overhead is too high.
  • 16.
     The maindrawback of Round Robin algorithm lies in the absence of taking into consideration the priorities of the tasks.  Henceforth we have designed an algorithm based on it that provides us with an improved efficiency.
  • 17.
     Each task/processcan be assigned a priority ranging from 1 to 5 (5 being the highest and 1 being the lowest priority assigned ) in that order.  Processes are grouped according to their priorities in queues .(thus there being 5 queues) and processing starts from the highest priority task available.  Each queue can consist of a maximum of 10 processes with the time quantum being 10 ms.  Queues are processed according to their priority.(ie priority 5 queue is processed first , then 4 and so on …)  Priority 5 queue is processed 2 times and then control switches to the following queues which are all processed single time.
  • 18.
    Priority 5 Priority4 Priority 3 Priority 2 Priority 1 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 5 4 5 4 3 3 2 1 1 1 P1 P3 P7 p11 p17 p23 p27 p54 p89 QUEUE FOR PRIORITY 5 TIME QUANTUM=10ms PRIORITISED QUEUES IN ROUND ROBIN READY QUEUE
  • 19.
    P1 P2 P3P4 P5 P6 P7 P8 P9 P10 1 10 18 20 6 5 4 18 6 10 5 5 2 1 3 4 4 1 5 2 P1 P2 P7 0 1 11 P6 P7 17 22 P5 26 P3 P10 P3 32 42 52 P4 P8 P4 P8 60 70 80 90 98 PROCESS BURST TIME ms PRIORITY AVERAGE WAITING TIME=(0+1+11+17+22+26+42+70+80+42)/10 = 31.1 ms AVERAGE TURN AROUND TIME=(1+11+17+22+26+32+52+60+90+98)/10 =40.9 ms
  • 20.
  • 21.
    P1 P2 P3P4 P5 P6 P7 5 5 1 4 2 3 1 10 15 6 8 7 12 9 2 5 3 4 8 10 12 PROCESS PRIORITY BURSTTIME ms ARRIVAL TIME ms ROUND ROBIN SCHEDULING ALGORITHM OUR ALGORITHM AVERAGE WAITING TIME = 29.14 ms AVERAGE WAITING TIME =27.42 ms AVERAGE TURN AROUND TIME =39 ms AVERAGE TURN AROUND TIME =37.14 ms
  • 22.
  • 23.
    1. When wehave processes that have mixed priorities our algorithm gives better results compared to Round Robin. 2. When most of the processes are high priority processes then the efficiency of our algorithm turns out to be even better. 3. When most of the processes are low priority then efficiency does not differ much from Round Robin. 4. When all the processes have the same priority then our algorithm simply reduces to Round Robin Scheduling Algorithm.
  • 24.
     The ratioof no of processing times of priority queue 5 to that of priority queue 4 is p:q(current ratio being 2:1).  Apposite time quantum.  Developing a function for priority for tasks where priority of a task=priority given by user + time function(time elapsed).Processes can be shifted to a higher queue as their priority increases.  We hope that by implementing the above mentioned things we get a further improved efficiency.