Chapter 2 Processor Management
Chapter 2 Processor Management
Chapter 2 Processor Management
|
concerns with the
management of physical processors, specially, the
assignment of the processor to processes.
are the
job scheduler, the process scheduler and the traffic
controller.
!
It creates the processes, in a non multiprogramming
environment, and it would decide which process is to
receive the processor.
In the multiprogramming environment, it decides which
of the ready processes receive the processor, at what
time, and for how long.
|
It keeps track of the status of the processes. In most
systems it is necessary to synchronize between the
processes and the jobs. The modules of the processor
management usually perform this.
Fig. (1.6) illustrates the domains of the job scheduling,
the process scheduling, and the traffic controller. The job
scheduling can be viewed as a ,
choosing which jobs will be run, while the process
scheduler can be viewed as a
,
assigning processor to the processes associated with
scheduled jobs. The user views his job as a collection of
tasks that he wants the computer system to perform for
him. The user may divide his job into job steps (e.g.
compile, load, execute, etc.) the system creates
processes to do the computation of the job steps.
So, the job scheduling is concerned with the
management of jobs, and the process scheduling is
concerned with the management of the processes.
In the nonmultiprogramming system, no distinction
is made between process and job scheduling, where
only one job is allowed in the system at a time. In
this simple system, the job scheduling chooses one
job to run. Once the job is chosen, a process is
created and assigned to the processor.
For the multiprogramming system, the job
scheduling chooses a small subset of the jobs
submitted and lets them into the system therefore;
the job scheduling creates processes for these jobs
and assign the processes some resources.
The process scheduling decides which of the
processes within the subset will be assigned the
processor at what time, and how long.
!
The job scheduler is the "super" manager, which must do
the following:
Keep track of the status of all jobs. It must note which
jobs are trying to get some service (Hold State) and the
status of all jobs being served (ready state, Running
state, or Wait State).
Choose the policy by which jobs will enter the system
(i.e. go from Hold state to Ready State). This decision
must be based on some characteristics as priority,
resources required, or/and system balance.
Allocate the necessary resources for the scheduled job
by use of memory, device and processor management.
Deallocate these resources when the job is terminated.
"
Once the job scheduler has moved a job from the Hold State to the
Ready State, it will create one or more processes for this job. In this
time, the process scheduler decides which process gets the
processor, when and for how long?
Once the job scheduler has selected a collection of jobs to run, the process
scheduler attempts to handle the Microlevel (process) scheduling. On the
other hands the job and process schedulers may interact; the process
scheduler may choose to "postpone" a process and require that it goes
through the Macrolevel (job) scheduling again in order to complete.
|
Many criteria have been suggested for comparing CPU scheduling policies
(algorithms). Criteria that are used include the following:
|(()
We want to keep CPU as busy as possible. CPU utilization may range from
0 to 100%. In real systems, it should range from 40% to 90%.
The number of jobs that are completed per time unit.
The interval from the time of submission of a process to the time of
completion.
*
The sum of the periods spent waiting in the ready queue.
The time from the submission to the first response.
! +
,
a
1 10.00 2.00 hrs
2 10.10 1.00hrs
3 10.25 0.25 hrs
Fig. (2.1) Sample Job Arrival time.
! (-++-+
.--
/
The average Turnaround Time is computed
as follows:
O
Where:
Finish time
O : Arrival time
-./ ! --
,4
' (
310
! ( !-
,4
' ·
·
32
! ( !-
,4
'
22
! (-6$
In the above example, the turnaround time is used to measure the scheduling
performance. In order to normalize the scheduling performance, another
parameter must be defined, which is called the weighted turnaround time (W),
where
T: the turnaround time. a
Accordingly, we find that the scheduling policies that improved turnaround time
is also improved waited turnaround time. This is not always true as we will see
later.
" !
,
a
; 20
[
3 11.38
7.5 12.3
14.25 39.0