A system, method and computer readable medium are provided for segmenting a cache
that is shared by multiple processors. According to the method, a first segment
of the cache is allocated to a first processor and a second segment of the cache
is allocated to a second processor. An execution time of at least one task on the
first processor is monitored. If the execution time of the at least one task is
greater than an allowed execution time minus a predetermined margin, the size of
the first segment of the cache that is allocated to the first processor is increased.
In one preferred method, if the execution time of the at least one task is significantly
less than the allowed execution time minus the predetermined margin, the size of
the first segment of the cache that is allocated to the first processor is decreased.