Site Loader

Scheduling
is the technique used to enhance the performance of the CPU. To increase the
CPU utilization and reduced the average waiting time, average turnaround time
and average response time.CPU scheduling algorithm worked on maximize
throughput. I used two CPU scheduling algorithms and combined them in one that
is SJF and round robin. Both can combine and generate new technique that
behaves well effective. In this Technique, the processor is in ready queue in
according to CPU burst length, Shortest burst length is at the top of the
queue. We tend to assume two numbers to represent the burst length of the
largest PCB within the queue and the second one to represent the running time
of all the processes respectively.

 

 A Process control block (PCB) of a process is
often submitted to the system which is connected to the ready queue in
according to the CPU.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

The
proposed algorithm that is executed by the CPU linked to the process from the
top of the queue. Executed Process is expired after a given time quantum, which
is defined by the system. After that, new preemption is as follow:

te
= te + quantum time   

Time
quantum applies to boost the efficiency and minimize the average waiting time
average turnaround time and average waiting and context switching between the
processes.

 

In
that case, five states are in the process which is new, ready, running, block
and complete state. The new state admitted the process and dispatch to the
ready state. The ready queue then moves forwards the process to the running
state. If an interrupt occur on ready state then it will back to the ready
state if the processor requires an I/O device then it moves to the block state
and if the process completed then it moves to the complete state. Block State
complete the requirement for the processor such that I/O and then moved to the
ready queue. Comparison of two numbers is as fellow:

 

If
execution time of a process te is less than the largest burst length of the PCB
to then the preempted process PCB is joined to the tail of the ready queue.
After that, the next process is then dispatched from the top of the ready
queue.

If   te ? to

Then
the Process control block (PCB) of the process with the largest CPU burst
length is to start the execution.

 

In
Preemption, SJF is in the ready queue that’s why shortest job entertained
first. The value of te is reset to 0 and the value of the CPU burst length of
the largest PCB is reset that is lying at the tail of the queue. After that,
the next process is then moving towards from the head of the ready queue.

When
a process has accomplished its task it terminates and deleted from the system.
Then te will be:

te
= te  + time to complete process

Process
and actions are same as a preempted process.

Post Author: admin

x

Hi!
I'm Lewis!

Would you like to get a custom essay? How about receiving a customized one?

Check it out