Nova Patents
EP0806730A2

Real time dispatcher

Abstract

The present invention provides a process scheduler or dispatcher for a multiprocessor system for real time applications. This embodiment of the present invention proposes a dispatcher model that maintains a dispatch queue for each processor and a separate global dispatch queue for unbound higher priority real time threads. A processor has its own queue and a dispatcher. Each queue has a separate schedule lock associated with it to protect scheduling operations. A processor's dispatcher selects a thread for execution from one of the queues in the system as a candidate thread to execute. When a candidate thread is selected for execution, the processor proceeds to verify against threads in the global real time queue and the processor's own dispatch queue to select a highest priority runnable thread in the system. Thus, the present invention allows the dispatcher to prevent race conditions and minimize lock contention while assuring that high-priority threads are dispatched as quickly as possible. The present invention is implemented by a synchronization between the operations of dispatching a thread and making a thread runnable.

EP0806730A2, drawing sheet 1
Sheet 1 of 11

Term

Term ended

Projected expiry passed 1 May 2017, 9.4 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

20 claims: 4 independent, 16 dependent

  1. 1
    A method for scheduling a thread in a multiprocessor system based on a preemptive priority scheduling, said multiprocessor system comprising a plurality of processors, said method comprising:selecting a thread as a candidate thread to execute from one of a plurality of local queues and a global queue, said plurality of local dispatch queues for storing threads to be scheduled, each of said plurality of local dispatch queues coupled to one of said plurality of processors, said global queue for storing threads to be scheduled, said global queue accessible by each of said plurality of processors;notifying processors of the candidate thread;checking whether a higher priority thread is available in its local queue and said global queue;preempting the first selected thread and selecting the higher priority thread as the candidate thread to execute when there is a higher priority thread;executing the candidate thread.
  2. 10
    A multiprocessor scheduling system based on a preemptive priority scheduling, said multiprocessor scheduling system comprising:a plurality of processors;a plurality of schedulers, each of said plurality of processors coupled to one of said plurality of schedulers;a plurality of local dispatch queues, each of said plurality of processors coupled to one of said plurality of local dispatch queues;said plurality of schedulers coupled to a communication medium;a global dispatch queue coupled to said communication medium;a shared memory coupled to said communication medium.
  3. 11
    The multiprocessor scheduling system of daim 11 wherein said global dispatch queue stores real time threads.
  4. 13
    An article of manufacture comprising:a computer usable medium having computer readable program code embodied therein for scheduling a thread in a multiprocessor system based on a preemptive priority scheduling, said multiprocessor system comprising a plurality of processors, the computer readable program code in said article of manufacture comprising:computer readable code configured to cause one of said plurality of processors to select a candidate thread to execute using a thread select and verify method comprising the steps of: selecting a thread as a candidate thread to execute from a plurality of local dispatch queues and a global queue, said plurality of local dispatch queues for storing threads to be scheduled, each of said plurality of local dispatch queues coupled to one of said plurality of processors, said global queue for storing threads to be scheduled, said global queue accessible by each of said plurality of processors;notifying processors of the candidate thread;checking whether a higher priority thread is available in its local queue and said global queue;preempting the first selected thread and selecting the higher priority thread as the candidate thread to execute when there is a higher priority thread;computer readable code configured to cause said one of said plurality of processors to execute the selected candidate thread.