You are on page 1of 7

University of Sargodha

BS 5t Terp Exu mlnation 2018

Sublect:LT Paper. Oosratiog Syalem (CMP:3621)

Time Allowed:2:30 Hour Maximum Mar

Note: Objective part is compulory. Attempt any three questions fromsubjective part.

Objective Part (Compulsory)

Q.1. Write short answers of the following in 2-3 lines cach. (2*12

i. Describe the objective of multiprogramming.

ii. What are types of threads?

iii. What is multitasking?

iv. What are various scheduling queues?

v. What is interrupt?

vi. Write down the name of primary thread libraries.

vii. Differences between logical and physical addresses?


vill. What are necessary conditions which can lead lo a dedlock situation in a system?

ix What are the states of a process?

x. What is thrashing?

xi. What is Process Synchronization?

xii. What is difference between preemplive and non-preemptive scheduling?

Subjective Part (12*3)

Q.2. Explain different Operating System Services

Q.3. (a)What are the differences between paging and segmentation?


(b)What is fragmentation? Different types of fragmentation?
Q.4. Explain Multilevel Queue and Multilevel Feedback Queue with example.

Q.5. Consider the following page reference string: 6,7,0,2,1,2,3,4,2,


1,5.6,2,1,2,3,7,6,3.2,1,2,3,6.How many page faults would occur for the following
replacement algorithms,assuming three,four and six frames? Remember that all frames are
initially empty,so your first unique pages will cost one fault each.

·LRU replacement

FIFO replacement

· Optimal replacement

Q.6. Write about deadlock conditions and banker's algorithm in details.

University of Sargodha
BS 5th Term Examination 2019
Sublect: Computer Science Paper: Operatine System (CMP:3621)

Time Allowed:2:30 Huurs Masimum Marks:60

Objective Part (Compulsory)

Q.NO.1-Answer the following questions in 2-3 lines having 2 marks each [12x2=24]

1. What is multiprogramming

2. Explain long term schedulor

3.Under what circumstances do page faults occur?

4. Different types of Real-Time Scheduling?

5 What are types of threads?

6. What is a ready queue?

7.Differentiate between LFU Algorithm and MFU algorithms

8. What is the Processor Affinity

9. What is Semaphores

10.What is demand paging?

11.What is spooling?

12.What are turnaround time and rosponse time?

Subjective Part

Note:Attempt any three Questions.All carry equal marks [12x3=36]

Q No.2 Compare the memory organization schemes of contiguous memory allocation,pure segmentation, and pure paging with respect to the following
issues:
a. External fragmentation

b.Internal fragmentation

c. Ability to share code across processos

Q.No.3. a) Differentiate between Multiprocessors systems and Clustered Systems

b) Explain different types of System Calls.

Q.No.4 a) what is semaphore How semaphore works for synchronizations of the processes?

b) Explain Process Creation and termination

Q.No.5 Consider the lollowing page reference string: 4. 3, 1, 2.1.1.1, 3, 4. 2, 1. 5, 6. 2. 1.2.

3.7.6,3.2.1.2.3,6. How many page faults would occur Optimal and Least Recently Used Page Replacoment algorithms with (a) Five frames (b) Six frames.
Remember that are frames are initially empty.

Q.No.6. Consider the following set of processes, with the length of the CPU burst given in milliseconds:

Vist

http://tshahab.blogspol.com

for more

The Process are assumed to arrive in te order P1, P2. p3. p4. p5 all at time 0.

a) Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, non-preemptive priority (a
smaller priority number implies a higher priority),and RR (quantum= 1).

b) Obtain the average waiting time.

University of Sargodha

M.Sc.2Term Examination 2012


Sublest:Information Teshnolosz Paper:
Operatio Svitem (CMP Process Burst Time Prlority -3611)

Ime Allowed: 2:30 P1 10 2 Hours Maxlmum


Marks:80 P2 8 1
ate: Objective part ia P3 2 5
compulsory. Attempt any chree questions
from subjective part.
P4 9 3
P5 Objective
4 Part (Compulory)
4

Write short answers of the following in 2-3 lines cach on your answer sheet. (16*2)
Suppose there is an organization which hired a person for dividing tasks among other persons.Which multiprocessing onvironment
does this organization depict?

Draw Interrapy Timeline clenly mentioning interrupt occurred by aprocess.

What exacily do you mean by CONTEXT in context switching?


Differentiate between Concurrenyand Parallellam with example.

Mention at least 4 Syalem Calls when you enter a command that coples a file from one path to another.

Why do we calla program passive entity and a process active entity?

Differentiate between progress and bounded-waiting with exampie.

Why SIF can't be used in real-time environment when you don'1 have execution history of the programs?Write names of all
preemptive and non-preemptive scheduting policies.

Suppose that we have free segments with sizes: 6,17.25.14, and 19. Placc a program with size 13kB in the free segment using first-
fit,best-fit and worst fit?

Subjective Part (3*16)


L Discuss the advantages and disadvantages of guarantecing rellable transfer of data between modules in the STREAMS
abstrection.

3. a)Explain when a Deadlock can and when it cannot occur in the below scenario when two processes(PO,P1)are competing for
semsphore S=1 and Q-1. (8)

n
Pa

vast(S): vait(q);
va1t(Q). wait():

migmal(s): algmal(Q):

m1[ml(Q); e1gal(0):
b.How Peterson's solution prescrvesJ properties for critical section problem k.e.Mfuul erchalam,Progress and Bounded-
Waiting? (8)

) For the data given below:dlfocution

dlfocut
dnallable
ion

Neol
ABC ABC
ABC

b
e
l
o 010 743 230
w
:
P

P
1
302 020

302P 600

P
211 011
,
P 4
4 002 31
Apply Banker's algorithm and argue with reasoning whether requests should be granted or not.

L. Can request for (3.3.0)by Pa be granied? (4)

i. Can request for (0,2,0) by Po be granted? (6)b)Compare the memory organization schemes
of Contiguous Memory Allocation,Segmentation,and

Paging with respect to the following issues: (6)

i. External fragmentation ii.Internal fragmentation


Suppose m=5(25bytes),n=1,Physical Address Space=144 bits.

i. What is Logical Address Space? (2)

i. What is Page Size? (2)


m What is size of Page Number?

(3)
iv. What are total number of pages in Main Memory? (3)

V. How many pages required to lond this process in Main Memary? (3)

vi. How many total Pages in Main Memory? (3)

vil. IfOS takes 5 pages, how many others pages left for user processes? (2)
1)Consider the following page reference using three frames that are initially empty. Find the page faults sing Optimal
algorithm,where the page reference sequence.7.0.1.2.0.3.0,4.2,3,0,3,2,1,2,0,1,7,0.1? (6)

)Apply LRU on dataset provided in Question 6 part a and compare the resuls. (10)

University ofSargodha 25616


BS 5th Term Examination 2020

Subisct: Computer Science Paper: Operating System(CMP-3621)

Time Allowed: 2:30 Hours Maximum Marks: 60

Note: Objective part is compulsary.Attempt any three questions from subjective part.

Objective Part (Compulsory)

Q.1. Write short answers of the following in 2-3 lines cach on your answer shect. (12*2)
i. What is the difference between a Page and a Frame?

ii.Which one of the following scheduling algorithm could result in starvation? FCFS, SJF.Round Robin.
iil. What does it mean to Preempt a process?

iv.What is Belady's anomaly?


v. Differentiate between concurrency and parallelism.

vi.What exactly do you mean by CONTEXT in context switching?

vii.Differentiate between preemptive and non-preemptive scheduling


vili. Why do we call a program passive entity and a process active entity?

ix. Differentiate between progress and bounded-waiting.

x. What advantage is there in having different time-quantum, sizes at different evels of a multilevel queuing
system?
xi.What is the differences between deadlock avoidance,prevention and detection?

xii. FIFA and LRU both use previous information in page replacement policy.How is the ane different from another then?

Subjective Part (3*12)

Q.2. For a data given below:

Process Arrival Time Burst Time

P1 0 8

P2 0 4

P3 2

P4 10 1
Calculate following by applying SJF algorithm and also draw Gantt charts for each.

a.Average Waiting Time (5)

b.Average Turnaround Time

c. Average Response Time (2)(6)


Q.3. a)What are the several possible remedies for deadlock in dining-philosopher problem?

b)Deseribe the differences among short-term,medium-term,and long-term scheduling. (6)

Q.4. For the data given below:

Need dvailabl

:Allocatio
ABC ABC
n ABC

P。 010 743 230

P1 302 020

P2 302 600

P3 211 011

Pa 002 431
Apply Banker's algorithm and argue with reasoning whether requests should be granted or not.

a. Can request for (3,3,0)by P4 be granted? (6)(6)

b.Can request for (0,2,0)by Po be granted?

Q.5. a)Consider thefollowing page reference using three frames that are initially cmpty.Find the page faults using Optimal
algorithm,where the page reference sequence:

7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,17 (5)(7)

b) Apply LRU on datase' pruvided in Question 5 part a,and compare the results.
rShahab.blogspot.com [6]
Q.6. Compare the memory organization schemes of contiguous memory allocation,segmentation,and paging with respect to
the following issues:

a. External fragmentation [6]

b. Internal fragmentation

rShahab.blogspot.com [6]

You might also like