Synchronizing threads

Multiple threads within a task share the same virtual address space, and potentially can share the same data objects; threads in different tasks can also share data by making special arrangements. Without some data protection mechanism, one thread could attempt to read a piece of data while another thread was in the process of modifying it, or two threads could attempt to modify the same data simultaneously.

To prevent such data corruption, the CommonPoint application system provides thread synchronization mechanisms called semaphores and monitors. Each mechanism can be associated either explicitly or implicitly with a particular piece of shared data.

You can also use semaphores simply to coordinate the activities of two or more threads. In this case, the semaphore might represent some important operation, rather than a piece of data.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker