4.1.4 scheduling queuing
TRANSCRIPT
EC503 –
OPERATING
SYSTEM
4.0 RESOURCE MANAGEMENT
Explain how the queuing
routine and the scheduler work
together to load application
programs.
Pn. Nin Hayati binti
Mohd Yusoff
Processor Management Processor management is responsible
for managing the processor’s time efficiently
Multiprogramming
Time-Sharing
Scheduling and Queuing
Spooling
Deadlock
When one job needs to wait for I/O, the processor switches to
another job.
Maximize the throughput (run time divided by elapsed time)
and minimize turnaround time (the time between job
submission and job completion).
When multiple users access the system through terminals, the processor’s time needs to be shared among them. - fair to every one
Minimize the response time to each user. - interactive processing
Most time-sharing systems use roll -in/roll-out memory technique to manage memory
Dispatching
Time-slicing (A program is set to wait state if it uses up its time slice which is perhaps 0.001 second.)
Polling (based on a round-robin table, or some priority algorithms)
Processor management is concerned with the internal
priorities of programs already in memory.
A program's internal priority is a dif ferent issue.
As one program finishes processing and space
becomes available , which program is loaded into memory
next?
This decision typically involves two separate modules, a
queuing routine and a scheduler .
As programs enter the system they are placed on a queue by
the queuing routine (Figure below). When space becomes
available, the scheduler selects a program from the queue
and loads it into memory.
Queuing
routine Job
Queue
Programs
A. When a program first enters a
multiprogramming system, a queuing
routine copies to queue.
Scheduling
routine Job
Queue Program partition
Program partition
B. later, when space becomes available,
the scheduling routine loads a program
from the queue into memory
Generally, the first program on the queue is loaded
first, but more sophisticated priority rules can be used.
Sometimes, more than one queue is maintained.
Often, a program is placed on a particular queue based on its
resource needs; for example, programs requiring magnetic
tape or special printer forms can be separated from those
calling for more normal setup. Grouping programs with
similar resource needs simplifies scheduling.