Method or system for access to shared resource
First Claim
Patent Images
1. A method comprising:
- performing read and write operations on a non-locked portion of a sharable memory, the performing the read and write operations comprising;
determining a state of a flag for the non-locked portion of the sharable memory;
at least partially in response to determining that the state of the flag comprises a default state, incrementing a counter tracking a number of concurrent tasks accessing the non-locked portion of the sharable memory;
accessing the non-locked portion of the sharable memory to execute a portion of a first particular task involving reading from the non-locked portion of the sharable memory at a time at which the non-locked portion of the sharable memory is accessible to more than one of the concurrent tasks to perform one or more read operations on the non-locked portion of the sharable memory at least partially in response to evaluating whether other tasks are currently performing one or more read operations from the non-locked portion of the sharable memory based, at least in part, on a value stored in the counter;
decrementing the counter tracking the number of concurrent tasks accessing the non-locked portion of the sharable memory after completion of the portion of the first particular task;
at least partially in response to determining that the state of the flag comprises a non-default state, waiting to execute one or more portions of at least a second particular task involving access to the non-locked portion of the sharable memory until the state of the flag is changed to comprise the default state;
accessing the non-locked portion of the sharable memory location comprising a third particular task; and
wherein at least partially in response to determining that the state of the flag comprises the default state and that the third particular task involves writing to the non-locked portion of the shared memory;
toggling the state of the flag to the non-default state, andwaiting to perform the third particular task until the counter tracking the number of concurrent tasks has a value of zero.
9 Assignments
0 Petitions
Accused Products
Abstract
Methods and/or systems are provided that may be utilized to read from or write to a resource, such as a shared memory, for example.
-
Citations
20 Claims
-
1. A method comprising:
performing read and write operations on a non-locked portion of a sharable memory, the performing the read and write operations comprising; determining a state of a flag for the non-locked portion of the sharable memory; at least partially in response to determining that the state of the flag comprises a default state, incrementing a counter tracking a number of concurrent tasks accessing the non-locked portion of the sharable memory; accessing the non-locked portion of the sharable memory to execute a portion of a first particular task involving reading from the non-locked portion of the sharable memory at a time at which the non-locked portion of the sharable memory is accessible to more than one of the concurrent tasks to perform one or more read operations on the non-locked portion of the sharable memory at least partially in response to evaluating whether other tasks are currently performing one or more read operations from the non-locked portion of the sharable memory based, at least in part, on a value stored in the counter; decrementing the counter tracking the number of concurrent tasks accessing the non-locked portion of the sharable memory after completion of the portion of the first particular task; at least partially in response to determining that the state of the flag comprises a non-default state, waiting to execute one or more portions of at least a second particular task involving access to the non-locked portion of the sharable memory until the state of the flag is changed to comprise the default state; accessing the non-locked portion of the sharable memory location comprising a third particular task; and wherein at least partially in response to determining that the state of the flag comprises the default state and that the third particular task involves writing to the non-locked portion of the shared memory; toggling the state of the flag to the non-default state, and waiting to perform the third particular task until the counter tracking the number of concurrent tasks has a value of zero. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
9. A system, comprising:
-
a sharable memory, a write flag, a read task counter to track one or more concurrent tasks to access a non-locked portion of the sharable memory; and a processor to perform read and write operations on the non-locked portion of the sharable memory, the perform of the read and write operations to comprise to toggle a state of the write flag, increment or decrement the task counter, and read from or write to the non-locked portion of the sharable memory in accordance with an execution of one or more threads concurrently; wherein at least partially in response to a determination that the state of the write flag is to comprise a default state to permit a number of concurrent tasks to perform one or more read operations to read from the non-locked portion of the sharable memory at a particular time at least partially in response to an evaluation of an existence of a current performance of other tasks to perform one or more read operations from the non-locked portion of the sharable memory to be based, at least in part, on a value to be stored in the counter; wherein at least partially in response to a change in the state of the write flag from a default to a non-default state while the portion of the sharable memory is to be unlocked, the processor to wait to execute one or more portions of at least a particular task in which the non-locked portion of the sharable memory is to be accessed until the state of the write flag is changed to comprise the default state; and wherein in response to a determination that the state of the write flag is to comprise the default state and a third particular task is to involve a write operation to the non-locked portion of the shared memory, the processor to toggle the state of the flag to the non-default state and to wait to perform the third particular task until the counter tracking the number of concurrent tasks has a value of zero. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. An article, comprising:
-
a non-transitory storage medium comprising machine-readable instructions executable by a special purpose apparatus to permit a particular task access to a non-locked portion of a sharable memory to be capable of being accessed by multiple tasks concurrently with respect to the sharable memory, wherein the instructions are further executable by the special purpose apparatus to;
determine a state of a flag for the non-locked portion of the sharable memory; andat least partially in response to performance of read and write operations on the non-locked portion of the sharable memory and a determination that the state of the flag is to comprise a default state;
to increment a counter to track a number of concurrent tasks to access the non-locked portion of the sharable memory;
to access the non-locked portion of the sharable memory to execute a portion of a particular task to read from the non-locked portion of the sharable memory at a time at which the non-locked portion of the sharable memory is accessible by more than one of the concurrent tasks to perform one or more read operations at least partially in response to an evaluation of an existence of a current performance of other tasks to perform one or more read operations from the non-locked portion of the sharable memory to be based, at least in part, on a value to be stored in the counter;decrement the counter after completion of a portion of the particular task; and at least partially in response to a determination that the state of the flag is to comprise a non-default state;
to wait until the state of the flag is to be changed to comprise the default state;access the non-locked portion of the sharable location to comprise an additional particular task while the non-locked portion of the sharable memory is to be unlocked; and wherein at least partially in response to a determination that the state of the flag is to comprise the default state and a determination that the additional particular task is to involve a write operation to the non-locked portion of the shared memory; toggle the state of the flag to the non-default state, and wait to perform the additional particular task until the counter tracking the number of concurrent tasks has a value of zero. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification