×

Synchronization method for work distribution in a multiprocessor system

  • US 5,951,672 A
  • Filed: 07/02/1997
  • Issued: 09/14/1999
  • Est. Priority Date: 07/02/1997
  • Status: Expired due to Fees
First Claim
Patent Images

1. In a multiprocessor system, a method for synchronizing the operations of two threads so as to execute a task with only one of the two threads, wherein one of the two threads is a main thread and wherein the one of the two threads is a child thread, comprising the steps of:

  • providing first, second and third variables that are accessible by both of the threads;

    initializing the first and second variables to an `open` state and the third variable to a `task not done` state, the first variable being associated with the first thread and the second variable being associated with the second thread;

    with the main thread, setting up work buffers for the task until there are no further work buffers to set up;

    before a first thread begins to access the task, testing the first variable to determine that it is in the `open` state and, if it is, setting the second variable to a `closed` state;

    retesting the first variable with the first thread to insure that it is still in the `open` state and, if it is, accessing the task;

    setting the third variable to a `task done` state; and

    executing the accessed task;

    whereinfor a case where the main thread is the first thread, the steps of testing, retesting, setting and executing are only performed after there are no further work buffers to be set up, and the main thread executes the task in response to determining that a child thread is not currently executing the task.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×