If you came to this page hoping to find the definition of a term, and did not find it, then let me know so that I can define the term in future versions of this glossary (which is currently quite sparse).
You can find my contact details at the foot of this page.
- Blocking [verb]: To block is to wait until some other event occurs. For example, we say that a reader blocks on an empty channel until a writer arrives, and a process blocks on a barrier until all enrolled processes are ready to synchronise
- Blocking (system) calls: These are function calls or operations that may block for an indefinite amount of time. This could be because they require something external - for example, network data or user input. It may also be because the operation could take a incredibly long time - for example, reading a file. Because these calls can take such a long time, it is a bad idea to run two processes in the same thread where one of them will be making blocking system calls.
- Channels: Channels are used to communicate between processes. They have a specific type, and are used via channel-ends.
- Channel-ends: Channel-ends (which may be reading ends, from which data is read, or writing ends to which data is written) are used to actually communicate on channels. Typically you create a channel and pass the two different ends to different processes ("wiring" them together) so that they can communicate.
- Empty channel: A channel is deemed empty if there is no process (neither a writer nor a reader) waiting to use it.
- FIFO: First-In First-Out. This is usually used to describe a buffering strategy. If you feed the value 1 then the value 2 into a FIFO buffer, you will get out the value 1 then the value 2 - that is, the order they come out is the same order that they went in. Examples of such buffers include csp::FIFOBuffer and csp::InfiniteFIFOBuffer.
- Freeing [verb]: Free is usually used as a complement to block. A reader will block on an empty channel until a writer frees it.
- Kernel-thread: A kernel-thread is a pre-emptible OS-level thread. See the Running Processes page.
- Polling [verb]: To poll is to repeatedly perform a check until an event happens that changes the result. For example, this code polls a Chanin, "in", until there is a writer ready:
Polling is inefficient and can usually be avoided in C++CSP2. For example the above code could simply read from the channel, which would make it wait until there was a writer ready. If you need to wait for one of multiple events, a csp::Alternative usually suffices.
while (false == in.pending())
- Release [verb]: Release is usually used to mean the same as free; as a complement to blocking/waiting.
- Spinning [verb]: Spinning is a form of polling. It is usually used in terms of mutexes -- if a process cannot immediately claim a mutex it spins (continually re-tries to claim the mutex) until it succeeds.
- Thread: When used without a qualifier, a thread refers to a kernel-thread (rather than a user-thread)
- User-thread: A user-thread is a co-operatively scheduled light-weight thread. See the Running Processes page.
Generated on Mon Aug 20 12:24:28 2007 for C++CSP2 by