Work queue architecture

The following diagram illustrates the components of a work queue and how they function.


A work queue writer wakes up and attempts to identify work to do. If the writer finds a work item that needs processing, it passes the item to a work queue worker to perform the actual work. If the work queue writer does not find work that needs processing, it goes back to sleep until the next wake up time occurs.