COSC 823 Lecture Slide -4
COSC 823 Lecture Slide -4
By
Dr. M.O. Eze
Department of Computer Science,
Babcock University, Ilisan-Remo, Ogun State, Nigeria
CONCURRENCY IN OS
CONTENTS
approach.
THREAD OPTIONS
MULTITHREADING
LHS Partition:
The two arrangements in the LHS Partition represent
single-threaded approaches.
Example:
single thread.
multithreaded approaches.
Examples:
multiple threads.
threads.
OS CONCURRENCY
A FUNDAMENTAL ISSUE:
Concurrency is a fundamental issue to OS Design. Concurrency
- Process Communication
- Etc.
OS CONCURRENCY
BASIC REQUIREMENT:
architectures are:
1. SMP (Symmetric
Multiprocessors)
2. ASMP (Asymmetric
Multiprocessors)
ASMP
In asymmetric multiprocessing (ASMP), the OS :
Processors.
the system.
multiprocessing:
ASMP.
In terms of complexity,
ASMP.
Interleaved Execution
Interleaved Execution
Race Condition
A Race Condition is a form of competition
processes or threads.
data items.
void echo( );
{
CharIn=GetChar( );
Cout=CharIn;
PutChar(Cout);
}
Race Condition
‘PutChar’.
Race Condition
Because different users perform character
transmission to screen as often as possible, the
echo module is written and stored for re-use by
different processes.
ILLUSTRATION 1:
Case 1:
Case 2:
OUTCOMES: