Examlex
Suppose we have a dual core chip multiprocessor with two level cache hierarchy: Both the cores have their own private first level cache (L1) while they share their second level cache (L2). The first level cache on both the cores is 2-way set associative with cache line size of 2K bytes, and access latency of 30ns per word, while the shared cache is direct mapped with cache line size of 4K bytes and access latency of 80ns per word. Consider a process with two threads running on these cores as follows (assume the size of an integer to be 4 bytes which is same as the word size):
Thread 1:
int A[1024];
for (i=0; i < 1024; i++)
{
A[i] = A[i] + 1;
}
Thread 2:
int B[1024];
for (i=0; i< 1024; i++)
{
B[i] = B[i] + 1;
}
Initially assume that both the arrays A and B are in main memory, whose access latency is 200ns per word. Assume that an int is word sized. Furthermore, assume that A and B when mapped to L2 start at address 0 of a cache line. Assume a write back policy for both L1 and L2 caches.
(a) If the main memory blocks having arrays A and B map to different L2 cache lines, how much time would it take the process to complete its execution in the worst case? (Assuming this is the only process running on the machine.)
(b) If the main memory blocks having arrays A and B map to the same L2 cache line, how much time would it take the process to complete its execution in the worst case? (Assuming this is the only process running on the machine.)
In the worst case, thread 1 could access A[0], thread 2 could access B[0], then thread 1 could access A[1] followed by B[1] access by thread 2 and so on. Every time A[I] or B[i] is accessed, it evicts the other array from L2 cache and so a subsequent access to the other array has to again cause a main memory access.
Accounts Payable
Liabilities to creditors arising from purchases of goods, services, or loans, representing amounts a company owes and must pay in the near term.
Buildings
Structures such as offices, warehouses, and factories owned by a company for the purpose of conducting business operations.
Chart Of Accounts
A systematic list of all account titles and numbers used by a business to organize its financial transactions and prepare financial statements.
Alphabetize
The act of arranging words or other textual elements in order according to the sequence of the letters in the alphabet.
Q3: Events in the world determine our reactions.
Q8: What is the value in count after
Q8: Vector architecture exploits the data-level parallelism to
Q8: The east-west axis refers to:<br>A) Finding a
Q8: Identify the basic function of a scale.
Q12: Imagine that you are able to perform
Q19: A write-through cache typically requires less bus
Q27: Identify the purpose of the dimensioning and
Q58: Name the process of joining two or
Q147: How is it possible to alter the