






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Paradigms of thread usage (from Hauser et
al paper)
Defer work
General pumps
Slack processes
Sleepers
One-shots
Deadlock avoidance Rejuvenation Serializers Encapsulated fork Exploiting parallelism
A very common scenario for thread usage
Client may see unexpected response…
something client requested is fired off to happen in the background Forking off examples a document print operation Updating a window Sending an email message Issue? What if thread hangs for some reason. Client may see confusing behavior on a subsequent request!
Call this procedure every 20ms, or after some timeout Can think of device interrupt handler as a kind of sleeper thread
Application had multiple major subactivities, such as input handler, renderer. Something awful happened. So create a new instance and pray
Serializers: a queue, and a thread that removes work from it and processes that work item by item for (;;) { get_next_event(); handle_event(); }
Concurrency exploiters: for multiple CPUs
Encapsulated forks: Hidden threads used in library packages