You are on page 1of 21

Concurrency on Operating

System
Platform Technology
What is Concurrency System?

Execute multiple task at a same time


Allow multiple user to affect multiple
transaction
Execute multiple program at a same time
Can use one or more CPU’s
Related to Parallelism but Different
Concurrency System
Parrallelism

Parrallelism - refers to techniques to make


programs faster by performing several
computations at the same time. This
requires hardware with multiple processing
units
Parrallelism
Parallelism Vs. Concurrency
Concurrency Parallelism
Tasks run at a same Tasks literally run at
time same time
Concurrency is equal Parallelism is equal to
to Interruptability independentability
Achieve through Using Multiple CPU’S
Interleaving Operation Multiple CPU’s for
Make use of Context
Multiple Processes
Switching Running web crawler
Application runs at
on cluster
the same time
Parallelism Vs. Concurrency
Concurrency in real world and on
Computer Systems

Shared Bathrooms
Shared Vending machine
Traffic lights/shared street
Multiple Processes within the OS
Multiple threads within a process
Real world Example
Properties of Concurrent
System

It have Multiple actors


Actors have shared resources
Rules to access shared resources
Properties of Concurrent
System
Managing Thread of Control

Thread of control' refers to


execution by kernel thread with its
own program counter/stack
Most Common mechanism

Multitasking - the operating systems


simulates concurrency on a single CPU

Multiprocessing - multiple CPUs


executing concurrently
Multitasking
Can be done with one CPU
Interleaving different task on one CPU
Assign relative priorities on processes
Shared single thread of control
Process has three possible states:
Blocked
Ready
Running
Multitasking
Multiprocessing

Multiple CPU’S executing concurrently


Assigned Processes to multiple CPU’S
OS can support symmetric multiprocessor
Processes Dynamically assigned to
available CPU’S
Shared memory of Multiple CPU’S
Multiprocessing
Advantages and Disadvantages
of Concurrency
Advantages

Enhanced Controllability of the system


Make the System more reactive
Reduce the waiting time
Average Response time will increased
Improved throughput and Resources
Utilization
Disadvantages
The Issue of Consistent State
Sequential procedure of the System
Contention for the Shared Resources
Concurrent Systems are difficult to
understand
Interaction between task becomes more
complex
Concurrency Runtime in
Visual C++ 2010
The Concurrency Runtime for C++ helps
you write robust, scalable, and responsive
parallel applications.
It raises the level of abstraction
You can use it to sp ecify scheduling
policies

You might also like