0% found this document useful (0 votes)
19 views14 pages

Cs Pyqs

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)
19 views14 pages

Cs Pyqs

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/ 14

[This question paper contains 8 printed pages.

]
Your Roll No.......****

Sr. No. of Question Papcr : 4003 H

Unique Paper Code : 2342572401

Name of the Paper : Operating Systems

Name of the Course B.Sc. (Multidisciplinary


Courses of Study with
Three Core Disciplines
under UGCF 2022)

Semester : IV

Duration: 3 Hours Maximum Marks: 90

Instructions for Candidates

1. Write your Roll No. on the top immediately on receipt


of this question paper.

2. Section A is Compulsory.

3. Answer any four Questions from Section B.

4. Parts of a question must be answered together.


4003
2

Section A

1. (a) Mention names of any two mass storage devicee


(1)
(b) Differentiate between mv and cp commands in
Unix/Linux. (2)

(c) List two main functions of the Operating System.


(2)

(d) What is a thread? What are the benefits of using


threads in a programming environment? (1+1)

(e) What is a two-level directory structure? (2)

() What is the difference between logical and


physical address? (2)

(g) What is dual mode of operation in the context of


an Operating system? (3)

(h) Give an example for absolute path and relative


path in a directory? (3)

) Briefly describe the working of Shortest Remaining


Time First scheduling algorithm. (3)
4003 3

0) What is meant by the term 'virtual address space'


of a process? (2)

(k) List two system calls for each of the following :


(2+2)
() Process control

(iü) Device management.

) What is a Process Control Block (PCB)? Elaborate


the information stored in it. (1+3)

Section B

2 (a) In a multiprogramming uniprocessor system, how


many processes can be in running state and how
many processes can be in ready state at a particular
time? (2)

(b) What is the challenge faced by the designers of


Operating System while implementing Shortest Job
First scheduling algorithm? (2)

(c) A process goes through various states from its


creation to termination. Illustrate the states of a
process using a diagram and explain briefly the
different states. (3+2)
4
4003
(d) The following proccsses arrive in order P1 Da
P3, P4, PS at time 0. Draw Gantt chart showine
the cxecution of thesc processcs using SJF
(Shortest Job First). Calculate the average
turnaround time and average wait time. (3+3)

Process Burst Time

P1 3

P2 2

P3 7

P4 4

PS 5

3. (a) What is the Unix Kernel1? (2)

(b) What is the purpose of pipes in shell seript? Give


an example. (1+1)

(c) Write a shell script to input a number N and prim


all the prime numbers between 1 and N. The
(S)
program should be well documented.
4003 5

(d) A ile named abe.txt contains following data


(3*2)
Amit

Bharat

Sanjeev
Sanjay

Dhanraj
Inderjit

Sankalp

What is the output of the following commands:

() grep [s] abc.txt

(ii) grep san (^i cut -c 3,5 abc.txt

4 (a) Give Unix/Linux commands to remove a file and


remove a directory. (2)

(b) Give the advantage of layered design of the


Operating System (2)
4003 6

(c) What is an Application Programming Interface


(API), what are the advantages of a programmino
environment which uses APL.
(1+l)
(d) Explain the difference between system call and
system program. (2)

(e) Each system call will require passing some


parameter(s) to the Operating System. What are
the three parameter passing techniques? (3)

() List any 4 categories of system programs. (4)

5. (a) What is the purpose of a page table in memory


management? (1)

(b) A memory has a page size of 1 KB. determine


the page number and offset for the following
addresses (3×2)

(i)) 3085

(ii) 420S

(ii) 65000
4003 7

(C) Given memory partition sizes of 200KB, 600KB,


100KB, 300KB and 450 KB. How would the
processes of sizes 330KB, 250KB, 500KB and
350 KB be placed in the memory for first fit, best
fit and worst fit algorithms. Calculate internal and
external fragmentation in all three algorithms.
(3x2+2)

6. (a) For a paging environment in the main memory, the


logical address has two parts - page number and
offset. The size of the page frame is 2K. What
should be the size of the offset (in bits)? (3)

(b) What is preemptive and non-preemptive process


scheduling? Name two algorithms for each and
justify your categorization into preemptive and
non-preemptive. (2+4)

(c) What are the three methods to access data in a


file? Give comparison in terms of efficiency and
ease of implementation. (6)

7. (a) Draw a labelled diagram showing structure of a


magnetic disk. (4)
4003

(b) What is demand paging? What is Page faul? What


are the steps to handle page fault? (1++3)
(c) What is transfer rate, seck time and rotational
latency in a disk? A disk has average seek time
of 12ms and spins at 7200 RPM (revolutions Der
minute). Data transfer rate for the disk is 4MB/
sec. Calculate the time required to transfer 8KB
data to the disk. Assume there are no other time
overheads/delays. (3+3)
SI No of QP 4871
:2342202401 NEP-UGCF-2024)
Unique Paper Code Non-Major
Name ofo
of Course B.A.(ProgV B.Se.
Name of the Paper :Operating Systems
Semester Maximum Marks: 90
Duration: 3 Hours
Instructions for Candidates
No, on the top immediatelv on receipt
of this question paper.
I. Write your Roll
2. Section-A is compulsory.
3. Attempt any 4questions from Section- B.
4. Parts ofa question must be answered together.
Section- A 3
a prcess.
QI a) Differentiate between User mode and Kernel mode execution of 3
b) Explain the purpose of system programs.
What is the context switching? 3
d What is the Compaction?
be 3
What is the drawback of priority scheduling algorithm? How it can
resolved?
3
What are the three different types of process scheduler in operating system? 3
What is convoy effect in CPU scheduling? 3
h) Consider a logical address space of 64 pages of 1024 words cach,
mapped onto a physical memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are required to address cach word in a frame?
i) Distinguish between absolute and relative path name.

J) Explain the use ofUNIX commands: 3


mkdir
ii. pwd
ii. cd
Seetion- B
4+4
Q2 a) i) What are the goals of operating System? Explain Batch Operating
System, multiprocessor system and real time Operating withsuitable
example?
i) List any two different types of mass storage devices, Exnlain seek
time, rotational latency time, and data transfer rate in the disk?
b) i) Briefly explain the layered approach and discuss its advantages and 4+3
disadvantages for system design.
i) What are system calls? Explain different types of system calls.
03 a) Consider the following set of processes, with the length of the CPU burst 8
time gven in milliseconds:

Process Arrival time Burst Time


PI 7
P 5
P 2 3
PA 1
P 2
P
A Draw Gantt chart hat illustrate the execution schedule of
these
processes using preemptive SJF scheduling algorithm.
h Calculate the turnaround time and waiting time of each
process.
Also compute avèrage turnaround time and average waiting time.

b) ) What is PCB? What information is contained in the PCB? 3+4


i) Explain the different states of a Process with a suitable diagram?

Q4 a) Given four memory partitions of 100KB, 500KB, 200KB and 600KB(in 6


order), how. would cach of the first fit, best fit and worst fit algorithms
place processes of 212KB, 417KB, 112KB and 426KB(in order)?
b) i) What is Demand Paging in Operating Systern? Explain its 5+4
advantages and disadvantages.
i) Consider a system which has main memory access time of 100ns
and TLB access time of 20ns, and TLB hit ratio of 95%. What will
be the effective memory access time with TLB and without TLB?
4+-3
Q5 a) i) Explain the purpose of the open) and close(0 system calls in file
operations.
i) Consider a system which has main memory access time of 3Sns and
page fault service tíme of 175ns and page hit ratio is 75%. What will
be the effective memory access time?
b) i) What is file system? Explain various file operations in file system? 5+3
i) Briefly, explain single-level, multi-level, and acyclic graph
directories?
Q6 a) Explain the terms:
i) Swapping
ii).Vitual memory
ii) Page fault

are the
i) Explain the Single threaded and multithreaded process. What
6+3
b)
advantages of Threads in Operating Systems?
ii) What are the major entries to evaluate the performance of CPU
scheduling algorithms?
15
Q7 Differentiate between following:
i) Paging and segmentation
) Dispatcher and scheduler
ii) Preemptive and Non-preemptive scheduling
iv) Multiprogramming and multitasking.
v Internal fragmentation and External fragmentation
7310 2 3
7310
Section A sDefine Deadlock. Mention any two necessary
conditions required for a
deadlock to occur. (3)
1. (a) A system uses a logical address composed of 8
and bounded waiting are
bits for the page number and 12 bits for the offset. ) Discuss why progress Critical
essential requirements in
solving the
Calculate the total size of the logical address (3)
Section Problem.
space. (3
Control Block
Explain the concept of a Process
(b) Write the steps involved in handling a page fault ()
three essential clements it
(PCB) and name any
in an operating system (3) (3)
comprises.
(c) List three opcrations that can be performed on a Section B
file. 3)
non-preemptive Shortest Job
the
2. (a) The system uses following
(d) How can we handle the problem of starvation in algorithm. Consider the
First scheduling (7)
Priority Scheduling algorithm? (3)
processes:

(e) Explain the concept of Dual-Mode Operation in


an operating system and its importance. (3 Burst Tine
Process
Arrival Time

P1
() Write three advantages of multi-threaded systems.
P2 2
(3)
P3
P4
(g) What is a System Call? Name any two system
calls used in file handling (3)
P.T.O.
7310
4
5
)) Draw the Gantt 7310
chart showing the in terms of
how
order. execution (ii) Rank the
algorithms
justify
memory. Briefly
efficiently they use
(ii) Calculate waiting time your ranking.
and turnaround time
to
for each process. translation of logical
addresses

Explain how the


(b) technique.
addresses occurs in paging
physical (4)
(iii) Calculate average waiting and
average
turnaround time
fragmentation and
Distinguish
between internal
(b) Explain the role of long-term, (c) (3)
short-term, and external fragmentation.

medium-term schedulers. (6)


in an
of demand paging
(a) Explain the concept
(c) How does 4 advantages of
multiprogramming improve system operating system.
What are the
performance? following page
(2) paging? Consider the
using demand
(10)
reference string:
3 (a) Consider a memory system with available partitions
of sizes: 180 KB, 300 KB, 120 KB, 500 KB. 220
3, 4, 6, 7
KB. Three processes request memory in the 7, 2, 3, 1, 2, 5,
following order: Pl: 215 KB, P2: 125 KB, P3: 400 frames, how
paging with three
Assuming demand
KB:
(8) would occur if optimal
many page faults
(i) For each of the contiguous memory replacement algorithm
is used?
allocation
strategies (First-Fit, Best-Fit, and Worst-Fit).
single-level, two-level,
and tree
identify the partition cach process would be (b) Compare (5)
allocated to. structured directories.

P.T.O.
7310 6
5. (a) Adisk scheduling system has 7310
the
of pending requests (in the order following queue
they arrive)::[98,
183, 37, 122, 14, 124, 65, 67]. Base Length
The disk head star. | Segment
120
600
at position 53. Answer the
following: (10) 1 2300 14
2 60 105
() Calculate the total head
movement using the
First-Come, First-Served (FCFS) algorithm. (b) Describe the states
ofa process using a
suitable
(5)
diagram.
(ii) Calculate the total head
movement using the with 3 processes (PI, P2,
P3)
Shortest Seek Time First (SSTF) algorithm. (c) Consider a system R2 with
(RI with I instance,
resource types
and 2
allocation and requests
(ii) Which algorithm results in less 2 instances). The current
head (6)
are as follows:
movement, and why?
requests R2,
(b) Explain the concept of caching in an operating P1 holds R1 and
system. Discuss the concept of cache coherency instance of R2 and
P2 holds one
and its importance in multiprocessor systems.
requests Rl,

(5)
instance of R2.
another
P3 holds
6. (a) Explain the purpose of the base register.
Using
the segment table provided below, calculate the Allocation Graph and determine
Draw the Resource
physical address for the logical address (1, 10). or not. Justify your
whether a deadlock exists

answer.
(4)
P.T.O.
7310 8

7. Distinguish between the following: (15)

() Process and thread

(i) Preemptive and non-preemptive scheduling

(iii) Seek time and rotational latency

(iv) Paging and demand paging


virtual memory
(v) Physical memory and

You might also like