Mallu Aunts ℂall Girls Ahmedabad ℂall Us 6378878445 Top ℂlass ℂall Girl Servi...
week_1Lec01_CS422 (1).pptx
1. CS422- Parallel and Distributed Computing
By
Zarah Zainab
Course Title : Parallel and Distributed Computing
Course Code : CS422
CrHr : 3
2. Marks Distribution Criteria
Quizzes - 10%
Assignments - 10 %
Midterm Examination - 30%
Final Examination - 50%
9/30/2023
2
3. Content
Introduction
What is concurrency?
Uses, advantages
Limitations
Motivating Parallelism
Scope of parallel computing
9/30/2023
3
4. What is concurrency?
Concurrency is the execution of the multiple instruction sequences at the same time.
9/30/2023
4
5. What is concurrency?
It happens in the operating system when there are several process threads running in
parallel.
The running process threads always communicate with each other through shared memory
or message passing.
Concurrency results in sharing of resources result in problems like deadlocks and resources
starvation.
It helps in techniques like coordinating execution of processes, memory allocation and
execution scheduling for maximizing throughput.
9/30/2023
5
6. Uses
Physical resource sharing : Multiuser environment since hardware resources are limited.
Logical resource sharing: Shared file(same piece of information).
Computation speedup: Parallel execution
Modularity: Divide system functions into separation processes.
9/30/2023
6
7. Advantages
Running of multiple applications –
It enable to run multiple applications at the same time.
Better resource utilization –
It enables that the resources that are unused by one application can be used for other
applications.
Better average response time –
Without concurrency, each application has to be run to completion before the next one can
be run.
9/30/2023
7
8. Advantages
Better performance –
It enables the better performance by the operating system. When one application uses only
the processor and another application uses only the disk drive then the time to run both
applications concurrently to completion will be shorter than the time to run each
application consecutively.
9/30/2023
8
9. Problems in Concurrency
Sharing global resources –
Sharing of global resources safely is difficult. If two processes both make use of a global
variable and both perform read and write on that variable, then the order in which various
read and write are executed is critical.
Optimal allocation of resources –
It is difficult for the operating system to manage the allocation of resources optimally.
9/30/2023
9
10. Problems in Concurrency
Locating programming errors –
It is very difficult to locate a programming error because reports are usually not
reproducible.
Locking the channel –
It may be inefficient for the operating system to simply lock the channel and
prevents its use by other processes.
9/30/2023
10
11. Limitations
Non-atomic –
Operations that are non-atomic but interruptible by multiple processes can cause problems.
Race conditions –
A race condition occurs of the outcome depends on which of several processes gets to a
point first.
Blocking –
Processes can block waiting for resources. A process could be blocked for long period of
time waiting for input from a terminal. If the process is required to periodically update
some data, this would be very undesirable.
9/30/2023
11
12. limitation
Starvation –
It occurs when a process does not obtain service to progress.
Deadlock –
It occurs when two processes are blocked and hence neither can proceed to execute
9/30/2023
12
13. Motivating Parallelism
The motivations for parallel processing can be summarized as follows:
Higher speed, or solving problems faster.
Higher throughput, or solving more instances of given problems.
Higher computational power, or solving larger problems.
speed-up factor.
9/30/2023
13
14. Scope of parallel computing
Parallel computing is the simultaneous execution of the same task, split into
subtasks, on multiple processors in order to obtain results faster.
improves the throughput and computational speed of the system.
Problem:
You have a single core, single processor machine and you want to write a word
processing program which also does spelling and grammar check.
9/30/2023
14
15. Scope of parallel computing
BASIS FOR COMPARISON
CONCURRENCY
PARALLELISM
Basic It is the act of managing and
running multiple computations
at the same time.
It is the act of running multiple
computations simultaneously.
Achieved through Interleaving Operation Using multiple CPU's
Benefits Increased amount of work
accomplished at a time.
Improved throughput, computational
speed-up
Make use of Context switching Multiple CPUs for operating multiple
processes.
Processing units required Probably single Multiple
Example Running multiple applications
at the same time.
Running web crawler on a cluster.
9/30/2023
15
16. Assignment#1
Q1:write a detailed note on History of computing?
Q2:Enlist the applications of concurrency ?
Deadline: Monday i.e. 18-sep-2023
9/30/2023
16