Detailed Analysis of CPU Scheduling Components and Their Functions

Verified

Added on  2019/09/24

|4
|707
|374
Homework Assignment
AI Summary
This assignment provides a detailed overview of CPU scheduling, explaining its role in optimizing CPU utilization and managing processes within an operating system. It highlights the importance of scheduling in preventing CPU idleness and improving system efficiency. The assignment details the CPU burst cycle, scheduler, and dispatcher as key components of the scheduling process, explaining their functions. It also discusses the concept of waiting time and its impact on system performance, emphasizing how scheduling helps minimize this time and ensure optimal resource allocation. The assignment effectively explains the process of selecting and executing processes, emphasizing the role of the short-term scheduler and the factors that influence its decisions. The assignment also covers the dispatcher's role in transferring CPU control and the concept of Dispatch Latency, which is the time taken by the dispatcher to switch between processes. Overall, the assignment provides a comprehensive understanding of CPU scheduling and its impact on system performance.
Document Page
1
What is the Role of CPU Scheduling?
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2
What is the Role of CPU Scheduling?
Key word: CPU Scheduling
CPU Scheduling
CPU scheduling aims to optimize the utilization of CPU. It is a process that allows the system to
carry out multiple processes at once. In case of scheduling, the CPU keeps a process on hold
while the other one is being executed. This is done due to unavailability of the resources. The
scheduling ensures that all the process in the CPU are being executed in timely manner and the
system is utilizing the full capacity. The CPU scheduling not only makes the system more
efficient but it also increases the speed. When the scheduling is a done, the operating system
focuses on choosing and executing one of the processes available in the ready queue. A short-
term scheduler or CPU scheduler is used to execute the selection process. It selects the processes
which are ready to complete. Scheduler also allocates the processes to the CPU.
Waiting Time in CPU
In computing, almost every program is executed on the basis of some alternating cycle. When
these programs are being executed, sometimes waiting for the input and the output becomes
inevitable. It occurs due to the differences between the CPU and the memory speed. CPU is able
to execute an instruction in shorter time. On the contrary, fetching data from the memory is a
more time-consuming process. So, CPU needs to wait when the memory is fetching the data.
During the time, the CPU remains idle. In other words, the waiting time and the CPU are wasted
in the process. It makes the processes more time-consuming. Waiting for input and outputs for
long time affects the overall efficiency of the system. The scheduling solves the problem by
keeping different programs in the queue.
Document Page
3
When the scheduling system is in operation, CPU becomes able to perform one process when
the input or output for the others is not available. It prevents loss of CPU cycles. Besides it also
ensures full use of the CPU cycles. The efficiency of a system is affected due to the long waiting
time and loss of CPU cycles. So, enhancing the efficiency of the system becomes quite
challenging. The systems should operate in fair and efficient manner. It becomes difficult in the
varying dynamic condition. Additionally, prioritization of the tasks is another factor that needs to
be considered while executing processes in CPU.
Components of CPU Scheduling
The scheduling process is done with help of CPU Burst Cycle, Dispatcher and the scheduler.
CPU Burst Cycle: Every process includes CPU burst cycle and I/O burst cycle. The duration of
CPU burst cycle varies on the basis of the processes.
Scheduler: The scheduler operates when the processor becomes idle. It chooses another process
which is ready to run from the queue. The storage structure of the ready queue plays a key role in
determining which process needs to be executed. The algorithm is another factor that deals with
the selection process. The scheduler works on the basis of these two factors and selects the most
appropriate process accordingly.
Dispatcher: Dispatcher is another component that is involved in the CPU scheduling. It is a
module plays a significant part in the scheduling process. It transfers the control of the CPU to
the next process which needs to be executed as chosen by the short-term scheduler. The function
is done in the following steps—
Switching of the processes
Document Page
4
The user mode is switched
The processor reaches the appropriate location in the user program. The destination in
this case is the same location where the program was left last time.
The dispatcher should be as fast as possible, given that it is invoked during every
process switch. The time taken by the dispatcher to stop one process and start
another process is known as the Dispatch Latency.
chevron_up_icon
1 out of 4
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]