Final Sample Paper - CS604P
Final Sample Paper - CS604P
FINALTERM EXAMINATION
Fall 2022
CS604P – Operating Systems (Practical)
Time: 90 min
Marks: 40
In Unix, which system call creates the new process that contains a copy of the parent
address space?
A. Create
B. Fork
C. New
D. pipe
A. Normally or abnormally
B. Abnormally
C. Normally
D. forcefully
If process synchronization is not controlled in the dining philosopher problem, it will lead
to
A. Deadlock
B. Starvation
C. Deadlock or Starvation
D. Deadlock and Starvation
Question No: 5 (Marks: 01) - Please choose the correct option
When the CPU attempts to obtain a needed page exists in main memory (RAM), it is
referred to as a
A. Page hit
B. Page miss
C. Page fault
D. Fault time
LRU page - replacement algorithm associates with each page the ______
A. time it was brought into memory
B. the time of that page’s last use
C. page after and before it
D. all of the mentioned
In inter-process communication using pipe the ______ system call is used to create pipe
between parent and child process.
A. segment()
B. page()
C. pipe()
D. fork()
A. vcc
B. gcc
C. vcc
D. dcc
Question No: 15 (Marks: 01) - Please choose the correct option
In First Come First Serve Scheduling the turnaround time for each process can be
calculated as_______.
A. Time Stack
B. Time slice
C. Time controller
D. Time divider
In Round Robin Scheduling, waiting time for each process can be calculated as _______.
In Dining philosopher problem, continuous waiting for the fork by the philosopher will
lead to ____________situation.
A. paging
B. segmentation
C. deadlock
D. preempting
Question No: 19 (Marks: 01) - Please choose the correct option
A. Deadlock Subtraction
B. Deadlock Avoidance
C. Deadlock Addition
D. Deadlock Controlling
A. Max[n,m] = p
B. Max[m,n] = p
C. Max[p,n] = m
D. Max[n,p] = m
A. ts
B. cs
C. pwd
D. pss
In Linux Terminal Window _________ command is used to change your current director
to desktop.
A. ms Desktop
B. cc Desktop
C. cd Desktop
D. bc Desktop
A. mkpir
B. mkdir
C. mkcir
D. mkbir
Write a C program that provide the possible solution for producer – consumer problem
using mutex and semaphore. In program make sure that producer doesn’t try to put data
in buffer when the buffer is full and consumer doesn’t try to consumer data when the
buffer is empty.
Write a C program that implement the first readers-writers problem, requires that no
reader be kept waiting unless a writer has already obtained permission to use the shared
object. In other words, no reader should wait for other readers to finish simply because a
writer is waiting.
Assume that all the processes arrive at time 0 in sequence P0, P1, P2
Write the C program that take three parameters related to paging including page number,
page offset and frame number and calculate the bits needed for logical and physical
address space.
Write a C program using Inter-process communication between parent and child process
through pipe. Child process should write your name through write() system call in the
pipe. And Parent process read your name through read() system call and print your name
on terminal widow through write() system call.