Distributed Systems 2 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Distributed Systems 2

Description:

Semaphores are one method WAIT(sem-name) SIGNAL ... think of the unix pipe One process writes to the pipe until it is full Unidirectional and bound to source and ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 13
Provided by: ucc68
Category:

less

Transcript and Presenter's Notes

Title: Distributed Systems 2


1
Distributed Systems 2
  • Distributed Processing

2
Process
  • A process is a logical representation of a
    physical processor that executes program code and
    has associated state and data.
  • Can have separate address space
  • Processing created by running app or language
    construct (e.g.fork)
  • Operating system carries out a context switch
  • Processes that share data lightweight processes
    or threads

3
Co-operation
  • Why is cooperation required ?

4
Synchronization
  • On the same computer fairly easy. Shared clock
    and can share memory.
  • Semaphores are one method
  • WAIT(sem-name)
  • SIGNAL(sem-name)
  • Semaphores can be used in the solution of class
    distributed processing problem the Dining
    Philosophers

5
Dangers of Synchronization
  • Starvation
  • Deadlock

6
Other kinds of interprocess synchronization
  • Eventcounts
  • ADVANCE(count-name)
  • READ(count-name)
  • AWAIT(count-name, value)
  • Similar to the coordination at a deli counter

7
Inter Process Communication
  • IPC for short
  • One example is the synchronous filter mechanism
    think of the unix pipe
  • One process writes to the pipe until it is full
  • Unidirectional and bound to source and target
  • Not secure
  • Can also used a Named Pipe

8
Files
  • Files can be used for process communication
  • Can handle large volumes of data
  • What kind of problems do you think you might run
    into to ?

9
Shared Memory
  • Local processes can use shared memory area.
  • No inherent means of synchronization so
    semaphores may be used
  • Not suitable for large volumes of data
  • Think of a clipboard

10
Message Queues
  • Process can read and write to a named queue
  • Synchronization is built in
  • Only suitable for small amounts of data

11
Structuring a distributed system
  • Master-slave
  • Client/server
  • Peer-to-peer
  • Group
  • Distributed object
  • Multimedia stream

12
Samples
  • http//www.cs.cf.ac.uk/Dave/C/
Write a Comment
User Comments (0)
About PowerShow.com