Os Merged

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

ROLL NO.

G.L. BAJAJ INSTITUTE OF TECHNOLOGY & MANAGEMENT


GREATER NOIDA
MCA (II SEM)
Pre-University Test (EVEN SEM 2022-23)
Subject Name: Operating System (Subject Code:KCA203)
Faculty Name: Mr. Atul Kumar Rai, Mr. Virendra Kumar, Dr. Divya Mishra
Time: 3:00Hrs ` Max. Marks: 100
Note: (i) No student will be allowed to leave the examination room before end of exam.
(ii) Diagram should be neat and clean.
(iii) Mention Question number/section correctly.
(iv) Be precise in your answer.
(v) Do not write anything on question paper except Roll number.
Course Outcomes:
Following are the course outcomes of the subject: -
CO Code Course Outcome(CO) Bloom's Level

CO 1 Explain main components, services, types and structure of Operating Systems K2


Apply the various algorithms and techniques to handle the various concurrency
CO 2 K3
control issues.
CO 3 Compare and apply various CPU scheduling algorithms for process execution. K2
Demonstrate architecture, functioning & services of the Internet and basics of
CO 4 K3
multimedia.
Illustrate the emerging trends and technologies in the field of Information
CO 5 K5
Technology.

Section: A
1. Attempt all questions. (2*10= 20)
Q.No. Questions Marks CO BL
a) Describe operating system services. 2 CO1 K2
b) Differentiate between hard real time system and soft real time system. 2 CO1 K3
c) Discuss the use of mutex. 2 CO2 K2
d) Describe the race condition for cooperating processes. 2 CO2 K2
e) Explain Process Control Block. 2 CO3 K2
f) Compare and contrast single threaded and multithreaded process. 2 CO3 K5
g) Illustrate conditions under which a deadlock condition may arise. 2 CO4 K2
h) Which page replacement algorithm suffers from Belady’s anomaly? 2 CO4 K1
i) What is indexed file access method? 2 CO5 K1
j) Explain logical address space and physical address space diagrammatically. 2 CO5 K2

Section: B

2. Attempt any three of the following (3*10=30)

Q.No. Questions Marks CO BL


a) Explain the following terms and their working with diagram 10 CO1 K2
i) Buffering ii) Spooling iii) Distributed system iv) time sharing
b) Describe the operating system functions. Differentiate between monolithic and 10 CO1 K2
microkernel systems.
c) Demonstrate the critical section problem. Write the Peterson’s solution to solve 10 CO2 K4
the critical section problem.
d) Illustrate the process states and process transition diagram. 10 CO3 K3

e) Explain the three methods available for allocating disk space. Discuss the pros 10 CO5 K2
and cons in different disk allocation methods.

Section: C

3. Attempt any one question (1*10=10)

Q.No. Questions Marks CO BL


a) Demonstrate the dinning philosopher’s problem and give solution using 10 CO2 K4
semaphores. Write the structure of philosopher.
b) Solve and calculate Average Waiting time and Average Turn around time using 10 CO3 K4
Shortest Remaining Time First algorithm for given schedule:
Process Arrival Time (Units) Burst Time (Units)
P0 5 5
P1 2 10
P2 0 15
P3 3 8

4. Attempt any one question (1*10=10)

Q.No. Questions Marks CO BL


a) Discuss interprocess communication. Also explain producer consumer 10 CO2 K2
problem in detail.
b) Examine a system with five processes P0,P1,P2,P3,P4 and three resource types 10 CO3 K4
A,B,C. A has 10, B has 5 and C has 7 instances.

Process Allocation Max Available


A B C A B C A B C
P0 0 1 0 7 5 3 3 3 2
P1 2 0 0 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
Applying Banker’s algorithm, find the solution of the following:
i) What will be the content of Need matrix?
ii) Is the system in safe state? If yes, then what is the safe sequence?
iii) What will happen if the resource request (1, 0, 0) for process P0?
Can the system accept this request immediately?

5. Attempt any one question (1*10=10)

Q.No. Questions Marks CO BL


a) Explain virtual memory concept. Discuss page replacement algorithm in 10 CO4 K2
brief.
b) Consider the six memory partitions of size 200 KB, 400 KB, 600 KB, 500 10 CO4 K3
KB, 300 KB and 250 KB. These partitions need to be allocated to four
processes of sizes 357 KB, 210 KB, 468 KB and 491 KB in that order.
Perform the allocation of processes using-
i) First fit algorithm
ii) Best fit algorithm
iii) Worst fit algorithm
6. Attempt any one question (1*10=10)

Q.No. Questions Marks CO BL


a) Illustrate deadlock detection algorithm. Explain with suitable example. 10 CO3 K3

b) Consider the following page reference string: 10 CO4 K3


1,2,3,4,2,4,5,6,3,1,2,3,4,6,4,5,2,6
Calculate the no. of page faults, Hit Ratio, Miss Ratio using FIFO, LRU
and Optimal page replacement algorithm. Assume the no. of frames as
three.

7. Attempt any one question (1*10=10)

Q.No. Questions Marks CO BL


a) Write the short notes on the following: (3+3+4=10) CO4 K1
i) Thrashing ii) Compaction iii) Segmentation
b) Interpret Redundant array of Independent disks in respect of disk storage. 10 CO5 K5
Discuss RAID level 0, RAID level 1 and RAID level 3 with suitable
diagram.

K1 K2 K3 K4 K5

12 14

40

62

42

Checked By
(Head of Department)
www.aktuonline.com

Printed Pages: 02 Sub Code: BC203 / NBC203

Paper Id: 1 9 4 2 0 3 Roll No.


MCA (DUAL DEGREE)
(SEM-II) THEORY EXAMINATION 2017-18
OPERATING SYSTEM
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If require any missing data; then choose suitably.

SECTION A

1. Attempt all questions in brief. 2 x 10 = 20


a. What is the difference between Hard Real Time System and Soft Real Time System?
b. What is the Kernel?
c. What is the advantage of Multiprogramming?
d. What do you mean by Time-Sharing Systems?
e. What are the different types of Multiprocessing?
f. What are the design goals of an Operating System?
g. What is a Process?
h. What is Process Control Block (PCB)?
i. What is meant by Context Switch?
j. What are System Calls?
www.aktuonline.com

SECTION B

2. Attempt any three of the following: 10 x 3 = 30


a. What is a process and process table? What are different states of process
b. What is deadlock? What are the necessary conditions for deadlock?
c. What is Virtual Memory? How is it implemented?
d. Define and differences between mutex and semaphore?
e. Define process synchronization. Discuss critical section problem.

SECTION C
3. Attempt any one part of the following: 10 x 1 = 10
(a) How many type of inter process communication. Discuss producer consumer problem.
(b) Define CPU scheduling. Why do we need scheduling?

4. Attempt any one part of the following: 10 x 1 = 10


(a) Consider the following set of processes, with the arrival times and the CPU-burst times
given in milliseconds

Process Arrival time Burst Time


P1 0 5
P2 1 3
P3 2 3
P4 3 1
om

What is the average turnaround time for these processes with the preemptive shortest
e.c

remaining processing time first (SRPT) algorithm?


in
nl
o
tu
.ak

(b) What is deadlock detection algorithm? Explain it with example.


w
w
w
://
tp
ht
www.aktuonline.com

5. Attempt any one part of the following: 10 x 1 = 10


(a) Discuss Deadlock avoidance using Banker’s algorithm.
(b) Define memory management. How many type of partitions. Discuss it.

6. Attempt any one part of the following: 10 x 1 = 10


(a) Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If
the page size is 4KB, what is the approximate size of the page table?
(b) Define Paging scheme with an example in detail.

7. Attempt any one part of the following: 10 x 1 = 10


(a) Discuss protection and security in Window NT.
(b) Define Access matrix. How it can be implemented.
www.aktuonline.com

om
e.c
in
onl
tu
.ak
w
w
w
://
tp
ht
Printed Page: 1 of 3
Subject Code: KCA203
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

MCA
(SEM II) THEORY EXAMINATION 2021-22
OPERATING SYSTEMS

Time: 3 Hours Total Marks: 100


Note: Attempt all Sections. If you require any missing data, then choose suitably.
SECTION A
1. Attempt all questions in brief. 2x10 = 20
Qno Questions CO
(a) Describe all operating system services. 1
(b) Defend timesharing differ from multiprogramming? If so, how? 1
(c) Discuss the uses of mutex? 2
(d) Describe race condition for cooperating processes. 2
(e) Compare and contrast Single-threaded and multi-threaded process. 3
(f) Distinguish between CPU bounded, I/O bounded processes. 3
(g) What are the conditions under which a deadlock situation may arise? 4
(h) What is resource-allocation graph? 4
(i) Define Belady’s Anomaly. 5
(j) Explain logical address space and physical address 5space
diagrammatically.
SECTION B

2. Attempt any three of the following: 10x3 = 30


Qno Questions CO
(a) Describe operating system functions. Also, explain monolithic, and 1
microkernel systems.
(b) Define critical section problem. Write the Peterson’s solution to solve 2
critical section problem.
(c) Illustrate process states and process transition diagram. 3
(d) Discuss the following storage placement strategies with suitable 4
examples:
(i) Best fit
(ii) First fit
(iii)Worst fit
(e) What are the three methods for allocating disk space? Explain. 5
SECTION C
3. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Explain the following terms and their working with diagram 1
i) Buffering ii) Spooling iii) Time sharing iv) Distributed system
(b) Differentiate between multiprocessor, multiuser, and Batch operating 1
system.

4. Attempt any one part of the following: 10x1 = 10


Qno Questions CO
(a) Interpret Dining philosopher problem. 2
(b) A shared variable x, initialized to zero, is operated on 2 by four
concurrent processes W, X, Y, Z as follows. Each of the processes W
Printed Page: 2 of 3
Subject Code: KCA203
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

MCA
(SEM II) THEORY EXAMINATION 2021-22
OPERATING SYSTEMS

and X reads x from memory, increments by one, stores it to memory,


and then terminates. Each of the processes Y and Z reads x from
memory, decrements by two, stores it to memory, and then terminates.
Each process before reading x invokes the P operation (i.e., wait) on a
counting semaphore S and invokes the V operation (i.e., signal) on the
semaphore S after storing x to memory. Semaphore S is initialized to
two. What is the maximum possible value of x after all process’s
complete execution?

5. Attempt any one part of the following: 10x1 = 10


Qno Questions CO
(a) Illustrate process states and process transition diagram. 3
(b) Consider the set of 4 processes whose arrival time and burst time are 3
given below-
Burst Time
Process Arrival
No. Time CPU
I/O Burst CPU Burst
Burst

P1 0 3 2 2

P2 0 2 4 1

P3 2 1 3 2

P4 5 2 2 1

If the CPU scheduling policy is Shortest Remaining Time First,


calculate the average waiting time and average turnaround time.

6. Attempt any one part of the following: 10x1 = 10


Qno Questions CO
(a) Considering a system with five processes 0 through
P P4 and three 4
resources of type A, B, C. Resource type A has 10 instances, B has 5
instances and type C has 7 instances. Suppose at0 following time t
snapshot of the system has been taken.
Printed Page: 3 of 3
Subject Code: KCA203
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

MCA
(SEM II) THEORY EXAMINATION 2021-22
OPERATING SYSTEMS

Then,
I. What will be the content of the Need matrix?
II. Is the system in a safe state? If Yes, then what is the safe
sequence?
III. What will happen if process P1 requests one additional instance
of resource type A and two instances of resource type C?

(b) Apply banker’s algorithm for a system in which, there are three types of 4
resources: E, F and G. Four processes P0, P1, P2 and P3 execute
concurrently. At the outset, the processes have declared their maximum
resource requirements using a matrix named Max as given below. For
example, Max [P2, F] is the maximum number of instances of F that
P2 would require. The number of instances of the resources allocated to
the various processes at any given state is given by a matrix named
Allocation. Consider a state of the system with the Allocation matrix as
shown below, and in which 3 instances of E and 3 instances of F are the
only resources available.

Find the safe sequence.

7. Attempt any one part of the following: 10x1 = 10


Qno Questions CO
(a) A system uses 3-page frames for storing process pages in5 main
memory. Assume that all the page frames are initially empty. What is
the total number of page faults that will occur while processing the
page reference string given below for FIFO, LRU and Optimal Page
Replacement algorithm? Also calculate the hit ratio and miss ratio.
4 , 7, 6, 1, 7, 6, 1, 2, 7, 2
(b) Explain the three methods available for allocating disk space? 5

You might also like