0% found this document useful (1 vote)
232 views2 pages

Mid Term Exam 1

This document contains 6 problems related to operating systems concepts: 1) Draw Gantt charts and calculate performance metrics for processes scheduled with SJF, RR, priority, and RR algorithms. 2) Apply the banker's algorithm to determine if an allocation request can be immediately granted. 3) Use a page table to translate logical addresses to physical addresses, and calculate memory capacity. 4) Repeat problem 1 with different process parameters and scheduling algorithms. 5) Apply the deadlock detection algorithm to determine system state under different resource availabilities. 6) Calculate page table entries and required physical address bits for a system with 32-bit logical addresses and 4KB pages supporting 512MB physical memory.

Uploaded by

Anh
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 (1 vote)
232 views2 pages

Mid Term Exam 1

This document contains 6 problems related to operating systems concepts: 1) Draw Gantt charts and calculate performance metrics for processes scheduled with SJF, RR, priority, and RR algorithms. 2) Apply the banker's algorithm to determine if an allocation request can be immediately granted. 3) Use a page table to translate logical addresses to physical addresses, and calculate memory capacity. 4) Repeat problem 1 with different process parameters and scheduling algorithms. 5) Apply the deadlock detection algorithm to determine system state under different resource availabilities. 6) Calculate page table entries and required physical address bits for a system with 32-bit logical addresses and 4KB pages supporting 512MB physical memory.

Uploaded by

Anh
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

MID-TERM EXAMINATION

OPERATING SYSTEMS – INS2076 – Code 1


PART B: PROBLEM SOLVING (55 MARKS)
Note: Students can use only printed documents
_______________________________________________________
1. (20 marks) Consider the following set of processes, with the length of the CPU burst,
arrival time given in milliseconds:
Process Burst Time Arrival Time Priority
P1 3 0 2
P2 8 4 1
P3 12 6 4
P4 4 8 5
P5 5 10 3
a. Draw four Gantt charts that illustrate the execution of these processes using the
following scheduling algorithms: preemptive SJF and RR (quantum = 2ms).
b. What is the turnaround time of each process for each of the scheduling algorithms in
part a?
c. What is the waiting time of each process for each of these scheduling algorithms?
d. What is the response time of each process for each of these scheduling algorithms?

2. (15 marks) Consider the following snapshot of a system:


Allocation Max Available
ABCD ABCD ABCD
P0 3014 5117 1002
P1 2210 3211
P2 3121 3321
P3 0510 4612
P4 4212 6325
Answer the following questions using the banker’s algorithm:
a. What is the current state of the system ?
b. If a request from process P1 arrives for (1, 0, 0, 2), can the request be granted
immediately?

3. (20 marks) Consider a computer system with 12 bits for virtual addresses and physical
addresses, 256 byte page size. Using the following page table:
Page no. Frame no.
0 – a. Find the corresponding physical addresses of the following logical
1 2 addresses (hexa number): 9EF, 700, 0FF
2 12
3 10 b. If the memory unit size is 1 byte, calculate the capacity of RAM,
4 – the number of frames.
5 4
6 3
7 –
8 11
9 0
MID-TERM EXAMINATION
OPERATING SYSTEMS – INS2076 – Code 2
PART B: PROBLEM SOLVING (55 MARKS)
Note: Students can use only printed documents
_______________________________________________________

4. (20 marks) Consider the following set of processes, with the length of the CPU burst,
arrival time given in milliseconds:
Process Burst Time Arrival Time Priority
P1 3 0 2
P2 8 5 1
P3 12 6 4
P4 4 8 5
P5 5 10 3
e. Draw four Gantt charts that illustrate the execution of these processes using the
following scheduling algorithms: preemptive priority (a larger priority number
implies a higher priority), and RR (quantum = 4).
f. What is the turnaround time of each process for each of the scheduling algorithms in
part a?
g. What is the waiting time of each process for each of these scheduling algorithms?
h. What is the response time of each process for each of these scheduling algorithms?

5. (15 marks) Consider the following snapshot of a system:


Allocation Request
ABCD ABCD
P0 0022 0012
P1 1001 1140
P2 1354 2356
P3 0532 2132
P4 0114 1053
Answer the following questions using the deadlock detection algorithm:
a. What is the current state of the system if Available=(1, 0, 2, 2)?
b. What is the current state of the system if Available=(1, 1, 2, 2)?

6. (20 marks) Consider a computer system with a 32-bit logical address and 4-KB page
size. The system supports up to 512 MB of physical memory. How many entries are
there in each of the following:
a. A conventional, single-level page table
b. An inverted page table
c. How many bits are required in the physical address?

You might also like