In order to improve cache performance in multiprogrammed shared-memory multiprocessors, cache affinitive scheduling is widely used. Cache-affinity is the useful data remaining in the cache, and cache affinitive scheduling is the processor scheduling policy to scheduling a process on the processor where it has the affinity. The cache affinitive scheduling policy may reduce the cache miss ratio by retaining the process' working sets. The limitations of previous affinitive scheduling policies are that they do not fully exploit the cache affinity, and several policies are too complex to implement.
In this thesis, we propose a new scheme which fully exploits cache-affinity by introducing a way to indicate the amount of cache-affinity. The proposed scheme uses a flag in PCB to indicate the amount of the cache-affinity. The value of the flag means whether the previous context's execution ended with the quantum time expiration or not. The time-expired processes have higher priority on choosing the next process to be executed. The time expiration may mean that the process has enough affinity on that processor. We also propose new cache line replacement policy. This policy is based on the scheduling information that are presented by OS. By replacing the cache line of the terminated or migrated process first, the cache miss ratio of this policy is lower than that of the LRU policy, the most generally-used cache line replacement policy. Trace-driven simulations confirm that the new scheme outperforms the previous schemes.