redirecting to Scheduling (computing), which covers the same topic; the only source I can find for scheduling as a design pattern is the self-published http://www.c2.com/cgi/wiki?SchedulerPattern, which treats everything as a pattern
(17 intermediate revisions by 15 users not shown)
Line 1:
#REDIRECT [[Scheduling (computing)]]
In [[computer programming]], the '''scheduler pattern''' is a [[software design pattern]]. It is a [[concurrency]] pattern used to explicitly control when [[thread (software engineering)|thread]]s may [[execution (computers)|execute]] single-threaded [[source code|code]].
The scheduler pattern uses an object that explicitly sequences waiting threads. It provides a mechanism to implement a [[scheduling policy]]. It is independent of any specific scheduling policy; the policy is encapsulated in its own class, and is reusable.
The scheduler patter adds significant overhead beyond that required to call a synchronized method.
The [[Read write lock pattern|read/write lock pattern]] is usually implemented using the scheduler patter to ensure fairness in scheduling.
The scheduler patter is not quite the same as the [[scheduled-task pattern]]).