Monday, July 07, 2008

Singularity - Series III : Look into Contract Based Channels(CBCs)

CBCs - Contract Based Channels can be thought of as Pipes in the conventional OS analogy. CBCs are used for communication between SIPs (Software Isolated Processes).

A CBC is bi-directional and both end points are predefined in terms of functionality, working as an in-order message queue.. The bi-directional CBC's two ends are called as Import End (Imp) and Export End(Exp). The CBC is managed by a predefined protocol that is established by the two communicating SIPs.

Thus the 'Contract' in Contract Based Channel defines the arguments and the protocol that will be used during the communication. It also specifies that the protocol applied to one end i.e. either the Imp End or the Export End will not the inter-changeable.

By the details in the research papers, one can confer that the CBSs are owned by exactly two threads.. that is, one end of the CBC is controlled by one thread exclusively and other end by the other and cant be shared by any other thread of any other SIP. This will force the designers to re-think how multiple threads will communicate with each other. There might be a hypothetical situation where say more than 2 threads need to work on the same set of data, in that case maybe there is some mechnanism for chaining the CBCs.

0 comments: