Operating System
Operating System
UNIVERSITY
1
HIMACHAL PRADESH
NAAC ACCREDIFD
2022-2023
Instructions:
For Section A
There are 5 multiple choice Questions of 1 mark each. All are compulsory.
For Section B
There are 6 Questions of 2 marks each. There is a choice to attempt 5 questions out of 6.
For Section C
There are 4 Questions of 5 marks each. There is a choice to attempt 3 questions out of 4
For Section D
ofT
There are 2 Questions of 10 marks each. There is a choice to attempt 1 question out
Section-A
a) If any user wantsto run multiple processes on the system, then OS will arrange these processes in
such a way that CPU will always be busy. This will increase
(i) memory access time (ii) disk access time
(ii) CPUUtilization (iv) Turnaround time
1
CHITKARA
UNIVERSITY
1
HIMACHAL PRADESH 2022-2023
NAAC ACCREDITFD
the
process P2. Here
shared with another
a database file
d) Suppose a process P1 is making changes to
database file is a:
Entry section
Critical section (i) Remainder section
(i)
Exit section (iv)
(ii)
per unit time is known as.
e) The number of processes completed Throughput
Output
()
(i)
(i) Efficiency (iv) Capacity
Section-B
Section-C
2
CHITKARAal
UNIVERSITY
HIMACHAL PRADESH
2022-2023
Section-D
(Attempt any one question, each question carries 10 marks, subparts (if ony) corry
equal weight age)
Q12.(i) The functions provided by the operating system can be
three categories by giving example of each category.
grouped into a few categories. Explain any
()Consider asystem consisting of the processes listed below in
table, draw a chart illustrating their
execution using shortest job first scheduling algorithm. Calculate the completion time, turnaround
time and waiting time of each process. Also calculate
time.
average waiting time and average turnaround
8 2
1 4
P2
2 2
P3
4 1
P4
2022-2025
CH
2023
Sessional Test l -May,
TY
EVEN SEMESTER
03)
(Total No. of Pages:
Time: M mínutes
ID No Max Marks: 40
Section-A
mork)
(AllQuestions are Compulsory, Eoch question carries 01
deadlock occurrence?
a) Which one of the following is a vísual way to determine the
(i) Starvation graph
Resource allocation graph
(io) Inversion graph (iv) Process graph
d) The operating systern implernent system calis for processes to request access to file contents
Read') and writel) () Open() and close()
Open() and Write() (iv) Read () and Truncate{)
1
CHTESRSa
Soresserl iet
Tata f
Tme nimes
E4342
434
Fie
Tace
ID No:,..
(Total No. of Pages: 03)
Title of theCourse: Operating System
Time: 90 minutes
CourseCode: CSI15 Max. Marks: 40
Instructions;
For Section A
parts. Each part is having four distinct options out of which only one choice will be correct.
There is one question having fiveincorrect answers.
for
There is no negative marking
For SectionB attempt 5 questions out of6
There are 6 Questions of 2 marks each. There is a cnorce t0
For Section C to attempt 3 questions out of 4.
There are 4Questions of 5 marks each. There 1s a cnolce
For Section D Choice to attempt 1 question out of 2.
There are 2 Questions of 10marks each. There is a
Section-A
1
determine the deadlock occurrence?
a) Which one of the following is a visual way to
(i) Resource allocationgraph (i) Starvation graph
(iv) Process graph
(ii) Inversion graph
d) The operating system implement . . . . system calls for processes to request access to file contents.
(iü) Open() and close()
(i) Read() andWrite()
(i) Open() and Write() (iv) Read () and Truncate()
1
to select
a. memory
e) The strategies like the first fit, best fit and worst fit are used queue to put in
Process from a available holes
Process from a queue to put in storage (ii) from asetof
Free hole
Processor to run the next process (iv)
Section-B
(Attempt any 3 questions, each question carries 5 marks, subparts (if any) carry equal weightage)
The file information stored in a computer system can be accessed and read into computer memory in several ways. Explain
briefly the different access mechanism methods to read the files of the computer system.
9
Compare the memory organization schemes of contiguous memory allocation and non-contiguous menmory allocation scheme
with respect to the following issues:
a. External fragmentation
b. Internal fragmentation
C. Simplicity
d. Execution speed
e. Types
10. Afile's attributes vary from one operating system to another. Describe the typical attributes of the files briefly
11 Suppose vouwant maximum utilization of CPU and for this you
need to perform swapping. Explain the technigue of standard
Swapning of two processes using suitable diagram. Let's assume that a user
ctandard hard disk with a transfer rate of 50 MB per second. Compute procesS 100 MB in siize and the backing store is a
is
the actual transfer of the 100-MB process to or from
main memory.
Section-D
(Attempt anyone question, each question carries 10 marks, subparts (if any)carry
equal weightage)
12 Consider a system having n resources and m no. of active
prOcesses. Discuss the necessary conditions for the
deadlock in this system. occurrence of a
let a svstem with five processes PO through P4
and three resource types A, B, and C.
resource type B has five instances, and resource type Chas Resource type A has ten instances
seven instances. Suppose that, at time T0, the
the system has been taken: following snapshot of
2
Process Allocation Maximum
A B C A B C
PO 1 0 7 3
P1 2 3 2
P2 3 2 9 0 2
P3 2 1 1 2 2 2
P4 2 4 3 3
13. State
XYZ
and define virtual memory with respect to memory management. Suppose you are given the role of hardware engineer in
semiconductor company, write the steps which you will foliow in handling a page fault using demand paging technique.
Let the probability of page fault is 0.2,.page fault service time is 8 milliseconds and a memory access time is 200 nanoseconds
for ademand-paged memory. Compute the effective acces time for this memory in nanoseconds?
DO NOT WRITE ANYTHING ON QUESTION PAPER EXCEPT ID NO.
Q2 In some systems it is possible to map part of afile into memory. How is this partial mapping implemented?
Q3 State the mechanism and policy of operating system protection.
Q4 Define external fragmentation. Mention the reason for occurrence of external fragmentation.
Q5 List the advantages of contiguous allocation of disk space for files.
Q6 Draw a neat diagram of the structure of an operating system and explain briefly.
Q7
1Page
Most of the operating systems provide delete and truncate file operations. Is there any dilerence amono/
between these operations? Justify your answer.
CSI15, AY 2022-23
DO NOT WRITE ANYTHING ON QUESTION PAPER EXCEPT ID NO.
SECTION-C (5x5 marks-25 marks)
(Attempr any Squestions , each question carries 0S marks)
QS Ruce conditions are possible in many computer systems. Consider a banking system that maintains an
account balance with two funetions: deposit (amoun) and withdraw (amount). These two functions are
passed the amount that is to be deposited or withdrawn from the bank account balance. Assume that a
husband and wife share a bank account. Concurrently, the husband calls the withdraw ( ) function and the
wife calls deposit ( ). Deseribe how a race condition is possible and a software solution to prevent the race
condition from occurring.
Q9 Distinguish between the following terminologies associated with the operating system and briefly discuss
them:
a) Multiprogramming.
b) Multitasking
c) Multiprocessing system
QlO Using a neat diagram discuss the steps to handle a page fault in demand paging.
QI Summarize the deadlock prevention and deadlock avoidance methods for handling the deadlock.
Q12 Explain the following types of security threats:
a) Trojan horse
b) Worms
c) Denial of service
Q3 Aprocess goes through different states throughout its life cycle. Diseuss the various states of the process
using a suitable diagram.
SECTION-D (2x10 marks=20 marks)
(Atempt any 2 questions, each question carries 10 marks)
Q14 a) Explain the Round Robin scheduling algorithm by using asuitable example and Gantt chart.
b) Consider the following four processes with the length of CPUburst given in milliseconds:
Process Arrival Time Burst Time
Pl
P2 4
P3 2
P4 5
Draw Gantt chart using pre-emptive shortest job first(SJF) scheduling algorithmand find out the completion
time, turnmaround time, waiting time and the average waiting time.
Q15 Consider adisk queue with requests for I/O to blocks on following cylinders:
1, 36, 16, 34, 9, 12
Suppose that the disk drive has 40 cylinders numbered from 0 to 39 and the current head position is at
cylinder no. |1. What is the total distance (in cylinders) that a disk arm moves to satisfy all the pending
requests for each of the following disk scheduling algorithms? Use suitable diagrams to justify your answer.
a. FCFS
b. SSTF
Q16 The operating system services provide functions that are either helpful to the user or ensure the efficient
2Page
operation of the system itself. Discuss any five operating system services that are helpful to user and any two N
services that ensure the efficient operation of system.
CST15, AY 2022-23