Understanding Non-Blocking I/O in Operating Systems

non blocking i o n.w
1 / 10
Embed
Share

Explore the concept of non-blocking I/O in Operating Systems through discussions on MPI types, non-blocking I/O examples, and comparisons with blocking I/O. Learn about MPI non-blocking I/O functions such as MPI_Irecv, MPI_Isend, MPI_Wait, and more.

  • Non-Blocking I/O
  • Operating Systems
  • MPI
  • Semaphores
  • I/O

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Non-Blocking I/O CS550 Operating Systems

  2. Outline Continued discussion of semaphores from the previous lecture notes, as necessary. MPI Types What is non-blocking I/O? Review of MPI_Irecv and MPI_Isend Example Code

  3. MPI Types MPI_CHAR MPI_SHORT MPI_INT MPI_LONG MPI_FLOAT MPI_DOUBLE Many other types exist These types are analogous to C primitive types See the MPI Reference Manual for more examples

  4. Blocking I/O In blocking I/O, when a message is sent, a process waits until it has acknowledgement that the message has been received before it can continue processing. Similarly, when a message is requested (a receive method/function is called) the program waits until the message has been received before continuing processing.

  5. Blocking I/O Example Process1 Process2 +------------+ 1.send msg +------------+ |MPI_Send | --------> |MPI_Recv |wait for ack| |wait for msg| |ack received| <-------- |3b.continue | 2.send ack |3a.continue | +------------+ +------------+ | |ack receipt |

  6. Non-Blocking I/O Non-blocking I/O allows for messages to be sent or requested for receipt without waiting for an acknowledgement that the message has been received. This means that programs may continue processing immediately after sending a message or after requesting that a message be received.

  7. Non-Blocking I/O Example Process1 Process2 +------------+ 1.send msg +-------------+ |MPI_Isend | --------> |MPI_Irecv |2a.continue | |2b.continue | | | |3. Do WORK | | | | | |4.wait on msg| | | |5.work on msg| +------------+ +-------------+ | |MPI_Wait |

  8. Non-Blocking I/O Example 2 Process1 Process2 +------------+ | | |MPI_Irecv |1a.Do WORK | |1b.continue | | | |2. Do WORK | | | | MPI_Isend | 5.send msg |4.wait on msg| | | --------> +------------+ +-------------+ +-------------+ | |MPI_Wait | |6.work on msg|

  9. MPI Non-blocking I/O Functions MPI_Get_count used to determine the length of a received message MPI_Irecv non-blocking receive MPI_Isend non-blocking send MPI_Wait waits for one message to be received after performing a non-blocking send. MPI_Waitall waits for all specified messages (e.g. a list of messages) to be received. MPI_Wait_some waits for at least one message out of a list of messages to be received, then continues processing

  10. Example Code See the non-blocking I/O examples from the course webpage

Related


More Related Content