13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

306 Co-operating Processes Chapter 9Here is what the command interpreter might do to connect List and Sort:1 var2 ToList, ToSort, MyRead, MyWrite : PortCapability;34 begin5 ToList := Load(List);6 ToSort := Load(Sort);7 MyRead, MyWrite := CreatePort();8 Write(ToList,MyWrite);9 Write(ToSort,MyRead);10 ClosePort(ToList);11 ClosePort(ToSort);12 endThis scenario is pictured in Figure 9.8.Port capabilities allow processes like Sort and List in the previous example to beintroduced to services without needing to know any name for the service. For the purposeof debugging or monitoring, the command interpreter can substitute other capabilitiesfor the ones expected by the children.Command interpreterListSortAfter line 7After line 9Command interpreterListSortFigure 9.8 Connecting two processes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!