Develop a test program that triggers a change

Assignment Help Computer Engineering
Reference no: EM131149933

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

Reference no: EM131149933

Questions Cloud

Describe the cisco campus architecture : Describe the Cisco Campus architecture, and explain the primary reasons why it is important for AtoZ Insurance. Provide a rationale for your response.
What is the relationship between the type of data and tools : Determine the category of the provided data in the given case study. Be sure to justify why the data fits into this category type. What is the relationship between the type of data and the tools
What is the null and the alternative hypotheses : What is your recommendation to the president based on expected value that maximizes profits (EMV). Provide a second recommendation to the president that minimizes regret.
What will be the value of matt''s account in ten years : What will be the value of Matt's account in ten years with his monthly payments if he is earning 6% (APR), 8% (APR) or 12% (APR)?
Develop a test program that triggers a change : Develop a test program that triggers a change in the statistics above, report them on standard output - Replace the second-chance LRU approximation algorithm in both the active and inactive lists with a counter-based clock algorithm.
Conduct an organizational assessment on the dhl company : Conduct  an Organizational Assessment on the DHL COMPANY AND DHL and its global competitiveness. The aim of this assignment is to examine the business strategy of the World famous logistic company-DHL and its global competitiveness. It has gained the..
Create portfolio of local suppliers for his new line : Phillip Witt, president of Witt Input Devices, wishes to create a portfolio of local suppliers for his new line of keyboards. As the suppliers all reside in a location prone to hurricanes, tornadoes, flooding, and earthquakes, Phillip believes that t..
Provide the main steps that you would use to troubleshoot : Provide the main steps that you would use to troubleshoot each of these issues and determine the tools that you would require to complete your troubleshooting. Provide a rationale to support your response.
Find the fundamental frequency for the lateral vibration : Using Rayleigh s method, find the fundamental frequency for the lateral vibration of the beam shown in Fig. 8.39. The restoring force in the spring k is proportional to the deflection, and the restoring moment in the spring is proportional to the ..

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is bobs private key

What is Bob's private key?

  Assess the benefits gained by running applications when the

most operating systems use a virtual memory manager vmm whose responsibility is to manage the relationship between the

  The primary function of the steering committee

What do you find one of the most interesting advances in health care informatics and why.

  How using the sequence structure only

As you know, three fundamental control structure are sequence, selection and repetition. Can you write down C program using the sequence structure only.

  Explaining troubleshooting

AV software has removed the malware from highly infected system. After first reboot, an error message is showed which consists of a reference to the strange DLL file which is missing. Explain two options you must use in order to start troubleshoot..

  Application showing sizes of two files and their ratio

Build a file which consists of your favourite movie quote. Make a use of a text editor like Notepad and save file as Quote.txt. Copy contents of the file and paste them into the word-processing program like Word. Save file as Quote.doc. Write down..

  Identify a recent moral dilemma or ethically

Write an Overall Conclusion that ties the results of both Analysis One and Analysis Two together and which justifies the recommendations you have made through the two analyses.

  You have just been hired as an information security

you have just been hired as an information security engineer for a large multi-international corporation.

  Program showing duplicate values in an array

Write down a program in C in order to show the duplicate values in an array, Documentation and Naming Style Sheet should include: Description of what program does, Summary of the problem's specifications and assumptions.

  What is the advantage when target is throughput and security

What is the advantage when target is throughput and securityty

  Give the pseudocode for the flowchart

make a flowchart and give the pseudocode for searching an array for a specified value.

  Answer the following

What is final value of y after executing the following code.

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