CPU scheduling is a technique used by computer operating systems to manage the usage of the computer’s central processing unit. In a multi-programming environment whereby several processes are running on the same processor, it is essential to use scheduling criteria to avoid collisions in the computer’s operations. This will help users in a given information technology oriented firm to share server spaces and resources like printers and file storage spaces. In the multi-tasking environment, a program called CPU scheduler selects one of the ready processes and allocates the processor to it. There are a number of occasions when a new process can or must be chosen to run: When a running process block and changes its state to ‘Blocked’, When a timer for a running process expires, When a waiting process unblocks and changes its state to ‘Ready’, and When a running process terminates and changes its state to ‘Exit’ (Wikipedia, 2013).
Different types of scheduling programs referred to as algorithms can be employed in CPU scheduling instances. Among the most popular scheduling algorithms is Shortest Job First (SJF). SJF gives the processor to the process with the shortest next time allocation known as the burst. If there are processes with similar CPU bursts in the event queue, the scheduler uses First Come First Served algorithm which allocates the first process to arrive in the queue to the processor regardless of its burst time. It operates under the assumption that the length of the next CPU burst of each of the processes in ready queue is known (CPU scheduling, 2013). The SJF algorithm can be used in both pre-emptive and non-preemptive methods. The algorithm can be preemptive or not.
Shortest Job First with preemption uses priority measure to determine the next process to be given the CPU. The processes will be having different CPU bursts and different priority levels allocated to them. The process with the least priority magnitude is always picked next. A process already allocated the processor can be preempted the CPU and allocation done to another process with higher priority when such a process arrives in the queue. SJF with non-preemptive operates in the normal procedure whereby the job with the least CPU burst in the waiting queue is always picked next for allocation of the CPU and the rest of the processes have to wait no matter their urgency.
Based on the introduction above, it is essential to use the right CPU scheduling strategy to help us achieve
Table of Contents
- Abstract
- List of Abbreviations
- List of Tables
- Table 4-1: Relation between CPU burst time and turnaround time.
- Table 4-2: Relation between arrival time and Turnaround Time.
- Table 4-3: Non Preemptive Simulation (Simultaneous Arrival Time).
- Table 4-4: Preemptive Simulation (Simultaneous Arrival Time) ..
- Table 4-5: Preemptive Simulation (Varied Arrival Time).
- Table 4-6: Non Preemptive Simulation (Varied Arrival Time) ..
- List of Appendices
- Appendix 1: SJF Entity Relationship Diagram
- Appendix 2: Integrated Data Flow Diagram
- Appendix 3: Data Flow Diagram - Level 0
- Appendix 4: Data Flow Diagram – Level 1 (Process 1) ..
- Appendix 5: Data Flow Diagram – Level 1 (Process 2).
- Appendix 6: Data Flow Diagram – Level 2 (Input)
- Appendix 7: Data Flow Diagram – Level 2 (Scheduling).
- Appendix 8: Data Flow Diagram – Level 2 (Output).
- Appendix 9: Data Flow Diagram – Level 2 (Process) ..
- Appendix 10: Data Flow Diagram - Level 2 (CPU Time Error Function).
- Appendix 11: Data Flow Diagram - Level 2 (Arrival Time Error Function).
- Appendix 12: Data Flow Diagram – Level 2 (Sort Function).
- Appendix 13: Data Flow Diagram – Level 2 (Repeat Function).
- Appendix 14: Data Flow Diagram – Level 2 ( Choice Function).
- Appendix 15: Data Flow Diagram – Level 2 (Update Function)
- Appendix 16: Data Flow Diagram – Level 3 (Early Value Function).
- Appendix 17: Data Flow Diagram – Level 3 (Check Function)
- Appendix 18: Data Flow Diagram – Level 3 (Print Output Function).
- Appendix 19: Data Flow Diagram – Level 3 (End Function).
- Appendix 20: Data Flow Diagram – Level 4 (Print Title Function)
- Appendix 21: Data Flow Diagram – Level 4 (Print Table Function).
- Appendix 22: Data Flow Diagram – Level 4 (Print Time Function)
- Appendix 23: Structure Chart of SJF
- Appendix 24: Structured Chart of SJF Scheduling Function
- Appendix 25: Structured Chart of SJF Check Function.
- Appendix 26: Structured Chart of SJF Early Value Function
- Appendix 27: Structured Chart of SJF Update Function ...
- Appendix 28: Structured Chart of SJF Input Function ..
- Appendix 29: Structured Chart of SJF Sort Function ...
- Appendix 30: Structured Chart of SJF Repeat Function .
- Appendix 31: Structured Chart of SJF Print Output Function
- Appendix 32: Structured Chart of SJF Print Title Function.
- Appendix 33: Structured Chart of SJF Print Table Function
- Appendix 34: Structured Chart of SJF Print Time Function.
- Appendix 35: Flowchart of int main () Module
- Appendix 36: Flowchart of void welcome (void)
- Appendix 37: Flowchart of void SJF_Scheduling (void).
- Appendix 38: Flowchart of void Input (void)
- Appendix 39: Flowchart of void Arrival_Time_Error (int i)
- Appendix 40: Flowchart of void CPU_Time_Error (int i)
- Appendix 41: Flowchart of void SJF_Sorting (void).
- Appendix 42: Flowchart of void SJF_Update (void)
- Appendix 43: Flowchart of void SJF_Update (void) - Continue
- Appendix 44: Flowchart of void SJF_Choose (void) ..
- Appendix 45: Flowchart of void Early_Value (void).
- Appendix 46: Flowchart of void Early_Value (void) - Continue.
- Appendix 47: Flowchart of void Checking (void) ..
- Appendix 48: Flowchart of void Print_Output (void).
- Appendix 49: Flowchart of void Print_Output (void) - Continue
- CPU scheduling in a multiprogramming environment
- Shortest Job First (SJF) scheduling method
- Preemptive and non-preemptive SJF variations
- Simulation of CPU scheduling processes
- Performance analysis of different scheduling methods
Objectives and Key Themes
This dissertation explores the concept of program scheduling and simulation within an operating system environment, focusing specifically on CPU scheduling in a multiprogramming environment using the Shortest Job First (SJF) method. The work examines both preemptive and non-preemptive variations of the SJF method, highlighting the differences in their implementation and performance. The dissertation utilizes the C programming language within a DOS environment to create a simulation system that visually represents the processes involved in CPU scheduling.Chapter Summaries
Please provide the text of the chapters to create the chapter summaries. Without the content of the chapters, it's impossible to provide summaries.
Keywords
This dissertation focuses on program scheduling and simulation in an operating system environment, specifically using the Shortest Job First (SJF) method for CPU scheduling in a multiprogramming environment. The work examines both preemptive and non-preemptive variants of the SJF method, utilizing C programming within a DOS environment to create a simulation system for visualizing CPU scheduling processes. Key terms include CPU scheduling, multiprogramming, Shortest Job First (SJF), preemptive and non-preemptive scheduling, simulation, C programming, DOS environment, performance analysis.- Quote paper
- bernard lampard (Author), 2011, Program scheduling and simulation in an operating system environment, Munich, GRIN Verlag, https://www.grin.com/document/267035