Jump to content

Scheduler pattern

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TakuyaMurata (talk | contribs) at 02:23, 4 January 2003. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A software design pattern scheduler pattern is used for computer programming. (Note: it is not quite the same as Scheduled-task pattern).

Intent: When there are concurrent requests for a resource, it is necessary to synchronize access. Therefore, implement a scheduler that selects which request will be allowed to execute next.

Scheduling policies may be first-come/first-served, priority-based, or otherwise.

Using the Strategy pattern, one can customize the behavior of the scheduler for particular configurations or applications.

Consider the Command pattern for representation of queued requests.

Related Patterns: Lock pattern, Read write lock, Mediator pattern, Interruptible command, Reactor pattern

Credit

The first draft is based on an excerpt from WikiWikiWeb.