0% found this document useful (0 votes)
143 views

Final Sample Paper - CS604P

this paper make term easy

Uploaded by

sabahanatasha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

Final Sample Paper - CS604P

this paper make term easy

Uploaded by

sabahanatasha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Sample Paper

FINALTERM EXAMINATION
Fall 2022
CS604P – Operating Systems (Practical)

Time: 90 min
Marks: 40

Question No: 1 (Marks: 01) - Please choose the correct option

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

Question No: 2 (Marks: 01) - Please choose the correct option

The FCFS algorithm is highly problematic for ____________


a) operating systems
b) multiprocessor systems
c) time sharing systems
d) multiprogramming systems

Question No: 3 (Marks: 01) - Please choose the correct option

If a parent process terminates__________, this results in the termination of all child


processes; this is referred to as cascading termination.

A. Normally or abnormally
B. Abnormally
C. Normally
D. forcefully

Question No: 4 (Marks: 01) - Please choose the correct option

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

Which of the following algorithms is used to avoid deadlock?

A. Dynamic Programming algorithm


B. Primality algorithms
C. Banker's algorithm
D. Deadlock algorithm

Question No: 6 (Marks: 01) - Please choose the correct option

Address generated by CPU is referred as


A. Physical address
B. Logical address
C. Page address
D. Segment address

Question No: 7 (Marks: 01) - Please choose the correct option

The instruction being executed, must be in ____________


A. physical memory
B. logical memory
C. physical & logical memory
D. Registers

Question No: 8 (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

Question No: 9 (Marks: 01) - Please choose the correct option

Producer – consumer problem also known as


A. Reader-writer
B. Dinning-philosopher
C. Bounded-buffer
D. Writer – reader

Question No: 10 (Marks: 01) - Please choose the correct option


Which of the following page replacement algorithms suffers from Belady’s Anomaly?
A. Optimal replacement
B. LRU
C. FIFO
D. Both optimal replacement and FIFO

Question No: 11 (Marks: 01) - Please choose the correct option

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

Question No: 12 (Marks: 01) - Please choose the correct option

Virtual memory is normally implemented by ________


A. demand paging
B. buses
C. virtualization
D. all of the mentioned

Question No: 13 (Marks: 01) - Please choose the correct option

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()

Question No: 14 (Marks: 01) - Please choose the correct option

In Linux Terminal Window ________ command is used to compile the C Program.

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. Turnaround Time= Waiting Time * Burst Time


B. Turnaround Time= Waiting Time + Burst Time
C. Turnaround Time= Waiting Time / Burst Time
D. Turnaround Time= Waiting Time % Burst Time

Question No: 16 (Marks: 01) - Please choose the correct option

In Round Robin scheduling algorithm, we have equal ________for each process.

A. Time Stack
B. Time slice
C. Time controller
D. Time divider

Question No: 17 (Marks: 01) - Please choose the correct option

In Round Robin Scheduling, waiting time for each process can be calculated as _______.

A. Waiting Time = Turnaround Time+ Burst Time


B. Waiting Time = Turnaround Time- Burst Time
C. Waiting Time = Turnaround Time* Burst Time
D. Waiting Time = Turnaround Time/ Burst Time

Question No: 18 (Marks: 01) - Please choose the correct option

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

In _________________when process enter the system, it must declare the maximum


number of each resource type that it may need.

A. Deadlock Subtraction
B. Deadlock Avoidance
C. Deadlock Addition
D. Deadlock Controlling

Question No: 20 (Marks: 01) - Please choose the correct option

In Banker Algorithm data structure _________represents that process Pm can request


maximum p instances of resource type Rn.

A. Max[n,m] = p
B. Max[m,n] = p
C. Max[p,n] = m
D. Max[n,p] = m

Question No: 21 (Marks: 01) - Please choose the correct option

In Linux Terminal Window__________command is used to print the path of current


working directory

A. ts
B. cs
C. pwd
D. pss

Question No: 22 (Marks: 01) - Please choose the correct option

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

Question No: 23 (Marks: 01) - Please choose the correct option


______________ command is used to create the new directory in the current working
directory.

A. mkpir
B. mkdir
C. mkcir
D. mkbir

Question No: 24 (Marks: 01) - Please choose the correct option

The address generated by CPU is referred to as the _____________.


A. Physical Address
B. Simple Address
C. Logical Address
D. Complex Address
Question No: 25 (Marks: 05)

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.

Question No: 26 (Marks: 05)

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.

Question No: 27 (Marks: 05)

Write a program in C to implement FCFS scheduling algorithm. Given the list of


Processes and their burst time, calculate waiting time and turnaround time for each
process. Also calculate average waiting time and average turnaround time. For example,
the list of processes and their CPU burst time are as follows:

Processes Burst Time


P0 11
P1 5
P2 7

Assume that all the processes arrive at time 0 in sequence P0, P1, P2

Question No: 28 (Marks: 05)

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.

Question No: 29 (Marks: 05)

Write a c program to calculate Effective memory Access Time in paging. The


performance measure of paging is the effective memory access time based upon Hit ratio,
Time to Access Translation Look Aside Buffer T TLB, and Memory Accss Time Tmem by
using the below formula

Question No: 30 (Marks: 05)

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.

You might also like