Useful Process Structures for Distributed Applications - PowerPoint PPT Presentation

About This Presentation
Title:

Useful Process Structures for Distributed Applications

Description:

proprietor, administrator, worker, courier, and notifier processes ... Courier Process. used to notify an administrator of the occurrence of some 'event' ... – PowerPoint PPT presentation

Number of Views:12
Avg rating:3.0/5.0
Slides: 11
Provided by: orin
Category:

less

Transcript and Presenter's Notes

Title: Useful Process Structures for Distributed Applications


1
Useful Process Structures for Distributed
Applications
  • proprietor, administrator, worker, courier, and
    notifier processes
  • W. M. Gentleman, "Message Passing between
    Sequential Processes the Reply Primitive and the
    Administrator Concept", Software Practice and
    Experience, Vol. 11, pp. 435-466, 1981.

2
Thoths Message Passing Primitives
  • Send
  • Sends a message to another process
  • Blocked until a reply is received (also called
    Request)
  • Receive
  • Receives a message from another process
  • Blocked until a message is received
  • Reply
  • Replies to a request
  • Does not block

3
Courier Process
  • convey information between two processes, neither
    of which wishes to block
  • uses a pair of Sends
  • no work performed
  • code structure
  • message null
  • loop
  • / message is from server /
  • Send(message to client)
  • / message if from client /
  • Send(message to server)
  • endloop

4
Notifier Process
  • used to notify an administrator of the occurrence
    of some event
  • blocks to event and then Sends message to the
    administrator to notify
  • e.g., timer notifier
  • code structure
  • loop
  • await_interrupt(timer tick)
  • Send(message to server)
  • endloop

5
Worker Process
  • designed to do work on behalf of servers
  • always Sends to server process
  • reply message from server contains work
  • initial Send would contain null result but
    subsequent Sends would contain results of work
  • increases parallelism in servers
  • code structure
  • message null
  • loop
  • Send(message)
  • do work
  • message result
  • endloop

6
Proprietor Process
  • the simplest form of server
  • processes messages in order received (which may
    be different from order sent)
  • completes one request at a time ? limits
    parallelism
  • e.g., disk server
  • code structure
  • loop
  • Receive(request-message)
  • process the request
  • Reply(result)
  • endloop

7
Administrator Process
  • more complex form of server
  • receives service requests from clients
  • receives work requests from workers
  • forwards clients requests to workers
  • administrator itself does little or no actual
    work
  • always Receives and Replies but never Sends
  • only blocked when waiting for more service
    requests by clients, or service completion from
    workers
  • can reorder requests
  • can be used to serialize a critical section
    without restricting parallelism

8
  • Administrator Code structure
  • loop
  • Receive(message)
  • if (message from client)
  • put request in work-queue
  • else
  • if (message from worker)
  • Reply result to client
  • get new request from work-queue
  • Reply work to worker
  • endif
  • endif
  • endloop

9
Example File System Process Structure
Operator_dialog
Device_ proprietor
Timer
Pathname_ administrator
. .
Couriers
From users
. . . . . .
. .
Freespace_ allocator
..
Drive_handlers
Backing_store _administrator
. .
(drive O)
From users
(drive I)
..
. .
(drive N)
10
Exercise
  • How would the administrators algorithm be
    changed if multiple workers were employed?
  • 1. If all workers performed the same work?
  • 2. If workers performed different work?
Write a Comment
User Comments (0)
About PowerShow.com