Scheduler pattern: Difference between revisions

Content deleted Content added
Addbot (talk | contribs)
m Bot: Migrating 1 interwiki links, now provided by Wikidata on d:q4049127
fix link
Line 1:
{{Unreferenced|date=December 2009}}
In [[computer programming]], the '''scheduler pattern''' is a [[software design pattern]]. It is a [[Concurrency (computer science)|concurrency]] pattern used to explicitly control when [[thread (software engineeringcomputing)|thread]]s may [[execution (computers)|execute]] single-threaded [[source code|code]], like write operation to a file.
 
The scheduler pattern uses an object that explicitly sequences waiting threads. It provides a mechanism to implement a [[scheduling policy]], but is independent of any specific scheduling policy — the policy is encapsulated in its own class and is reusable.
Line 6:
The [[Read write lock pattern|read/write lock pattern]] is usually implemented using the scheduler pattern to ensure fairness in scheduling.
 
Note that the scheduler pattern adds significant overhead beyond that required to call a synchronized [[method (computer scienceprogramming)|method]].
 
The scheduler pattern is not quite the same as the [[scheduled-task pattern]] used for real-time systems.