logo

Assignment On Role Of CPU Scheduling

11 Pages2710 Words228 Views
   

Added on  2019-09-30

Assignment On Role Of CPU Scheduling

   Added on 2019-09-30

ShareRelated Documents
1What is the Role of CPU Scheduling?
Assignment On Role Of CPU Scheduling_1
2What is the Role of CPU Scheduling?Keyword: CPU SchedulingCPU SchedulingCPU scheduling aims to optimize the utilization of CPU. It is a process that allows the system tocarry out multiple processes at once. In case of scheduling, the CPU keeps a process on holdwhile the other one is being executed. This is done due to the unavailability of the resources. Thescheduling ensures that all the process in the CPU are being executed in a timely manner and thesystem is utilizing the full capacity. The CPU scheduling not only makes the system moreefficient but it also increases the speed. When the scheduling is done, the operating systemfocuses 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 processeswhich are ready to complete. The scheduler also allocates the processes to the CPU.Waiting Time in CPUIn computing, almost every program is executed on the basis of some alternating cycle. Whenthese programs are being executed, sometimes waiting for the input and the output becomesinevitable. It occurs due to the differences between the CPU and the memory speed. CPU is ableto execute an instruction in a shorter time. On the contrary, fetching data from memory is a moretime-consuming process. So, the 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 wastedin the process. It makes the processes more time-consuming. Waiting for input and outputs for along time affects the overall efficiency of the system. The scheduling solves the problem bykeeping different programs in the queue.
Assignment On Role Of CPU Scheduling_2
3 When the scheduling system is in operation, CPU becomes able to perform one process whenthe input or output for the others is not available. It prevents the loss of CPU cycles. Besides italso ensures full use of the CPU cycles. The efficiency of a system is affected due to the longwaiting time and loss of CPU cycles. So, enhancing the efficiency of the system becomes quitechallenging. The systems should operate in a fair and efficient manner. It becomes difficult invarying dynamic condition. Additionally, prioritization of the tasks is another factor that needs tobe considered while executing processes in the CPU.Queues Involved in Scheduling There are three types of queues which are involved with the CPU usage are—Job queue: It includes all processes which are being or will be executed by the CPU. In otherwords, the processes which are once submitted to the CPU, reside in the job queue. Theprocesses in the job queue are allocated by the long-term scheduler.Ready queue: It includes the processes which are currently in memory only. These processesremain at the ready state. While being in the queue, the processes wait for execution. Theseprocesses are allocated by the CPU scheduler or the short-term CPU.Device queue: It includes the processes which are waiting for a device. In a CPU, multipleprocesses can wait for the same device. In such situations, I/O completion sends the process backto the ready queue.Components of CPU SchedulingThe scheduling process is done with the help of CPU Burst Cycle, Dispatcher and the scheduler.
Assignment On Role Of CPU Scheduling_3
4CPU Burst Cycle: Every process includes CPU burst cycle and I/O burst cycle. The duration ofCPU burst cycle varies on the basis of the processes.Scheduler: The scheduler operates when the processor becomes idle. It chooses another processwhich is ready to run from the queue. The storage structure of the ready queue plays a key role indetermining which process needs to be executed. The algorithm is another factor that deals withthe selection process. The scheduler works on the basis of these two factors and selects the mostappropriate process accordingly.Dispatcher: Dispatcher is another component that is involved in CPU scheduling. It is a moduleplays a significant part in the scheduling process. It transfers the control of the CPU to the nextprocess which needs to be executed as chosen by the short-term scheduler. The function is donein the following steps—Switching of the processesThe user mode is switched The processor reaches the appropriate location in the user program. The destination, inthis case, is the same location where the program was left last time.The dispatcher requires operating at a faster speed to manage every process switch. The timeneeded by the dispatcher in order to terminate one process and switch to another one is known astheDispatch Latency.Situations When Scheduling is RequiredThe scheduling is needed in different situations. Here are four circumstances when it is necessary
Assignment On Role Of CPU Scheduling_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Role of CPU Scheduling
|4
|707
|374

CPU Scheduling Algorithms and Deadlock Situations in Computer Organization and Architecture
|12
|2773
|238

System for Deterministic Modeling of CPU Scheduling Algorithms
|7
|766
|203

Study of Boot Procedures in Operating Systems
|8
|1058
|129

Comparison of Round-Robin Scheduling and Priority Scheduling
|6
|1275
|405

Operating System: Introduction, Features, User Interfaces
|5
|1017
|65