Assignment Task :

Part 1: Memory leaks and tools to find them (xv6 not required) Memory leaks degrades system performance over time and may eventually lead to system crash. The problem happens often and is difficult to detect and correct. The purpose of this exercise is to introduce you to some tools that may help you combat this problem. 

In this exercise, you will need to use the debugging tools gdb and valgrind. valgrind helps you to find memory leaks and other insidious memory problems. Please find the following link to download and install the tool: 

Deliverables of Part 1:

1. Write a program that allocates memory using malloc() but forgets to free it before exiting. What happens when this program runs? Can you use gdb to find any problems with it? How about valgrind (with the command: valgrind --leak- check=yes null)?

2. Create other test cases for valgrind. Explain why you choose them and the excepted results.

 

Part 2: System calls on memory management

1. Develop the myV2p() system call on xv6. The arguments to myV2p()are (1) a 

virtual address and (2) the operation (read or write) to the instruction or data in that address. myV2p() returns the corresponding physical address or the appropriate error condition. You will provide a test program that will call myV2p()with various test data. Sometimes, people call such a test program an automated test driver. Clearly, xv6 must have code for these functions. Because of the difference in purpose, your code may not be the same as those in xv6, but you should understand the code in xv6. 2. Develop the hasPages()system call on xv6. It takes a process id as argument and will display the different kinds of user pages that have been allocated to the process or returns an error code. How do you define the “different kinds”? The objective is to display as much useful information to the user as possible. You should have test drivers that will allocate different kinds of memory and see how they affect the page tables of the process. 

 

This Management Assignment  has been solved by our Management Experts at UniLearnO. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Eureka! You've stumped our genius minds (for now)! This exciting new question has our experts buzzing with curiosity. We can't wait to craft a fresh solution just for you!

  • Uploaded By : Grace
  • Posted on : March 20th, 2019

Whatsapp Tap to ChatGet instant assistance