0% found this document useful (0 votes)
17 views13 pages

Operating System 1

Uploaded by

Faizan Mujahid
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)
17 views13 pages

Operating System 1

Uploaded by

Faizan Mujahid
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/ 13

UNIVERSITY OF THE PUNJAB

Fifth Semester 2013 Roll NO. _________________


Examination: B.S. 4 Years Programme

PAPER: Operating Systems (CMP) TIME ALLOWED: 2 hrs. & 30 mins.

Course Code: IT-306 MAX. MARKS: 50

Attempt This Paper on Separate Answer Sheet provided.


Part-II (Short Question)
QUESTION # 2 [20 marks]

1. What is difference between microkernel and layered operating system structures?


2. In multithreaded application Many-to-One model is implemented. How does this application handle the threads?
3. Why every thread has its own stack?
4. What is zombie state of a process?
5. Name the inter-process communication tools used in UNIX operating system?
6. What does a child process inherits from its parent process?
7. What are the different techniques for the evaluation of scheduling algorithms?
8. Mention the three problems that may be caused by the wrong initialization or placement of wait ( ) and signal ( )
operations in the use of semaphores.
9. What do you mean by a busy waiting semaphore or spin lock?
10. In a 64 bit machine, with 16GB RAM and 8KB page size. How many entries will there be in the page if it is an inverted
page table?

Part-III (Subjective)

QUESTION # 3 [10 marks]

Consider the following set of Processes, with the length of CPU time given in microseconds. Draw the Gantt chart, using Round
Robin Algorithm when Time Slice = 3 microseconds. Also compute the waiting and turnaround times of each process.

Process Arrival Time Burst Time


P1 0 7
P2 4 5
P3 5 4
P4 7 4
P5 12 6
P6 17 3
QUESTION # 4 [10 marks]

Consider three resource types in a system with following number of instances.

A (14 instances), B (10 instances), C (20 instances)

System State is as shown below, find safe sequence using Bankers algorithms.

PROCESS MAX ALLOCATION AVAILABLE


A B C A B C A B C
P0 6 10 14 0 2 0 4 6 6
P1 4 4 6 0 0 4
P2 4 0 18 4 0 6
P3 4 4 4 2 2 4
P4 6 6 8 4 0 0
QUESTION # 5 [2x5 = 10 marks]

1. Consider a system with 64-bit logical address. This system implements paging with 2 KB page size. Compute: lengths
of p and d fields in the logical address.
2. In a paging system, logical address space is 4 GB and the page size is 4 KB. Available physical memory is 16 GB.
Compute: length of logical address and length of f field in the physical address.
3. If the hit-ratio to a TLB is 98%, and it takes 10 nanoseconds (nsec) to search the TLB and 100 nsec to access the main
memory, then what must be the Effective Memory Access Time in nanoseconds?
4. If the total number of available frame is 50, and there are 2 processes; one of 50 pages and the other of 35 pages, then
how much memory would be proportionally allocated to each of these processes?
5. What is meant by Belady’s Anomaly? Why stack based algorithms do not suffer from Belady’s Anomaly?
UNIVERSITY OF THE PUNJAB
Fifth Semester 2014 Roll NO. _________________
Examination: B.S. 4 Years Programme

PAPER: Operating Systems (CMP) TIME ALLOWED: 2 hrs. & 30 mins.

Course Code: IT-306 MAX. MARKS: 50

Attempt This Paper on Separate Answer Sheet provided.


Part-II (Short Question)
QUESTION # 2 [5x4=20 marks]

1. Explain the difference between layered and module based operating system structure?
2. Describe the difference among short-term, medium term, and long term scheduling.
3. What are the two differences between kernel level thread and user level thread? Under what circumstance is one type
better than other?
4. In a multithreaded application, if we implement Many-to-Many model then how does this application handle the
threads?
5. Mention the three problems that may be caused by the wrong initialization or placement of wait ( ) and signal ( )
operations in the use of semaphores.

Part-III (Subjective)

QUESTION # 3 [10 marks]

Consider the following set of Processes, with the length of CPU time given in microseconds. Draw the Gantt chart, using Round
Robin Algorithm when Time Slice = 4 microseconds. Also compute the waiting and turnaround times of each process.

Process Arrival Time Burst Time


P1 0 8
P2 3 6
P3 6 8
P4 10 10
P5 15 7
QUESTION # 4 [10 marks]

Consider three resource types in a system with following number of instances.

A (8 instances), B (5 instances), C (10 instances)

System State is as shown below, find safe sequence using Bankers algorithms.

PROCESS MAX ALLOCATION AVAILABLE


A B C A B C A B C
P0 3 5 7 0 1 0 3 3 3
P1 2 2 3 0 0 2
P2 2 0 9 2 0 3
P3 2 2 2 1 1 2
P4 3 3 4 2 0 0
QUESTION # 5 [2x5 = 10 marks]

1. Consider a system with 64-bit logical address. This system implements paging with 1 KB page size. Compute: lengths of
p and d fields in the logical address.
2. In a paging system, logical address space is 8 GB and the page size is 2 KB. Available physical memory is 46 GB.
Compute: length of logical address and length of f field in the physical address.
3. If the hit-ratio to a TLB is 90%, and it takes 20 nanoseconds (nsec) to search the TLB and 200 nsec to access the main
memory, then what must be the Effective Memory Access Time in nanoseconds?
4. If the total number of available frame is 60, and there are 2 processes; one of 50 pages and the other of 40 pages, then
how much memory would be proportionally allocated to each of these processes?
5. What is meant by Thrashing?
UNIVERSITY OF THE PUNJAB
Fifth Semester 2015 Roll NO. _________________
Examination: B.S. 4 Years Programme

PAPER: Operating Systems (CMP) TIME ALLOWED: 2 hrs. & 30 mins.

Course Code: IT-306 MAX. MARKS: 50

Attempt This Paper on Separate Answer Sheet provided.


Part-II (Short Question)
QUESTION # 2 [5x4=20 marks]

1. What are the main differences between operating systems for mainframe computers and personal computers?
2. Why is it important for the scheduler to distinguish I/O-bound programs from CPU-bound programs?
3. What are the four necessary conditions for a deadlock to occur?
4. Explain the difference between internal and external fragmentation.
5. What is the copy-on-write feature and under what circumstances is it beneficial to use this feature?

Part-III (Subjective)

QUESTION # 3 [10 marks]

Consider the following set of Processes, with the length of CPU time given in microseconds. Draw the Gantt chart, using Round
Robin Algorithm when Time Slice = 3 microseconds. Also compute the waiting and turnaround times of each process.

Process Arrival Time Burst Time


P0 0 7
P1 4 7
P2 6 9
P3 11 8
P4 14 6
QUESTION # 4 [10 marks]

Consider three resource types in a system with following number of instances.

A (16 instances), B (10 instances), C (10 instances)

System State is as shown below, find safe sequence using Bankers algorithms.

PROCESS MAX ALLOCATION AVAILABLE


A B C A B C A B C
P1 6 10 7 0 2 0 6 6 3
P2 4 4 3 0 0 2
P3 4 0 9 4 0 3
P4 4 4 2 2 2 2
P5 6 6 4 4 0 0
QUESTION # 5 [2x5 = 10 marks]

1. Consider a system with 33-bit logical address. This system implements paging with 2 KB page size. Computer: lengths
of p and d fields in the logical address.
2. In a paging system, logical address space is 16 GB and the page size is 4 KB. Available physical memory is 8 GB.
Compute: length of logical address and length of f field in the physical address.
3. In a paging system, logical address space is 4 GB and the page size is 4 KB. Page table entry size is of 32-bit. How many
levels of paging will be there?
4. If the hit ratio to a TLB is 95 %, and it takes 30 nanoseconds (nsec) to search the TLB and 300 nsec to access the main
memory, then what must be the Effective Memory Access Time in nanoseconds?
5. If the total number of available frames is 120, and there are 3 processes; one of 50 pages, second of 60 page and the
third of 40 pages, then how much memory would be proportionally allocated to each of these processes?
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner

You might also like