CS 604 QUIZ Solution 2020/2021
Question # 1
When processes are generated using fork ()
system call and then after that they are coordinated with each other using IPC
channel. They are utilizing a separate address space for each of process
(parent, child),, kernel resources and IPC channel. This makes it a more heavy.
Which strategy can be used to make it light?
Select the correct
option
Termination of child
process when these become more
Scheduling of each
process
Use
of threads
Use of Batch systems
Question # 2 In Unix/Linux environment Ali
want to know the number of processes running on the system and their status,
number of CPUs in the system and their usage, amount of main memory and its
usage. Which of the following command will help in this regard?
Select the correct
option
$ ps
$ gcc
$ fifo
$ top
Question # 3
Critical section problem is to __________the
concurrent execution of cooperating process.
Select the correct option
update
serialize
stop
start
Question # 4
How many modes are
supported in operating system?
Select the correct
option
1
2
3
4
Question # 5
___________ is also
called Swapper.
Select the correct
option
Long term
Short term
Medium
term
Swap space
Question # 6 of 30 (
Start time: 04:12:16 PM, 01 January 2021 ) Total
Marks: 1
You can have a thread
wait for another thread within the same process by using the _______ system
call.
Select the correct
option
pthread_join()
pthread_exit()
pthread_create()
pthread_terminate()
Question # 7 of 30 (
Start time: 04:12:52 PM, 01 January 2021 ) Total
Marks: 1
Which process can be
affected by other processes executing in the system?
Select the correct
option
cooperating
process
child process
parent process
init process
Question # 8 of 30 (
Start time: 04:14:14 PM, 01 January 2021 ) Total
Marks: 1
Processes P1, P2, P3,
P4 enter the ready queue at times 0, 3, 3, 11 with burst times P1=8, P2=2,
P3=1, P4=1. With Shortest Remaining Time First, __________ process is given CPU
at time T=3.
Select the correct
option
P1
P2
P3
P4
Question # 9 of 30 (
Start time: 04:15:35 PM, 01 January 2021 ) Total
Marks: 1
P1, P2, P3, P4, P5 are
five processes with ticket numbers P1=1, P2=2, P3=4, P4=2, P5=4 then
considering Lamport’s bakery algorithm, __________ process enters critical
section after P1.
Select the correct
option
P2
P3
P4
P5
Question # 10 of 30 (
Start time: 04:16:25 PM, 01 January 2021 ) Total
Marks: 1
OS helps manages the
following except
Select the correct
option
Application
software
Memory
Virtual memory
Bus
speed of the system
Question # 11 of 30 (
Start time: 04:18:11 PM, 01 January 2021 ) Total
Marks: 1
If your processor does
not have two slots empty in Per Process File Descriptor Table, then your
_________ system call will fail.
Select the correct
option
Pipe
Read
Write
Open
Question # 12 of 30 (
Start time: 04:19:40 PM, 01 January 2021 ) Total
Marks: 1
Both in two atomic
instructions TestAndSet and swap two critical section requirements are
satisfied but not _____________.
Select the correct
option
Mutual Exclusion
Progress
Bounded
Waiting
Assumptions
Question # 13 of 30 (
Start time: 04:20:58 PM, 01 January 2021 ) Total
Marks: 1
In producer-Consumer
problem synchronization is required. On which shared area this synchronization
actually affect?
Select the correct
option
Counter
Buffer
Entry section
Exit section
Question # 14 of 30 (
Start time: 04:22:02 PM, 01 January 2021 ) Total
Marks: 1
The region in the
memory that a process is allowed to access is known as process__________.
Select the correct
option
Operation
Address
Space
Register
Instruction
Question # 15 of 30 (
Start time: 04:23:19 PM, 01 January 2021 ) Total
Marks: 1
You can use the rm
file1 command to __________ file1.
Select the correct
option
retrieve
remove
make
modify
Question # 16 of 30 (
Start time: 04:24:31 PM, 01 January 2021 ) Total
Marks: 1
____________
multi-threading model provides full concurrency.
Select the correct
option
One-to-Many
Many-to-Many
One-to-One
Many-to-One
Question # 17 of 30 (
Start time: 04:26:24 PM, 01 January 2021 ) Total
Marks: 1
_____ system call is
used to write to a file or FIFO or any other IPC channel.
Select the correct
option
read
write
open
fork
Question # 18 of 30 (
Start time: 04:27:18 PM, 01 January 2021 ) Total
Marks: 1
which is not basic
computing hardware?
Select the correct
option
CPU
Memory
Compact
Disc
I/O Devices
Question # 19 of 30 (
Start time: 04:28:19 PM, 01 January 2021 ) Total
Marks: 1
Using hardware
solution to synchronization for complex problems, introduce a new
synchronization tool know as _______________.
Select the correct
option
TestAndSet
Semaphore
Swap
Trap
Question # 20 of 30 (
Start time: 04:29:39 PM, 01 January 2021 ) Total
Marks: 1
The link between two
processes P and Q to send and receive messages is called __________
Select the correct
option
Communication
Link
Message-Passing Link
Synchronization Link
All of the mentioned
Question # 21 of 30 (
Start time: 04:31:25 PM, 01 January 2021 ) Total
Marks: 1
In process
synchronization, if both the producer and consumer attempt to update the buffer
concurrently, the machine language statements may get interleaved. Interleaving
depends upon how the producer and consumer processes are____________.
Select the correct
option
separated
scheduled
stopped
interrupted
Question # 22 of 30 (
Start time: 04:32:31 PM, 01 January 2021 ) Total
Marks: 1
When a process P1
switches from the running state to the waiting state because an I/O request is
being completed.This scheduling is called---------
Select the correct
option
Non-preemptive
Switching
Termination
Preemptive
Question # 23 of 30 (
Start time: 04:34:26 PM, 01 January 2021 ) Total
Marks: 1
We can terminate a
thread explicitly by either returning from the thread function or by using the
____________ call.
Select the correct
option
express()
pthread_exit()
win()
slow()
Question # 24 of 30 (
Start time: 04:35:20 PM, 01 January 2021 ) Total
Marks: 1
A solution to the critical section problem must satisfy the following requirements except
Select the correct
option
Progress
Mutual Exclusion
Bounded Waiting
Race
Condition
Question # 25 of 30 (
Start time: 04:36:36 PM, 01 January 2021 ) Total
Marks: 1
The situation in which
no context switching is required in multiprocessor systems is referred to as
_______ .
Select the correct
option
Busy Waiting
Spin
lock
Interrupt
Scheduler
Question # 26 of 30 (
Start time: 04:38:27 PM, 01 January 2021 ) Total
Marks: 1
Which is not a parameter
of pthread_create().
Select the correct
option
Function
Return
status
Thread ID
Thread
attributes
Question # 27 of 30 (
Start time: 04:40:23 PM, 01 January 2021 ) Total
Marks: 1
To display all
processes ___________ option is used with ps command.
Select the correct
option
-u
-a
-l
-e
Question # 28 of 30 (
Start time: 04:41:26 PM, 01 January 2021 ) Total
Marks: 1
Batch programs are usually __________ programs.
Select the correct option
Interactive
Non-interactive
Foreground
Preemptive
Question # 29 of 30 (
Start time: 04:43:25 PM, 01 January 2021 ) Total
Marks: 1
------------- is
a segment of code that accesses a shared resource like data
structure or device that must not be concurrently accessed by more than
one thread of execution.
Select the correct
option
Multithreading
Context switching
Critical
section
Pipelining
Question # 30 of 30 (
Start time: 04:45:00 PM, 01 January 2021 ) Total
Marks: 1
In system call that
creates a pipe for IPC. If one of the operation from read/write would fail then
what will be returned as result?
Select the correct
option
-1,+1
-1
1
0