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
CHAPTER 1 : INTRODUCTION
1.1 BACKGROUND
1.2 AIM
1.3 OBJECTIVE
1.4 STATEMENT OF PROBLEM
1.5 PURPOSE OF THE DISSERTATION
1.6 SIGNIFICANT OF THE DISSERTATION
1.7 RESEARCH QUESTION
1.8 SUMMARY
1.9 DISSERTATION OUTLINE
CHAPTER 2 : LITERATURE REVIEW AND SURVEY
2.1 OVERVIEW
2.2 SUMMARY
CHAPTER 3 : RESEARCH METHODOLOGY
3.1 INTRODUCTION
3.2 QUANTITATIVE RESEARCH
3.3 OBJECTIVE OF RESEARCH
3.4 RESEARCH ANALYSIS
3.5 RESEARCH QUESTIONS
3.6 RESEARCH DESIGN
3.6.1 Research Approach
3.6.2 Sampling Plan
3.6.2.1 Simple Random Sampling
3.6.3 Simulation
3.6.3.1 The Simulation Design: Problem Definition
3.6.3.2 Identifying Variables Related to the Decisions, Performance and the Decision Rules
3.6.3.3 Construction of a Simulation Model
3.6.3.4 Relating Random numbers to the variability in the simulation
3.6.3.5 Validation of the model
3.6.3.6 Appropriate experimental design
3.6.3.7 Run the simulation
3.6.3.8 Examination of the data and making conclusions
3.6.3.9 Simulation advantages
3.6.3.10 Limitations of Simulation
3.7 DESIGN QUESTIONNAIRE
3.8 DATA COLLECTION
3.9 SECONDARY DATA COLLECTION
CHAPTER 4 : FINDINGS AND ANALYSIS
4.1 DATA PRESENTATION
4.1.1 Illustration
4.1.2 Illustration of the simulation program functions
4.1.3 Simulation Analysis
4.1.3.1 Identifying the problem
4.1.3.2 Identifying variables related to the decisions, performance and the decision rules
4.1.3.3 Constructing a simulation model
4.1.3.4 Validate the model
4.1.3.5 Specify the values of decision variables to be tested
4.1.3.6 Run the simulation
4.1.3.7 Examine the results, make a conclusion and take the best course of action
CHAPTER 5 : CONCLUSIONS
5.1 SUMMARY
5.2 CONCLUSIONS
5.3 DISCUSSION
5.4 RECOMMENDATIONS
Research Objectives and Focus
The primary objective of this dissertation is to simulate a system to better understand CPU scheduling, specifically focusing on the impact of the Shortest Job First (SJF) algorithm on performance and efficiency in a multiprogramming environment, and to determine whether preemptive or non-preemptive approaches provide optimal system throughput and utilization.
- Comparison of Preemptive vs. Non-preemptive Shortest Job First (SJF) scheduling algorithms.
- Simulation of processor scheduling processes using the C programming language in a DOS environment.
- Measurement of scheduling efficiency metrics including CPU utilization, throughput, turnaround time, waiting time, and response time.
- Development of a simulation model to analyze the effects of different scheduling criteria on system performance.
- Investigation of processor resource sharing and fair allocation in multitasking environments.
Excerpt from the Book
4.1.1 Illustration
The algorithms used in the program can be illustrated mathematically as shown below:
a) Shortest Job First with Non-preemption (for simultaneous process arrivals)
Example
Process Arrival CPU Burst time
A 0 6
B 0 8
C 0 7
D 0 3
Gantt chart
D A C B
0 3 9 16 24
Average waiting time: (0+3+9+16) / 4 = 7.00 millisecond
Process D having the shortest burst time will be allocated the CPU first then followed by A then C and lastly B which has the longest burst time. This scheme will ensure fairness since the processes arrive at the same time and hence the shorter ones need to be given a priority over long jobs.
Summary of Chapters
CHAPTER 1 : INTRODUCTION: This chapter provides the background, aims, and objectives of the dissertation, highlighting the importance of efficient CPU scheduling in multitasking environments.
CHAPTER 2 : LITERATURE REVIEW AND SURVEY: This chapter discusses previous research on CPU scheduling, specifically examining the Shortest Job First (SJF) algorithm and various operating system concepts.
CHAPTER 3 : RESEARCH METHODOLOGY: This chapter details the quantitative research approach and the development of the simulation model used to evaluate SJF preemptive and non-preemptive methods.
CHAPTER 4 : FINDINGS AND ANALYSIS: This chapter presents the results of the simulation, analyzing how different scheduling criteria impact throughput, utilization, and waiting times.
CHAPTER 5 : CONCLUSIONS: This chapter draws final conclusions based on the research findings, confirming the optimality of the SJF algorithm and providing recommendations for future system development.
Keywords
CPU Scheduling, Shortest Job First, Preemptive, Non-preemptive, Simulation, Operating System, Multiprogramming, Throughput, CPU Utilization, Waiting Time, Turnaround Time, C Programming, Algorithm Efficiency, Process Management, Resource Allocation
Frequently Asked Questions
What is the core focus of this research?
The research focuses on the simulation and performance analysis of the Shortest Job First (SJF) scheduling algorithm, specifically evaluating the differences between preemptive and non-preemptive methods in a multiprogramming operating system environment.
What are the primary fields of study involved?
The work primarily involves computer operating systems, processor scheduling techniques, simulation modeling, and performance evaluation metrics.
What is the main goal of this dissertation?
The aim is to achieve a better insight into how CPU scheduling impacts system performance and to demonstrate how SJF algorithms can optimize resource sharing and fair process allocation.
Which scientific method is applied?
The study utilizes a quantitative research approach, specifically employing computer-based modeling and discrete simulation to measure and compare system performance metrics.
What is covered in the main body of the work?
The main body covers the literature review of existing scheduling algorithms, the detailed methodology of the simulation model, and the subsequent data presentation and analysis of findings.
Which keywords define this work?
Key terms include CPU scheduling, Shortest Job First, simulation, preemptive, non-preemptive, throughput, CPU utilization, and system performance.
How is the simulation model validated?
The model is validated by comparing its performance outcomes against real-world theoretical calculations, ensuring the logic and assumptions made in the simulation are consistent and accurate.
Why is the SJF algorithm considered optimal in this study?
SJF is identified as optimal because it provides the shortest average waiting time for batches of processes, effectively minimizing delays compared to other algorithms.
How does the choice between preemptive and non-preemptive scheduling impact performance?
The simulation demonstrates that while non-preemptive SJF provides fairness by executing processes to completion, preemptive SJF can be more effective in reducing waiting times for urgent processes, though it may risk starvation for longer jobs.
What programming language was used for the simulation?
The simulation system was developed and implemented using the C programming language within a DOS-based environment.
- Quote paper
- bernard lampard (Author), 2011, Program scheduling and simulation in an operating system environment, Munich, GRIN Verlag, https://www.grin.com/document/267035