Week 7
Multiprocessing Configurations
1
Multiple-Processor Scheduling
CPU scheduling becomes more complex
when multiple CPUs are available.
Have one ready queue accessed by each CPU.
• Self scheduled - each CPU dispatches a job from ready
Q
• Master-Slave - one CPU schedules the other CPUs
Homogeneous processors within
multiprocessor.
• Permits Load Sharing
Asymmetric multiprocessing
• only 1 CPU runs kernel, others run user programs
• alleviates need for data sharing
2
Classifications of
Multiprocessor
Systems
Loosely coupled or distributed
multiprocessor, or cluster
• consists of a collection of relatively autonomous
systems, each processor having its own main
memory and I/O channels
Functionally specialized processors
• there is a master, general-purpose processor;
specialized processors are controlled by the
master processor and provide services to it
Tightly coupled multiprocessor
• consists of a set of processors that share a
common main memory and are under the
integrated control of an operating system
Master/Slave Multiprocessing
Configuration
Single Master processor
system with additional
Slave “slave” processors.
The primary “master”
Main Master I/O processor manages each
Memory Processor Devices
slave, all files, all devices,
and memory.
Slave
Master processor maintains
status of all processes in
system, performs storage
management activities,
schedules work for the
4 other processors, and
executes all control
Pros & Cons of
Master/Slaves
The primary advantage is its simplicity.
Reliability is no higher than for a single processor system
because if master processor fails, entire system fails.
Can lead to poor use of resources because if a slave
processor becomes free while master is busy, slave must
wait until the master can assign more work to it.
Increases number of interrupts because all slaves must
interrupt master every time they need OS intervention
(e.g., I/O requests).
5
Loosely Coupled
Multiprocessing Configuration
Each processor controls its
own resources, maintains
I/O
Main
Processor 1 Devices own commands & I/O
Memory 1
management tables.
I/O
Main
Processor 2 Devices
Each processor can
Memory 2
communicate and cooperate
I/O
with the others.
Main
Processor 3 Devices
Memory
3 Each processor must have
“global” tables indicating
jobs each processor has
been allocated.
6
Loosely Coupled
To keep system well-balanced & ensure best use of
resources, job scheduling is based on several
requirements and policies.
E.g., new jobs might be assigned to the processor with
lightest load or best combination of output devices
available.
System isn’t prone to catastrophic system failures
because even when a single processor fails, others can
continue to work independently from it.
Can be difficult to detect when a processor has failed.
7
Understanding
Operating Systems
Symmetric
Multiprocessing
Configuration
A single copy of OS & a
global table listing each
process and its status is
stored in a common area of
memory so every processor Processor 1
has access to it.
Main I/O
Memory Processor 2
Devices
Each processor uses same
scheduling algorithm to Processor 3
select which process it will
run next.
8
Advantages of Symmetric over
Loosely Coupled Configurations
More reliable.
Uses resources effectively.
Can balance loads well.
Can degrade gracefully in the event of a failure.
Most difficult to implement because processes must be
well synchronized to avoid problems of races and
deadlocks.
9
Understanding
Operating Systems
Resources used
Understanding
Operating Systems
10