Lab 10 Os
Lab 10 Os
This lab introduces the concept of physical addressing and virtual addressing in paging. Paging is
a memory management technique in which the memory is divided into fixed size pages. Paging
is used for faster access to data. When a program needs a page, it is available in the main
memory as the OS copies a certain number of pages from your storage device to main memory.
Paging allows the physical address space of a process to be noncontiguous.
Objectives
This lab will enable students to understand and implement physical addressing in the memory.
Tools/Software Requirement
Description
Assume that a system has 32-bit addresses with a 4-KB page size. Given a 32-bit physical
address, corresponding physical page number contains some really useful information like the
starting address of the physical page (in hex) and offset. For example, given the physical address
19986
Page number = 4
Starting address=0x4000
Offset = 3602
Tasks
Given a 32-bit physical address, write a program to find its corresponding physical page number,
the starting address of the physical page (in hex) and offset. Your program should print the above
mentioned information from the physical address. Writing this program will require using the
appropriate data type to store 32 bit numbers. Make sure to verify your program with multiple
Deliverables
Submit
Source code
readme file