×

Method for controlling process priority in semaphore operation

  • US 5,241,676 A
  • Filed: 05/15/1990
  • Issued: 08/31/1993
  • Est. Priority Date: 05/16/1989
  • Status: Expired due to Fees
First Claim
Patent Images

1. A multitask processing method for executing any one of a plurality of processes each having a different process priority by using a semaphore having a semaphore priority in a semaphore operation including a first operation and second operation, each process being in a running state, wait state or ready state, the method, performed in a single processor, comprising the steps of:

  • comparing, in the first operation, the semaphore priority with a first process priority of a first one of the processes which is in the running state;

    changing the first process priority into a first changed priority corresponding to the semaphore priority when the semaphore priority is higher than the first process priority, to execute the first process;

    returning, in the second operation, the first changed priority to the first process priority;

    comparing the semaphore priority with a second process priority of a second one of the plurality of processes which is in the wait state;

    changing the second process priority into a second changed priority corresponding to the semaphore priority when the semaphore priority is higher than the second process priority;

    setting the second process having the second changed priority in the ready state;

    comparing the returning first process priority with the second changed priority;

    setting the first process in the ready state when the second changed priority is higher than the returned first process priority; and

    selecting a process having a highest process priority from among the process priorities of the processes which are in the ready state to execute the selected process.

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