next up previous
Next: Memory Management Up: Comparison Between Windows3.1 Previous: Process Scheduling

Process Synchronization

Information on process synchronization primitive in Windows3.1 has not been found. Due to non-preemptive nature of Windows3.1, it seems to be natural to think that no synchronization primitive is provided in Windows3.1. A process continues to run until it finishes its critical section, and then yields the CPU to another process.

In Windows95, the following synchronization primitives are provided:

Critical section:
Used by threads with the same parent process. The system ensures that only one thread runs inside the critical section.

Event:
Similar to the event-wait in Unixgif. Any thread belonging to any process can wait on an event. If more than one thread wait on the same event, the signal is broadcast to all the threads.

Semaphore:
An integer variable controlling the number of threads entering the critical section. Any thread with different parent processes can obtain a handle to it.

Mutex:
A binary semaphore.

For inter-process communication, message queues are provided in both
Windows3.1 and Windows95. Unlike Windows3.1 which has only one system-wide queue, Windows95 provides a private per-thread queue for 32-bit applications (16-bit applications still share a single queue so that they run on the same environment as Windows3.1). Except the primary thread for each process, the message queue is not allocated until it is needed (i. e. on-demand allocation). Applications can also communicate each other by shared memory method through the shared address space from 2G to 3G (see next section).



Hitoshi Oi
Wed Dec 20 23:53:45 EST 1995