0% found this document useful (0 votes)
187 views6 pages

COMSATS University Islamabad: Terminal Examination, SPRING 2021

This document contains a 3-part question regarding operating systems concepts. Part 1 has 5 multiple choice questions about paging for memory management. Part 2 has 2 questions about segmenting memory allocation using best-fit. Part 3 asks to calculate page faults using LRU page replacement on a given reference string with a 4 frame quota. The questions assess CLO 4 on operating systems memory management techniques.

Uploaded by

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

COMSATS University Islamabad: Terminal Examination, SPRING 2021

This document contains a 3-part question regarding operating systems concepts. Part 1 has 5 multiple choice questions about paging for memory management. Part 2 has 2 questions about segmenting memory allocation using best-fit. Part 3 asks to calculate page faults using LRU page replacement on a given reference string with a 4 frame quota. The questions assess CLO 4 on operating systems memory management techniques.

Uploaded by

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

COMSATS University Islamabad

Department of Computer Science

Terminal Examination, SPRING 2021

Class: - BSCS/BSSE-4
Marks: - 20
Subject: - Operating Systems Concepts/Operating Systems
Time: - 50 Minuets
Dated: - June 29, 2021

============= Question No.1 (Marks 10) ============== (CLO 4)

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)

WHOEVER IS HAPPY WILL MAKE OTHERS HAPPY TOO


5. Is there any internal fragmentation occurs after allocating the memory? If yes, write its
amount. (2)
Note: In part 1,2 and 3 briefly explain your answer
============= Question No.2 (Marks 4) ============== (CLO 4)

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)

Logical Address Physical Address

(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)

You might also like