0% found this document useful (0 votes)
11 views2 pages

OS'22 NewBylaw MidtermRemake Term1 ModelAnswer

Uploaded by

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

OS'22 NewBylaw MidtermRemake Term1 ModelAnswer

Uploaded by

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

Name: Sec ID:

Faculty of Computer and Information Sciences Examiner: Dr. Ahmed Salah


Ain Shams University Offering Dept.: Computer Science
Subject: CIS353 - Operating Systems Academic year: 2022-2023
Exam: Midterm Remake 18/12/2022 Duration: 50 min
Year: 3rd level – term1
Answer the following questions: (total marks: 15)
WRITE YOUR ANSWERS IN SAME EXAM PAPER
First: General Concepts [3 marks]

Match the statement with the correct expression?


Statements Choice Expressions
1. first part of operating system to load into ( )m
memory during booting a. Ready/Suspend→Ready b. Heap
2. Process is retrieved from disk ( )a c. Running→Ready/Suspend d. Stack
e. Thread Control Block f. BIOS
3. Not valid transition ( )g
g. Blocked→Running h. Blocked→Ready
4. Responsible for storing the local variables ( )d i. Blocked→Block/Suspend j. Data Section
5. Make room for ready process(es) ( )i k. New→Ready/Suspend l. Process Image
m. Kernel n. Boot Loader
6. Contains a snapshot from the CPU registers ( )e

Second: Physical Memory [6 Marks]


10 20 30 40
(Measures: 1 KB = 2 , 1 MB = 2 , 1 GB = 2 , 1 TB = 2 )
A) Paging [3 Marks]
32
Consider a simple paging system with the following parameters: 2 bytes of physical memory; page size of
210 bytes; 216 pages of logical address space. Answer the following:
Question Answer
1. How many bits in the physical address that specify the frame? 22
2. How many bits are in a logical address? 26
3. How many bits are used to index a location inside a frame? 10
B) Segmentation [3 Marks]
In a system using segmentation with NEXT FIT strategy, assume the current state of the physical memory is
as follows (gray: allocated, white: free, start of the RAM is from left). The last placed segment is 20-Mbyte
and is marked with X.
30 5 20 5 5 35 MB 10 20 20 30 MB X 50 MB 20 10
MB MB MB MB MB MB MB MB 20MB MB MB
Consider a new process with the following sequence of segment allocations. For each allocation, indicate
whether it is granted or not (without compaction)? If granted, what is the start address of this allocation?
Requests (in order) Is it granted? (yes/no) Start address (MB)
1. Allocate 25 MB of Segment#0 yes 200 MB
2. Allocate 40 MB of Segment#1 No -
3. Allocate 30 MB of Segment#2 yes 65 MB

1/2
Third: Virtual Memory [6 marks]

A) H/W Role [3 Marks: 1/each]


In a system using a virtual paging, the page size is 4 KB and the virtual address is 64 bits. Each page table
entry requires 32 bits. It’s desired to limit the page table size to one page.

Question Answer
1. What’s the min number of levels for the page tables? 6
2. What’s the number of bits for the index of each level? 2, 10, 10, 10, 10, 10
(Any combination is correct)
3. What’s the minimum size (in Bytes) of internal 212 – 22 x 4 = 4096 – 16 = 4080
fragmentation in page table(s) (if any)?

B) OS Role [3 Marks: 1/each]


In the previous system, assume process A is currently executed and the following snapshot is taken:
TLB Content Process A Resident Set Free Frame List
Head … Tail
Page # Frame # Used Modified Page # (used, modified)
10 20 30 40
20 200 1 0 ➔101,1
10 100 1 1 Frames allocation is done from
300,1
the head. Free frames are
Most recent page is page# 20 201,0 added to the tail.
Assume the replacement policy is modified clock, and process A will request next the following sequence
of page references (r: read, w: write): 10 (r), 40 (r), 10 (w), 30 (r)

Question Answer
Page # (used, modified)
1. What is the final content of Process A ➔100,1
resident set (show the final position of the 400,0
clock pointer)?
301,0

2. How many TLB hits are occur? # hits = 2


Page # Frame # Modified
30 20 0
3. What is the final content of TLB?
10 100 1
0.5 per each
req

Wishing to you all the best isA ☺,


Ahmed Salah

2/2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy