IP Library Granted Patent US 7,174,552
Granted Patent B2
US 7,174,552 · App. 10/045,414 · Granted Feb 6, 2007

Method of accessing a resource by a process based on a semaphore of another process

Assignee: Intel Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,174,552
App. No.
10/045,414
Granted
Feb 6, 2007
Kind
B2
Abstract

A method and apparatus are described for a semaphore system based on process events. The system may have multiple processes; one or more shared resources; and a semaphore system corresponding to each of the processes. When multiple processes simultaneously request access to a given shared resource, each semaphore system arbitrates on behalf of its corresponding process. In one embodiment, a semaphore system is self-contained and can arbitrate for its corresponding process based on the other process's events. In another embodiment, the semaphore system interacts with a global arbiter to resolve conflicts.

Claims (60)

1. A method comprising:

requesting access to a resource for a first process, the first process having a corresponding first semaphore that does not correspond to a particular resource;

determining whether the resource is being accessed by a second process, the second process having a corresponding second semaphore that does not correspond to a particular resource; and

denying the first process access to the resource if the resource is being accessed by the second process as indicated by a lock on the resource, wherein the lock is indicated at the second semaphore.

2. The method of claim 1 , further comprising the first process having a corresponding first local priority and the second process having a corresponding second local priority.

3. The method of claim 1 , further comprising:

granting the first process access to the resource if the resource is not being accessed by the second process as indicated at the second semaphore.

4. A machine-readable medium, the machine-readable medium selected from the group consisting of a floppy diskette, an optical disk, a Compact Disc-Read Only Memory, a magneto-optical disk, a Read Only Memory, a Random Access Memory, an Erasable Programmable Read Only Memory, an Electromagnetic Erasable Programmable Read Only Memory, a magnetic card, an optical card, and a flash memory, the machine-readable medium having stored thereon data representing sets of instructions which, when executed by a machine, cause the machine to:

request access to a resource for a first process, the first process having a corresponding first semaphore that does not correspond to a particular resource;

determine whether the resource is being accessed by a second process, the second process having a corresponding second semaphore that does not correspond to a particular resource; and

deny the first process access to the resource if the resource is being accessed by the second process as indicated by a lock on the resource, wherein the lock is indicated at the second semaphore.

5. The machine-readable medium of claim 4 , further comprising the first process having a corresponding first local priority and the second process having a corresponding second local priority.

6. The machine-readable medium of claim 4 , wherein the sets of instruction which, when executed by the machine, further cause the machine to:

grant the first process access to the resource if the resource is not being accessed by the second process as indicated at the second semaphore.

7. An apparatus comprising:

a processor to execute a plurality of processes including a first process and a second process; and

a machine-readable medium having instructions stored thereon, which when executed cause the processor

request access to a resource for the first process, the first process having a corresponding first semaphore that is does not have a corresponding resource;

determine whether the resource is being accessed by the second process, the second process having a corresponding second semaphore that does not have a corresponding resource; and

deny the first process access to the resource if the resource is being accessed by the second process as indicated by a lock on the resource, wherein the lock is indicated at the second semaphore.

8. The apparatus of claim 7 , further comprising the first process having a corresponding first local priority and the second process having a corresponding second local priority.

9. The apparatus of claim 7 , wherein the processor is further to grant the first process access to the resource if the resource is not being accessed by the second process as indicated at the second semaphore.

10. The method of claim 2 , further comprising:

determining if access to the resource is simultaneously being requested by the second process; and

granting access to the resource to one of the first process and the second process having a higher local priority of the first local priority and the second local priority.

11. The machine-readable medium of claim 5 , wherein the sets of instructions which, when executed by the machine, further cause the machine to:

determine if access to the resource is simultaneously being requested by the second process; and

grant access to the resource to one of the first process and the second process having a higher local priority of the first local priority and the second local priority.

12. The apparatus of claim 8 , wherein the processor is further to:

determine if access to the resource is simultaneously being requested by the second process; and

grant access to the resource to one of the first process and the second process having a higher local priority of the first local priority and the second local priority.

13. A system comprising:

a memory having a plurality of resources being accessed by a plurality of processes, and a plurality of semaphores associated with the plurality of processes, wherein each of the plurality of semaphores do not correspond to any one particular resource; and

a processor coupled with the memory, wherein the processor is capable of executing the plurality of processes, the processor is further to;

request access to a resource for a first process of the plurality of processes, the first process having a corresponding first semaphore of the plurality of semaphores;

determine whether the resource is being accessed by a second process of the plurality of processes, the second process having a corresponding second semaphore of the plurality of semaphores; and

deny the first process access to the resource if the resource is being accessed by the second process as indicated by a lock on the resource, wherein the lock is indicated at the second semaphore.

14. The system of claim 13 , further comprising the first process having a corresponding first local priority and the second process having a corresponding second local priority.

15. The system of claim 13 , wherein the processor is further to grant the first process access to the resource if the resource is not being accessed by the second process as indicated at the second semaphore.

16. The system of claim 14 , wherein the processor is further to:

determine if access to the resource is simultaneously being requested by the second process; and

grant access to the resource to one of the first process and the second process having a higher local priority of the first local priority and the second local priority.

17. A method comprising:

requesting access to a shared resource for a first process having a first corresponding semaphore system having a first priority, wherein the first semaphore system does not correspond to a particular resource;

determining if a second process having a second corresponding semaphore system having a second priority is also requesting access to the shared resource; and

if the second process is also requesting access to the shared resource, then granting access to one of the first and second processes having a higher priority.

18. The method of claim 17 , wherein the first and second priorities comprise local priorities that are fixed for the respective first and second processes.

19. The method of claim 17 , wherein the first process has a first wait time and the second process has a second wait time, and wherein granting access to said one of the first and second processes is based at least in part on a comparison of the first and second wait times.

20. The method of claim 17 , wherein the first priority comprises a first global priority on a global priority queue of a global arbiter, and wherein the second priority comprises a second global priority on the global priority queue of the global arbiter.

21. An apparatus comprising:

a plurality of shared resources;

one or more circuits to perform a first process and a second process;

a first semaphore system including a first semaphore corresponding to the first process;

a second semaphore system including a second semaphore corresponding to the second process;

one or more arbiters to arbitrate for access to the plurality of shared resources for the first and second processes based at least in part on information in the first and second semaphore systems; and

the first semaphore system does not correspond to any one shared resource.

22. The apparatus of claim 21 , wherein the one or more arbiters comprise:

a first local arbiter of the first semaphore system to arbitrate on behalf of the first process; and

a second local arbiter of the second semaphore system to arbitrate on behalf of the second process.

23. The apparatus of claim 21 , wherein the one or more arbiters comprise a global arbiter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 8, 2005
From: MORTENSEN, MIKAEL; LARSEN, RENE R.
To: INTEL CORPORATION
Reel/Frame 016863/0955 →
Continuity (1)
Related Publication 20030135537A1 · Jul 17, 2003