COMSATS University Islamabad: Terminal Examination, SPRING 2021
COMSATS University Islamabad: Terminal Examination, SPRING 2021
Class: - BSCS/BSSE-4
Marks: - 20
Subject: - Operating Systems Concepts/Operating Systems
Time: - 50 Minuets
Dated: - June 29, 2021
In an OS, paging is used for memory management. The system consists of a total of 512 bytes. The
frame size is 8 bytes then
1. What is minimum length of physical address (in bits) that can manage this memory? (2)
2. The maximum size of a program that can run on this system is 64 bytes. What is the
minimum length of logical address (in bits) that is required to manage the memory? (2)
3. If the length of logical address is 7 bits then what is the maximum size of the program that
the system can manage? (2)
4. Currently, the list of free frames is: 12, 29, 5, 12, 15, 17, 61, 46, 54, 23
Suppose the string (of 43 characters) given below is required to be loaded into memory
(each character required one byte of memory). Write the page table showing memory
allocation. (2)
Consider an operating system where the segmentation is used for memory management. The OS
allocates the memory to program segments using the best-fit algorithm. Suppose, the system is
required to allocate memory to a program A of size 120 bytes (having 4 segments of size 30 bytes,
45 bytes, 28 bytes and 17 bytes respectively) while the current memory status is given by the
following diagram (while boxes show the free memory holes):
0 112 164 217 264 282 324 378 399 412 456 471 484 504 511
1. Write the segmentation table showing the memory allocation to the program A using BEST-
FIT (2)
2. Translate the following logical addresses to physical addresses (2)
(0,19)
(2, 21)
(3, 12)
(4, 8)
============= Question No.3 (Marks 6) ============== (CLO 4)
During the execution of a process various pages are referenced in the given sequence:
1, 2, 5, 2, 3, 5, 4, 3, 6, 0, 4, 5, 6, 1, 2, 7, 8, 5, 4, 3
Suppose the quota of frames is 4 then compute the number of page faults when the page-
replacement is done using Least Recently Used Algorithm. (6)