CPU SCHEDULING SIMULATION

Slides:



Advertisements
Similar presentations
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 2 nd Edition Chapter 6a: CPU Scheduling.
Advertisements

Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Processes and Their Scheduling.
CPU Scheduling Algorithms
Chapter 3: CPU Scheduling
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 5: CPU Scheduling.
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
02/06/2008CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
02/11/2004CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Basic Concepts Maximum CPU utilization.
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
CS212: OPERATING SYSTEM Lecture 3: Process Scheduling 1.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 5: CPU Scheduling.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 7: CPU Scheduling Chapter 5.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 5: CPU Scheduling Basic.
Scanf n, a, b /* I-O wait */ for (i=1; i
Process Control Management
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 6: CPU Scheduling.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
CPU SCHEDULING.
CPU scheduling 6. Schedulers, CPU Scheduling 6.1. Schedulers
Process Scheduling B.Ramamurthy 9/16/2018.
Scheduling (Priority Based)
CPU Scheduling.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Process management Information maintained by OS for process management
CPU Scheduling Basic Concepts Scheduling Criteria
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Exercise Ms.Reema alOraini
Chapter 5: CPU Scheduling
Chapter 5: CPU Scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Process Scheduling B.Ramamurthy 4/19/2019.
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Process Scheduling B.Ramamurthy 5/7/2019.
CPU SCHEDULING CPU SCHEDULING.
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
CPU Scheduling: Basic Concepts
Chapter 6: CPU Scheduling
Prof. Deptii Chaudhari.
CPU Scheduling.
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Presentation transcript:

CPU SCHEDULING SIMULATION Towson University – COS519 – Fall 2018 Members of Group #5:

Outlines: PURPOSE OF THE PROJECT INTRODUCTION TO CPU SCHEDULING ATTRIBUTES OF THE PROCESS SCHEDULING ALGORITHMS IMPLEMENTATION SIMULATION OUTPUTS ANALYSIS OF ALGORITHMS CONCLUSION REFERENCES

Purpose of the Project: To understand how CPU scheduling works in an Operating System. To analyze First In First Out, Shortest Job First and Round Robin Scheduling algorithms that determine the sequence of execution by CPU. To  compare the efficiency of each algorithm by measuring the Burst time, waiting time, and turn-around time.

Introduction to CPU Scheduling CPU scheduling is a process which allows one process to use the CPU while the execution of another process is in waiting state due to unavailability of any resource like I/O etc, thereby making the maximum utilization of CPU.  Whenever the CPU becomes idle, it selects another process from the ready queue to run next. To select this process, scheduling algorithm are used. There are several algorithms to choose from, as well as numerous adjustable parameters for each algorithm. The algorithms implemented are: First In First Out Shortest Job First Round Robin

Attributes of Processes Process ID: a unique value for each process. Wait Time: The duration of time the process waits to utilize CPU is called wait time. It can be calculated by the difference of turn-around time and burst time. Burst Time: The duration of time where the process gets to utilize the CPU is called burst time. Turn Around Time: The turn-around time the sum of waiting time of the process to get into the ready queue, execution on CPU and executing input/output. Arrival Time: It can be given as the time at which the process arrives in the ready queue.

scheduling algorithms used First-Come, First-Served Allocating the CPU to the process that requests the CPU first. Using a FIFO queue  Average waiting time is more             Process  Burst Time                   P1     24                 P2     3                 P3       3  Average waiting time:  (0 + 24 + 27)/3 = 17 ms Average wait time of ( 0 + 3 + 6 ) / 3 = 3.0 ms                                                                                                                          Fig. Gantt chart for process in the order p2,p3,p1

scheduling algorithms used Shortest-Job-First Scheduling Depends on the length of the next CPU burst of a process. If the next CPU bursts of two processes are the same, FCFS scheduling is used. Two types: Pre-emptive, Non-pre-emptive. Preemptive SJF algorithm will preempt the currently executing process. Non-preemptive SJF algorithm will allow the currently running process to finish its CPU burst.  Non-pre-emptive: consider the following set of processes p1, p2, p3, p4 and their CPU burst given in milliseconds with arrival time as 0 for all the processes.                                 Process    Burst Time                                      P1                   6                                     P2                    8                                     P3                    7                                     P4                    3

scheduling algorithms used Round-Robin Scheduling Round Robin is a preemptive scheduling algorithm.  A small unit of time, called a time quantum  CPU scheduler selects the process from the queue and allocates the CPU to each process for a time interval of one quantum. All the processes in the queue are executed in the cyclic way. Switching Overhead is the main problem.  Fig. Representation of the Round Robin Implementation

Implementation Technical Details: Data Structures: Language: Java Platform: Linux (open source O/S)  Algorithms Used: FIFO, SJF, Round Robin Data Structures: Array – to keep the track of the processes as a queue                 – to keep the track of Burst Time of the processes   – to keep the track of Arrival Time of the processes

CPU scheduling Simulator Output: FIFO Algorithm Result Set

CPU scheduling Simulator Output: SJF Algorithm Result Set

CPU scheduling Simulator Output: RR Algorithm Result Set

Analysis of First In First Out (FIFO) For different burst times, the wait time have variations between the same range     (0 –1600) Wait time is dependent of arrival time, as it increases linearly when the arrival time increment too

Analysis of Shortest Job First (SJF) No correlation between the arrival time and the process waiting time as expected Wait time increase as it does the burst time.

Analysis of Round Robin (RR) For different burst times, the wait time have variations between the same range     (0 –1600) Wait time is dependent of arrival time, as it increases linearly when the arrival time increment too

Analysis summary of the 3 algorithms Variation of the average wait time  as the number of processes completed increase for each  algorithm.

Conclusion FIFO - SJF – RR FIFO : Convey Effect – short process behind long process SJF : Starvation  RR : Overhead             FIFO

REFERENCES Research papers: Books: Websites: Kishor, L., & Goyal, D. (2013). Comparative analysis of various scheduling algorithms. International Journal of Advanced Research in Computer Engineering & Technology (IJARCET), 2(4), pp-1488.  Abhijit A. Rajguru, S. A. (July 2013). A Performance Analysis of Task Scheduling Algorithms using Qualitative Parameters. International Journal of Computer Applications, 33-38.   Books:  Silberschatz, A., Galvin, P., and Gagne, G., "Operating System Concepts," (Sixth Edition), Wiley & Sons, 2002.    Websites:  https://www.studytonight.com/operating-system/shortest-job-first  http://orion.towson.edu/~karne/teaching/projos/procmgmt2.pdf https://www.geeksforgeeks.org/gate-notes-operating-system-process-scheduling/  https://en.wikipedia.org/wiki/Process_management_(computing)  https://www.tutorialspoint.com/operating_system/os_process_scheduling.htm

Thank You !