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

OS Final 2014

This document is a final examination paper for the Operating Systems course at the International University - Vietnam National University - Ho Chi Minh City, dated January 11, 2014. It includes general instructions, a grading summary, and five problems covering topics such as memory management, file organization, and scheduling policies. The exam is open book, but mobile phones and laptops are not allowed, and answers must be written on the provided paper.

Uploaded by

Kiệt Phạm
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)
61 views6 pages

OS Final 2014

This document is a final examination paper for the Operating Systems course at the International University - Vietnam National University - Ho Chi Minh City, dated January 11, 2014. It includes general instructions, a grading summary, and five problems covering topics such as memory management, file organization, and scheduling policies. The exam is open book, but mobile phones and laptops are not allowed, and answers must be written on the provided paper.

Uploaded by

Kiệt Phạm
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

INTERNATIONAL UNIVERSITY - VIETNAM NATIONAL UNIVERSITY - HOCHIMINH CITY

FINAL EXAMINATION

Date: 2014-01-11

Duration: 120 minutes

Student Name: Student ID:

Subject: Operating Systems

Dean of School of Computer Science Lecturer


& Engineering

Signature:
Signature:

Assoc. Prof. Tran Manh Ha Assoc. Prof. Tran Manh Ha


GENERAL INSTRUCTIONS

• This is open book examination

• Mobile phone & laptop are disallowed

• You write answers on this paper

GRADING SUMMARY
Problem Max. points Act. points

1 20

2 20

3 20

4 20

5 20

Total 100

Do not forget to enter your name and identification


Problem 1: Multiple choice questions (20pts)
Choose an answer by marking an appropriate box. You earn 2 points for each correct answer and-1 point for
each incorrect answer. The minimum number of points is 0.

true false
It is possible that a process is larger than all of main memory ☒ ☐
The feedback scheduling policy causes unfairness for long processes provided the ☒ ☐
arrival of several short processes
Processes compete for the execution time of the processor using the scheduling policy ☒ ☐
A process changing from the blocked status to the ready status requires the medium- ☐ ☒
term scheduling
The scheduler always chooses a higher priority process over a lower priority process ☐ ☒
no matter what policies used
A process can occupy different regions of main memory when being swapped in and ☒ ☐
out during execution
Page fault increases as number of pages used in process increases ☒ ☐
Thrashing is a situation where an operating system spends most of its time executing ☐ ☒
instructions rather than swapping memory pieces.
Data is organized in block units of a structure file ☒ ☐

A process with the largest remaining execution window will be chosen to suspend ☒ ☐
before process with smallest resident set
Problem 2: Placement strategy (20pts)
A system possesses one megabyte (1024KB) block of memory available. Processes P1 has already been in
memory when processes P2(85KB), P3(160KB), P4(100KB), P5(75KB) and P6(110KB) arrive in this order.
Assume P1 is the last process loaded into memory prior to the arrival of P2, P3, P4, P5 and P6. How these
processes would be placed in memory by the following placement algorithms: (i) first fit, (ii) next fit, (iii) best
fit, (iv) worst fit. If a process cannot be placed into memory, label it as out of memory.
Process Size[KB] Memory Area(KB)
100 1-100
60 101-160
240 161-400
130 401-530
P1 170 531-700
80 701-780
125 782-905
119 906-1024
First Fit Next Fit
Process Size[KB] Memory Area Process Size[KB] Memory Area

Best Fit Worst Fit


Process Size[KB] Memory Area Process Size[KB] Memory Area
Problem 3: Buddy system (20pts)
An operating system uses the buddy system for memory management. Initially the system has a 2048KB block
of memory available, which begins at address 0. Show the result of successive requests (or releases) using
figures.
1. Request 250K
2. Request 260K
3. Request 600K
4. Request 280K
5. Release 1
6. Request 300K
Problem 4: File organization and allocation (20pts)
A UNIX file system uses 12 direct entries, one single indirect entry, one double indirect entry and one triple
indirect entry to store data in an inode. The double indirect entry can store 512 times more data than the single
indirect entry. Given the file system uses 32-bit pointers.
1. Compute the data (pointer) block size and the maximum file size of the file system
2. Compute number of pointer and data blocks used to allocate a 100KB fille
3. Compute number of pointer and data blocks used to allocate a 2MB file

Problem 5: Short-term scheduling policies


Consider the following set of processes and show the execution pattern for the processor scheduling policies:
(i) shortest remaining time (SRT); (ii) highest response ratio next (HRRN); (iii) feedback with q = 2i + 1; (iv)
round-robin (RR) with q = 2i , where i indicates the index of ready queues starting by 0. In case of a tie, apply
the first-come-first-served (FCFS) policy.

Process Name Arrival Time Service Time


A 0 7

B 2 4

C 3 6
D 5 8

E 7 5

You might also like