Method and apparatus for processing data stored in a memory shared among a
plurality of processors is described. In an example, a semaphore is
provided that is associated with a first portion of the memory. Tasks are
stored in the first portion of the memory, the tasks being respectively
related to data segments stored in a second portion of the memory. A
state of the semaphore is determined. Access among the plurality of
processors to the first portion of the memory is controlled in response
to the state of the semaphore. A task is executed to process a data
segment of the data segments in response to a processor of the plurality
of processors gaining access to the first portion of the memory.