1 / 6

Project 3 Roadmap

Project 3 Roadmap. Message Passing. Fast communication mechanism Usually implemented as a Circular Buffer Think of an UNIX pipe. Message_Queue_Create(). int Message_Queue_Create(const char *name, ulong_t queue_size) similar to Create_Semaphore()

truman
Télécharger la présentation

Project 3 Roadmap

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Project 3 Roadmap Message Passing

  2. Fast communication mechanism • Usually implemented as a Circular Buffer • Think of an UNIX pipe

  3. Message_Queue_Create() • int Message_Queue_Create(const char *name, ulong_t queue_size) • similar to Create_Semaphore() • each queue has name, id and a bounded size • shared among threads • add a message queue list to User_Context

  4. Message_Queue_Destroy() • int Message_Queue_Destroy(int mqid) • similar to Destroy_Semaphore() • keep a ref count, free only when ref count reaches 0

  5. Message_Queue_Send() • int Message_Queue_Send(int mqid, void * buffer, ulong_t message_size) • check buffer and message size • similar to Write() • blocks is queue full

  6. Message_Queue_Receive() • int Message_Queue_Receive(int mqid, void * buffer, ulong_t message_size) • check buffer and message size • similar to Read() • blocks is queue empty

More Related