0% found this document useful (0 votes)
2K views

What Is A Process Scheduler? State The Characteristics of A Good Process Scheduler? Which Criteria Affect The Schedulers Performance?

A process scheduler determines the order in which processes are executed on the CPU. A good scheduler aims to maximize CPU utilization, throughput, and fairness while minimizing response time, turnaround time, and waiting time. The performance of a scheduler depends on these criteria. Shortest Remaining Time (SRT) is a preemptive scheduler that selects the process with the shortest estimated remaining running time to run next. This can improve average turnaround time but may preempt nearly-completed processes.

Uploaded by

partha dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

What Is A Process Scheduler? State The Characteristics of A Good Process Scheduler? Which Criteria Affect The Schedulers Performance?

A process scheduler determines the order in which processes are executed on the CPU. A good scheduler aims to maximize CPU utilization, throughput, and fairness while minimizing response time, turnaround time, and waiting time. The performance of a scheduler depends on these criteria. Shortest Remaining Time (SRT) is a preemptive scheduler that selects the process with the shortest estimated remaining running time to run next. This can improve average turnaround time but may preempt nearly-completed processes.

Uploaded by

partha dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

15. ​ ​What is a process scheduler?

State the characteristics of a good process


scheduler? Which criteria affect the schedulers performance?

Scheduling can be defined as a set of policies and mechanisms which controls the
order in which the work to be done is completed. The scheduling program which is
a system software concerned with scheduling is called the scheduler and the
algorithm it uses is called the scheduling algorithm.

Various criteria or characteristics that help in designing a good scheduling


algorithm are:

1. CPU Utilization − A scheduling algorithm should be designed so that CPU

remains busy as possible. It should make efficient use of CPU.

2. Throughput − Throughput is the amount of work completed in a unit of time. In

other words throughput is the processes executed to number of jobs completed

in a unit of time. The scheduling algorithm must look to maximize the number

of jobs processed per time unit.

3. Response time − Response time is the time taken to start responding to the

request. A scheduler must aim to minimize response time for interactive users.

4. Turnaround time − Turnaround time refers to the time between the moment of

submission of a job/ process and the time of its completion. Thus how long it

takes to execute a process is also an important factor.

5. Waiting time − It is the time a job waits for resource allocation when several

jobs are competing in multiprogramming system. The aim is to minimize the

waiting time.

6. Fairness − A good scheduler should make sure that each process gets its fair

share of the CPU.

16. ​ ​What is Shortest Remaining Time, SRT scheduling?


Shortest Remaining Time, SRT is a preemptive scheduling. In SRT, the process
with smallest runtime to complete (i.e remaining time) is scheduled to run next,
including new arrivals. In SRT, a running process may be preempted by new
process with shorter estimated run time. It keeps track of the elapsed service time
of the running process and handles occasional preemption.

Consider the following 4 jobs


Job Arrival Time Burst Time

1 0 7

2 1 4

3 3 9

4 4 5

The schedule of the SRT is as follows:

Job1 is started at time 0, being only job in queue. Job 2 arrives at time 1. The
remaining time for job 1 is larger (6 time units) than the time required by job2 (4
time units), so job 1 is preempted and job2 is scheduled. The average turnaround
time for the above is:

Job Turn Around Time


1 16-0 = 16

2 5-1 = 4

3 25-3 = 22

4 10-4 = 6

48

The average turnaround time is 48/4=12 time unit.

Advantage
Average turnaround time is less.

Disadvantage
Sometime a running process which is being almost completed is preempted
because a new job with very small runtime arrives. It is not really worth doing.

17. ​ ​What is Highest Response Ratio Next (HRN) Scheduling?


● HRN is non-preemptive scheduling algorithm.

● In Shortest Job First scheduling, priority is given to shortest job, which may

sometimes indefinite blocking of longer job.

● HRN Scheduling is used to correct this disadvantage of SJF.

● For determining priority, not only the job's service time but the waiting time is

also considered.

● In this algorithm, dynamic priorities are used instead of fixed priorities.


● Dynamic priorities in HRN are calculated as

● Priority = (waiting time + service time) / service time.

● So shorter jobs get preference over longer processes because service time

appears in the denominator.

● Longer jobs that have been waiting for long period are also give favorable

treatment because waiting time is considered in numerator.

18. ​ ​What are the different principles which must be considered while selection of
a scheduling algorithm?​ ​Find out which algorithm among FCFS, SJF and Round Robin
with quantum 10, would give the minimum average time for a given workload.

The objective/principle which should be kept in view while selecting a scheduling


policy are the following −

1. Fairness − All processes should be treated the same. No process should suffer

indefinite postponement.

2. Maximize throughput − Attain maximum throughput. The largest possible

number of processes per unit time should be serviced.

3. Predictability − A given job should run in about the same predictable amount of

time and at about the same cost irrespective of the load on the system.

4. Maximum resource usage − The system resources should be kept busy.

Indefinite postponement should be avoided by enforcing priorities.

5. Controlled Time − There should be control over the different times:

1. Response time

2. Turnaround time

3. Waiting time

4. The objective should be to minimize above mentioned times.


19. ​ ​Explain pseudo parallelism? Describe the process model that makes
parallelism easier to deal with.

All modern computers can do many things at the same time. For Example
computer can be reading from a disk and printing on a printer while running a user
program. In a multiprogramming system, the CPU switches from program to
program, running each program for a fraction of second.

Although the CPU is running only one program at any instant of time. As CPU
speed is very high so it can work on several programs in a second. It gives user an
illusion of parallelism i.e. several processes are being processed at the same time.
This rapid switching back and forth of the CPU between programs gives the illusion
of parallelism and is termed as pseudo parallelism. As it is extremely difficult to
keep track of multiple, parallel activities, to make parallelism easier to deal with,
the operating system designers have evolved a process model.

The process Model


In process model, all the run able software on the computer (including the
operating system) is organized into a sequence of processes. A process is just an
executing program and includes the current values of the program counter,
registers and variables. Each process is considered to have its own virtual CPU.
The real CPU switches back and forth from process to process. In order to track
CPU switches from program to program, it is convenient/easier to think about a
collection/number of processes running in (pseudo) parallel. The rapid switching
back and forth is in reality, multiprogramming.

One Program Counter Process Switch


This figure shows multiprogramming of four programs.

Conceptual model of 4 independent sequential processes.

Only one program is active at any moment. The rate at which processes perform
computation might not be uniform. However usually processes are not affected by
the relative speeds of different processes.

You might also like