
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















th
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations
Programming
Threads
Operating Systems
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction 4
Configurations
Programming
Threads
Operating Systems
situation in which two or more procesors operate in unison
i.e. two or more CPUs are executing instructions
simultaneously
each CPU can have a RUNNING process at the same time
Process manager must coordinate each processor
Process manager must synchronise the interaction among
CPUs
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction 5
Configurations
Programming
Threads
Operating Systems
(^) Processor 1
accepts a query checks for errors (^) passes request to Processor 2
Processor 2
(^) searches database for required information
Processor 3
(^) retrieves data from database (if kept off-line in secondary
storage) (^) data placed where Processor 2 can get it
Processor 2
(^) passes information to Processor 4
Processor 4
(^) routes the response back to the originator of the request
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations 7
Programming
Threads
Operating Systems
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations 8
Programming
Threads
Operating Systems
(^) Essentially a single processor with additional “slaves”
Master processor responsible for managing entire system
maintains status of processes, storage management, schedules
work for slave processors, executes all control programs.
(^) suited for environments with front-end interactive users, and
back-end batch job mode
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations 10
Programming
Threads
Operating Systems
each has its own memory, IO devices, CPU, and OS
each processor controls its own resources (^) each processor can communicate and cooperate with others
job assigned to one processor, and will remain there until
finished job scheduling based on several requiremenyts and policies
(new jobs may be assigned to the processor with lightest load)
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations 11
Programming
Threads
Operating Systems
(^) Isn’t prone to catastrophic system failures (when a processor
fails, others can continue work independently)
Difficult to detect when a processor has failed
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations 13
Programming
Threads
Operating Systems
Reliable
Uses resources effectively
Balance loads well
Can degrade gracefully in the event of a failure
(^) Processors must be well synchronised to avoid problems of
races and deadlocks
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations
Programming 14
Threads
Operating Systems
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations
Programming 16
Threads
Operating Systems
(^) A = 3 ∗ B ∗ C + 4/(D + E) ∗ ∗(F − G)
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations
Programming 17
Threads
Operating Systems
(^) Define COBEGIN and COEND to indicate to the compiler
which instructions can be processed concurrently
COBEGIN
COBEGIN
(^) A = T 4 + 4/T 5
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations
Programming 19
Threads
Operating Systems
(^) for(j=1;j<=3;j++)
a(j)=b(j)+c(j);
(^) processor#1 performs: a(1)=b(1)+c(1)
processor#2 performs: a(2)=b(2)+c(2)
processor#3 performs: a(3)=b(3)+c(3)
Lecture # Concurrent Processes David Goodwin University of Bedfordshire
Introduction
Configurations
Programming 20
Threads
Operating Systems
(^) A =
1 2 3
4 5 6
7 8 9
, B =
1 2 3
4 5 6
7 8 9
Several elements of a row of A are multiplied by the
corresponding elements of the column in B.