...

/

One More Problem: Waiting For Another

One More Problem: Waiting For Another

In this lesson, you will be introduced to another common problem associated with concurrency.

We'll cover the following...

This chapter has so far set up the problem of concurrency as if only one type of interaction occurs between threads, that of accessing shared variables and the need to support atomicity for critical sections.

Sleeping/waking a thread

As it turns out, there is another common interaction that arises, where one thread must wait for another to complete some action before it continues. This interaction arises, for example, when a process performs a disk I/O and is put to sleep; when the I/O completes, the process needs to be roused from its slumber so it can continue.

Thus, in the coming chapters, you’ll be not only studying how to build support for synchronization primitives to support atomicity but ...