Replacement algorithm for tlb, Operating System

Consider the following C program where M, N, K are predefined constants. Assume int is 4 bytes. Suppose this program is run on a machine with 4KB page size and 32 TLB entries. Initially, TLB is empty. FIFO is used as the replacement algorithm for TLB.

int X[N];

for (int k = 0; k < K; k++)

for (int i = 0; i < N; i += M)

X[i] = random(); //generate some random number

a) If K is 1, what values of M and N will cause a TLB miss for every access of array X. Explain why.

b) If K is a very large number, what values of M and N will cause TLB miss for every access of array X. Explain why.

Posted Date: 4/2/2013 4:07:38 AM | Location : United States







Related Discussions:- Replacement algorithm for tlb, Assignment Help, Ask Question on Replacement algorithm for tlb, Get Answer, Expert's Help, Replacement algorithm for tlb Discussions

Write discussion on Replacement algorithm for tlb
Your posts are moderated
Related Questions
Discuss difference between symmetric and asymmetric multiprocessing  Symmetric multiprocessing (SMP), in which every processor runs an identical copy of the operating system an


Briefly discuss on Bankers algorithm? The resource-allocation graph algorithm is not applicable to a resource-allocation system with multiple examples  for each resource type.

Direct memory access Many computers avoid burdening the main CPU with programmed I/O by offloading sine if this work to a special-purpose processor known as a direct memory add

ADVANTAGES AND INCONVENIENCES OF ULT Advantages: Thread switching doesn't involve the kernel - no mode switching Scheduling is able to be application specific -

For reading, most operating systems use demand paging. This means that pages are only read from the disk into physical memory when they are needed. In the page table, there is a re

Q. Consider a system that holds 5000 users. Presume that you want to allow 4990 of these users to be able to access one file. a. How would you denote this protection scheme in

Define the DosSleep(ms) Function used in the os/2 DosSleep()  suspends the currently executing  thread for some time interval specified in the  ms parameter. If a value of 0 is

Q. Consider the two-dimensional array A: int A[][] = new int[100][100]; Whereas A [0][0] is at location 200 in a paged memory system with pages of size 200. A little process

Define the features are needed to implement top down parsing                      Source string marker, Prediction making mechanism and Matching and Backtracking mechanism