Question: Homework problem # 4 for Computer Operating Systems Worth 5 points. Assume a system has 32-bit virtual memory address with a 4-KB page size (4096
Homework problem \# 4 for Computer Operating Systems Worth 5 points. Assume a system has 32-bit virtual memory address with a 4-KB page size (4096 bytes). Write a function that is passed a virtual address (in decimal) and outputs the page number and offset for the given address. The output should look like: John Smith Assignment \#4 October 11, 2020 The address 19986 is in: Page number =4 Offset =3602 The address 347892 is in: Page number =x00 Offset =x00x The address 5978 is in: Page number =x00 Offset =x00x Your driver should pass the function three numbers in succession for testing: 19986, 347892, and 5978 and all three of these should be output to the same file so that I can easily check your work. Note the program will require using the appropriate data type to store 32 bits. Using an unsigned integer data type would be a good idea. Also check to make certain your program works. You can use the output from 19986 given above as a test. Zip your program, observations file, and output file together and put the zip file in the Dropbox for problem 4. Remember to have your program place your name and the assignment number at the top of your output file. As always, make certain to have your name, date, and assignment number in comments at the top of your program, output file, and your observations file. Have a brief description of the program at the top of your driver along with your name and date and place comments within your program. Your function should have comments at the top explaining what it does, what its inputs are and what its outputs are
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
