Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Task 1

you are to add a static system call to your kernel which will collect and return to user space callers the following memory management statistics:

1. the current number of free pages (over all memory zones);

2. the current number of pages used by slab allocator (over all memory zones);

3. the current number of pages in the active list (over all memory zones);

4. the current number of pages in the inactive list (over all memory zones);

5. the current number of pages in the active list whose reference bits are set (over all memory zones);

6. the current number of pages in the inactive list whose reference bits are set (over all memory zones);

7. the cumulative number of pages moved from the active list to the inactive list (since the last machine boot);

8. the cumulative number of pages evicted from the inactive list (since the last machine boot);

Follow steps similar to the ones you took to develop the pinfo static system call that you developed in assignment 2.

Develop a test program that triggers a change in the statistics above, report them on standard output, reason about the change and document on learning report deliverable to be submitted as part of this assignment. Taking statistic 8 (the cumulative number of pages evicted from the inactive list) as an example, you should provide a program that triggers additional page evictions from the inactive list so the reported statistics 8 will change after you run the program. It is OK to use one combo program to trigger the changes of multiple statistics as long as you clearly document and reason about why these changes occurred.

Task 2

you are to replace the second-chance LRU approximation algorithm in both the active and inactive lists with a counter-based clock algorithm:

1. Keep a reference counter for each frame, which is set to 0 initially.

2. When try_to_free_pages() is called, you scan a frame in the following way. First, you add the reference bit value to the frame reference counter (and clear the reference bit at the same time). Then you check the frame reference counter. If the counter is 0, you evict the page. Otherwise, you decrement the counter by 1 and move the frame to the back of list (as the original second-chance LRU approximation normally does).

3. Action #2 (above) alone will result in a replacement algorithm equivalent to the original second-chance LRU approximation. To effectively utilize the frame reference counter, you need additional counter maintenance from other events. To this end, you should scan the frames periodically (e.g., as part of the timer interrupt) and add the reference bit value to the frame reference counter (and clear the reference bit at the same time).

4. Note that the frame reference counter may overflow. If the frame reference counter is already at its maximum value, keep it unchanged when adding the reference bit to it.

Note that you are only being asked to replace the existing LRU approximation algorithm in each list with a new one. You can leave the basic Linux two-list memory management in place. Also, you do not need to make any changes to how Linux handles dirty page eviction. If a frame to be freed contains a dirty page, it will have to be swapped out, but this should not affect your decision on which frame to free.

Write a user program that you can use to test your page replacement implementation and compare it against the default page replacement algorithm in Linux. Include in your learning report an explanation of how it works and why it is useful for comparing the page replacement implementations. Describe the experiments you ran and explain the measurements you obtained. Explain the different performance of the two algorithms (or the lack thereof) and how this is justified based on the design/implementation of the two algorithms

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91905397

Have any Question?


Related Questions in Computer Engineering

Why are some nations economically strong and others

Why are some nations economically strong and others economically weak?

Need references for information for the following dealing

Need references for information for the following dealing with CSMS (Consolidated Sales and Marketing System Project) Produce a narrative which describes the added error-handling pathways that includes: an overview of th ...

Software engineeringsuppose you are writing software for a

Software Engineering: Suppose you are writing software for a radio station that manages its playlists. The program will generate candidate playlists from a record library automatically and station personnel can then chec ...

Item 4 is the tester program for implementing the amusement

Item 4 is the tester program for implementing the Amusement Park. I am looking for an Amusement Park Tester program that is in Java. None of the answers included the tester program! I need to: Design a tester class calle ...

Why regulated industries should be required to follow

Why regulated industries should be required to follow security standards. Provide 2 examples of industries that would fall under this category.

Suppose after collecting data on an existing firms actual

Suppose, after collecting data on an existing firm's actual short-run ouput, the following production function is found to match the data:  TP = Q = 5*L + 0.6*L2 - 0.01*L3  1. Using the equation above, find the following ...

Question suppose a new standard the iddd-643 standard is

Question Suppose a new standard, the IDDD-643 standard, is developed for storing numbers in a string of 16 bits. The first bit is used for the sign of the number (0 if positive and 1 if negative). The next 5 bits store t ...

Question superfast software inc was founded last year by

Question : Superfast Software Inc. was founded last year by three young programmers. They all dreamed their company would become a really big one and would distribute a large number of software products all over the worl ...

The system development team at the xyz company is working

The system development team at the XYZ Company is working on developing a new customer order entry system. In the process of designing the new system, the team has identified the following data entity attributes: Invento ...

You are requested to design an information technology

You are requested to design an Information Technology Infrastructure for an international nonprofit organization. The organization has six offices, one each in Ohio, Kentucky, Toronto, Michigan, Chicago, and Indiana. Col ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As