Question: C programming, computer operation system, memory management Assume that a system has a 32-bit virtual address with N-KB page size (where N > = 1,
C programming, computer operation system, memory management

Assume that a system has a 32-bit virtual address with N-KB page size (where N > = 1, and 1KB = 1024 bytes). Write a C program that accepts two command line parameters, the first one being the value of N (in decimal notation) and the second one being a virtual address in decimal notation, and have it output the page size, the page number and offset for the given virtual address. For example, ./vaddr 4 19985 The program should output Virtual address translation by James Bond 007 Page size = 4096, virtual address 19985 rightarrow page number = 4, offset = 3601 Test your program with the following four runs ./vaddr 1 19981 ./vaddr 2 19982 ./vaddr 4 19984 ./vaddr 8 19988 and capture screenshots of your program execution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
