0% found this document useful (0 votes)
93 views3 pages

Lab 10 Os

This 3 sentence summary provides the key details about the document: The document discusses a lab assignment on memory management techniques in operating systems, specifically on physical addressing and virtual addressing using paging. Students are asked to write a program that takes a 32-bit physical address as input and outputs the corresponding physical page number, starting address of the physical page in hexadecimal form, and offset. The program is meant to help students understand how physical addressing works in memory.

Uploaded by

Danial Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views3 pages

Lab 10 Os

This 3 sentence summary provides the key details about the document: The document discusses a lab assignment on memory management techniques in operating systems, specifically on physical addressing and virtual addressing using paging. Students are asked to write a program that takes a 32-bit physical address as input and outputs the corresponding physical page number, starting address of the physical page in hexadecimal form, and offset. The program is meant to help students understand how physical addressing works in memory.

Uploaded by

Danial Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Department of Computing

CS 330: Operating Systems


Lab 10: Memory Management

CLO1(Explain & summarize OS Services and Abstractions)

Time: 9.00 AM – 12:00 PM and 02:00 PM – 05:00 PM


Instructor:Dr.Pakeeza Akram

CS330: Operating Systems Page 1


[Course Code]: [Course Title] [Instructor Name]
Class: [Batch] [Semester YYYY]

Lab 10: Memory Management


Introduction

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

 Linux OS installed on laptops or systems.


 GCC

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

CS330: Operating Systems Page 2


[Course Code]: [Course Title] [Instructor Name]
Class: [Batch] [Semester YYYY]
test cases that span the entire range of possible 32-bit addresses. In your README, briefly
describe how your algorithm works. Also mention if you notice some characteristic common
between all of the starting addresses.

Deliverables

Submit

 Source code
 readme file

CS330: Operating Systems Page 3

You might also like