Replacement algorithm for tlb, Operating System

Assignment Help:

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.


Related Discussions:- Replacement algorithm for tlb

Define page stealing, Define Page stealing    Page stealing is taking ...

Define Page stealing    Page stealing is taking page frames another working sets

Explain acyclic graph directories and its implementation, Acyclic Graph Dir...

Acyclic Graph Directories In this kind of directory structure the shared directories or files can exist in the file system in two or more places at once. A tree structure excl

Define a public key encryption system, Define a public key encryption syste...

Define a public key encryption system Allows just the correct receiver to decode the data

Explain interrupts, Interrupts The hardware mechanism that enables a de...

Interrupts The hardware mechanism that enables a device to inform the CPU is called an interrupt. The basic interrupt mechanism works as follows. The CPU hardware has a wire kn

What is preallocation, What is preallocation? Why do it? Allocating spa...

What is preallocation? Why do it? Allocating space for a file before making the file to allow for expansion. This reserves space for a certain file so that other files can't gr

Explain file structure, File structure Certain files must conform to a ...

File structure Certain files must conform to a needed structure that is understood by the operating system. The operating system may consist that an executable file has a parti

WINDOWS XP, DESIGN GOALS OF WINDOWS XP.DESCRIBE IN DETAIL.

DESIGN GOALS OF WINDOWS XP.DESCRIBE IN DETAIL.

Reference counting, The idea of reference counting is to maintain, for ever...

The idea of reference counting is to maintain, for every object, the total number of references to that object, i.e. the number of "incoming" pointers. Whenever the number of refer

Is it essential to bind a real-time thread to an lwp, Q. Presume an operati...

Q. Presume an operating system maps user-level threads to the kernel using the many-to-many model and the mapping is done through LWPs. Additionally the system allows developers to

Explain the various methods of file access, Operating Systems 1. Illust...

Operating Systems 1. Illustrate the Microkernel Architecture with suitable diagram. 2. When Deadlock occurs? What are the Necessary Conditions for Deadlock? 3. Describe f

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd