4.1.4 scheduling queuing

8
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

Upload: opie-upie

Post on 31-Dec-2015

34 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 4.1.4 Scheduling Queuing

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

Page 2: 4.1.4 Scheduling Queuing

Processor Management Processor management is responsible

for managing the processor’s time efficiently

Multiprogramming

Time-Sharing

Scheduling and Queuing

Spooling

Deadlock

Page 3: 4.1.4 Scheduling Queuing

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).

Page 4: 4.1.4 Scheduling Queuing

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)

Page 5: 4.1.4 Scheduling Queuing

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 .

Page 6: 4.1.4 Scheduling Queuing

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

Page 7: 4.1.4 Scheduling Queuing

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.

Page 8: 4.1.4 Scheduling Queuing