Concurrent Systems - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Concurrent Systems

Description:

They have one 'thread' of execution. One step follows another in sequence. One processor is all that is needed to ... Can be done with one or more processors. ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 18
Provided by: ccGa
Category:

less

Transcript and Presenter's Notes

Title: Concurrent Systems


1
Concurrent Systems
2
Sequential Processing
  • All of the algorithms weve seen so far are
    sequential
  • They have one thread of execution
  • One step follows another in sequence
  • One processor is all that is needed to run the
    algorithm

3
A Non-sequential Example
  • Consider a house with a burglar alarm system.
  • The system continually monitors
  • The front door
  • The back door
  • The sliding glass door
  • The door to the deck
  • The kitchen windows
  • The living room windows
  • The bedroom windows
  • The burglar alarm is watching all of these at
    once (at the same time).

4
Another Non-sequential Example
  • Your car has an onboard digital dashboard that
    simultaneously
  • Calculates how fast youre going and displays it
    on the speedometer
  • Checks your oil level
  • Checks your fuel level and calculates
    consumption
  • Monitors the heat of the engine and turns on a
    light if it is too hot
  • Monitors your alternator to make sure it is
    charging your battery

5
Concurrent Systems
  • A system in which
  • Multiple tasks can be executed at the same time
  • The tasks may be duplicates of each other, or
    distinct tasks
  • The overall time to perform the series of tasks
    is reduced

6
Advantages of Concurrency
  • Concurrent processes can reduce duplication in
    code.
  • The overall runtime of the algorithm can be
    significantly reduced.
  • More real-world problems can be solved than with
    sequential algorithms alone.
  • Redundancy can make systems more reliable.

7
Disadvantages of Concurrency
  • Runtime is not always reduced, so careful
    planning is required
  • Concurrent algorithms can be more complex than
    sequential algorithms
  • Shared data can be corrupted
  • Communications between tasks is needed

8
Achieving Concurrency
  • Many computers today have more than one processor
    (multiprocessor machines)

9
Achieving Concurrency
  • Concurrency can also be achieved on a computer
    with only one processor
  • The computer juggles jobs, swapping its
    attention to each in turn
  • Time slicing allows many users to get CPU
    resources
  • Tasks may be suspended while they wait for
    something, such as device I/O

10
Concurrency vs. Parallelism
  • Concurrency is the execution of multiple tasks at
    the same time, regardless of the number of
    processors.
  • Parallelism is the execution of multiple
    processors on the same task.

11
Types of Concurrent Systems
  • Multiprogramming
  • Multiprocessing
  • Multitasking
  • Distributed Systems

12
Multiprogramming
  • Share a single CPU among many users or tasks.
  • May have a time-shared algorithm or a priority
    algorithm for determining which task to run next
  • Give the illusion of simultaneous processing
    through rapid swapping of tasks (interleaving).

13
Multiprocessing
  • Executes multiple tasks at the same time
  • Uses multiple processors to accomplish the tasks
  • Each processor may also timeshare among several
    tasks
  • Has a shared memory that is used by all the tasks

14
Multitasking
  • A single user can have multiple tasks running at
    the same time.
  • Can be done with one or more processors.
  • Used to be rare and for only expensive
    multiprocessing systems, but now most modern
    operating systems can do it.

15
Distributed Systems
  • Multiple computers working together with no
    central program in charge.

16
Distributed Systems
  • Advantages
  • No bottlenecks from sharing processors
  • No central point of failure
  • Processing can be localized for efficiency
  • Disadvantages
  • Complexity
  • Communication overhead
  • Distributed control

17
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com