0% found this document useful (0 votes)
41 views16 pages

Cs604 Final Term Solved MCQs With Reference

1. This document provides solved MCQs for the CS604 Final Term exam, with answers to multiple choice questions on operating system concepts like processes, scheduling, memory management, and Linux directory structure. 2. Key topics covered include bounded buffers, context switching, critical sections, process states like zombie processes, file descriptors, scheduling algorithms, IPC mechanisms like pipes, and Linux directory layout and commands. 3. Answers are provided for 20 multiple choice questions related to these operating system concepts.

Uploaded by

aiman razzaq
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)
41 views16 pages

Cs604 Final Term Solved MCQs With Reference

1. This document provides solved MCQs for the CS604 Final Term exam, with answers to multiple choice questions on operating system concepts like processes, scheduling, memory management, and Linux directory structure. 2. Key topics covered include bounded buffers, context switching, critical sections, process states like zombie processes, file descriptors, scheduling algorithms, IPC mechanisms like pipes, and Linux directory layout and commands. 3. Answers are provided for 20 multiple choice questions related to these operating system concepts.

Uploaded by

aiman razzaq
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/ 16

CS604 Final Term Solved MCQs

(VISIT VURANK FOR MORE)

Bounded B uffer is a buf fer of _ _ _ _ _ __ _ _ _ __ size

Variable

Fixed P/41

_ _ __ _ _ _ _ __ _ is also c alled S wap per .

Long ter m

Short te rm

Medium term P/34

Swa p space

Sh ar e d li br ar ie s a nd ke r ne l mo du l e s a re s to re d i n _ __ _ _ _ _ __ _ _ _ _ d ir e cto r y.

/bin

/de v

/boot

/lib P/23

_ _ __ _ _ _ _ __ d is play s in fo r ma t ion a bo u t th e t o p pro ce s s e s .

Is

Cs

Top P/64

Cd

Cooperating proce sses ne ve r s hare any d ata , code , me mor y or state .

True

False P/2 , 41, 97


Fir st _ __ _ _ _ _ e nt ri e s in Pe r P r o ce s s F i l e De s cr i pt o r T a bl e a re u se d a s so o n a s t h e
pr o c e s s is c r e a t e d .

W h e n pro c e ss o pe ns it s fi rst fi le e x plic it ly it w i ll g e t d e sc ri pt o r n um b e r


_ _ __ _ _ _ _ _

3 Google

Ta k in g t h e CP U fro m o n e pro ce ss and g i vi n g t h e CP U to a n o th e r pro c e ss is te rm e d


as

Contex t Sw itching P/31

Dispatchi ng

Swapping

Tracki ng

_ _ __ _ _ _ _ __ sche d ule r se lects the pr oc ess fro m the jo b pool and put the m in m ain
me mor y.

Long term P/33

Short te rm

Medium term

Swapper

1. Li nux OS can support multiple users at a t im e

a) True

b) False

2 . Th e O pe r a ti n g sy st e m is a la ye r o f s oft wa re b e t w e e n _ _ __ _ _ _ _ _ a nd
_ _ __ _ _ _ _ __ _ .

a) hardw are, s oftw are applicatio n P/1


b) Kernel, hard ware

c) D o s , W i nd o ws

d) W indo ws, Ke rnel

3. T h e m ajo r a dva nt a ge of mu lt i - prog ra m m i ng s yst e m is

a) M ore than one jobs can be p rocessed at a g iv e n tim e

b) CPU ut ilization can be increa sed

c) Jobs can be co m pleted quic kly

d) All of the optio ns are correct P/7

4. T h e mai n c h a r ac t e r is tic o f a R e al t i me s y s te m is

a) Eff ic ie nc y

b) Large V irtual Memory

c) Lar ge sec ond ar y storag e de vic e

d) Usab ility P/6

5. C o m m an d -lin e int e r pre te r is a lso c a lle d _ _ _ _ _ __ _ _ _ in s o m e o pe r ati n g


syste ms.

a) Kernel

b) Shell P/13

c) Signal

d) API

6. I /O in st ru ct io ns a re Pri vi le ge d I nst r uc t io n s.

a) True P/8

b) False

7. In L in ux d ir e c t o ry st r uc t ur e , t he re is _ _ _ _ _ _ _ __ _ _ root d i re ct ory .

a) 1 P/22

b) 2

c) 3

d) 4

8. U t il iti e s u s e d f or sy s t e m ad mi ni str at io n (h al t , ifc o nf i g, fd is k, e t c. ) a r e st o r e d in


_ _ __ _ _ _ _ __ _ _ _ d ir e c to ry .
a) /dev

b) /boot

c) /li b

d) /sbin P/24

9. r m a nd r m kd ir co m m and s ar e u s e d t o _ _ __ _ _ _ __ _ _ _ _ d ir e ct or y .

a) Create

b) Move

c) Remo ve

d) Modify

10. You ca n us e th e mv fil e1 fil e2 com mand to move _ _ _ _ __ _ _ _ _ __ _ _

a) file1 to file 2.

b) f ile 2 to file 1

c) th is c o mm and w il l no t wo r k f o r m o vi n g f i le s

d) N o ne of t h e o p t io n is c o rr e ct .

e) Both optio n a a nd b are correct

11. Ta king th e CPU from one proce ss and g iving th e CPU to a not he r process is
termed as

a) Contex t Sw it ching P/31

b) Dispatching

c) Swapping

d) Tracking

12 . _ __ _ _ _ _ _ __ _ sche duler is al so ca lled S wa ppe r.

a) Long term

b) Short term

c) Medium term

d) Swap space
13 . A P r oc e s s A th at h as fi n is h e d wo r ki n g, a s w e ll a s its pa re nt pr o c e s s ha s al so
fi nis h e d its e x e cu t io n . I n t h i s st at e t h e pro c e s s A w ill be c alle d as _ _ _ _ _ __ _ _
proces s.

a) Child

b) Thread

c) Zombie

d) Fork

14 . Bo u n d ed Buf fe r is a buf fe r o f _ _ __ _ _ _ _ ___ _ siz e

a) var iabl e

b) Fix ed

15 . I n _ _ __ _ _ _ _ c o m m un ic a t io n t h e pro c e ss w h ic h w a n ts t o c o m mu nic a te w it h t h e
oth e r pr o ce ss mu st e xpl ic it ly na me t h e re c i pi e n t and th e s e nde r.

a) Direct P/43

b) Indirect

c) Au t o m at ic

d) Self

16. In indir ect inte r pr o cess com m unication, a sender __ _ _ _ _ __ m ention th e na me


of the recipient.

a) does

b) do es not

17. T he r etur ned cod e t o th e ch ild proce ss afte r successful for k syste m call
exec ution is

a) 1

b) 2

c) 3

d) 0

18 . If th e for k sys tem c all fails , it retur ns

a) 1
b) -1

c) 2

d) 0

19 . W h e n a pro c e ss o pe ns it s fi rst fi le e x plic it ly it w ill g e t d e sc ri pt o r n um b e r


_ _ __ _ _ _ _ _

a) 1

b) 2

c) 3 Google

d) 4

20 . In U ni x/ Li nux , by defau lt the sta nd ard input file is attac h ed to the


_ _ __ _ _ _ _ __ _

a) Mouse

b) Keyb oar d P/52

c) Light pe n

d) Jo ystick

T he fi le de sc r ipto r fo r S ta nd ar d In pu t (std i n) is -- ----- -- ----- --

0 P/52

The part of the program where the shared memory is accessed is called -----------

Buffer
Critical section
Semaphore
None

Linux is only single user operating system


T
F

User mode can run the Privileged instructions

T
F Google

algorithm is the optimal scheduling algorithm among all the non-


preemptive scheduling algorithms.
SJF
Priority
FCFS
RR

A semaphore that cause Busy-Waiting is termed as .

Spinlock P/111
Critical Section
Monitor
Critical Region

The TSL (TestAndSet instruction) which is the hardware solution to synchronization


problem does not satisfy the condition, hence not considered to be a good
solution.
Bounded waiting P/106
None
Mutual exclusion
Progress

The goals of ………………… systems are maximizing user convenience and


responsiveness, instead of maximizing the utilization of the CPU and peripheral devices.
Single user P/4
Time sharing
Multi Programmed
Batched

In indirect communication processes can communicate only if they share a


mailbox.
T
F

The ------------system call is used to open or create a file.

Open () Google
Read ()
Write ()
Close ()

…………………… are used for communication between related processes on a system.

Pipe P/49
FIFO
None
Named Fifo

A is a piece of code in a cooperating process in which the process may


Updates shared data (variable, file, database, etc.).
Critical section P/97
Critical Region
All are correct
Monitor

-------- Command gives a snapshot of the current processes.

ps P/63
top
who
ls

--------------command to resume the execution of a suspended job in the foreground

fg P/65
bg
jobs
kill

You can use the ------------- command to display the status of suspended and
background processes

fg
bg P/65
jobs
kill

You can terminate a foreground process by pressing --------------

<Ctrl-A>
<Ctrl-C> P/66
<Ctrl-Z>
None of the given options

In Unix/ Linux, by default the standard output file is attached to the


Select correct option:
File
Screen P/52
Printer
Scanner

A time sharing system is

Multi tasking
Interactive
All of these
Multi user

The following requirement for solving critical section problem is known as _.


“There exists a bound on the number of times that other processes are allowed to enter
their critical sections after a process has made a request to enter its critical section and
before that request is granted.”

Progress
Bounded Waiting
Mutual Exclusion
Critical Region

The bottom layer in the layered approach of Operating System is-----------

User interface
Hardware
Kernel
None of the given options

directory includes essential system boot files including the kernel image.
Select correct option:
/bin
/boot
/dev
/etc

You can use the rm file1 command to file1.


Select correct option:
retrieve
remove
make
modify

command is used to change the directory.


Select correct option:
ls
cp
cd
mv

Kernel threads are supported directly by the operating system. The kernel
performs the scheduling, creation, and management in ------ command display
the status of a process.
Select correct option:

ls ps
gcc
cat

Command displays the contents of current working directory.


Select correct option:

Ls P/25
cs
mv

Linux uses directory to store system configuration files.


Select correct option:

/bin
/dev
/boot
/etc P/23

Commands in Linux is used to copy file


Select correct option:

ls
cp P/27
mv
mkdir

directory includes essential system boot files including the kernel


image.
Select correct option:

/bin
/boot P/23
/dev
/etc

Swapper is also termed as Short term scheduler.


Select correct option:
True
False

The number of processes completed per unit time is called .


Select correct option:

Turn around time


Throughput
Response time
Dispatch latency

is used to request the OS by the process to take an I/O or


initiating child process.
Select correct option:

System call
Interrupt
Trap
Signal

A parent process calling system call will be suspended until


children process terminates.
Select correct option:

wait
fork
exit
exec
If your processor does not have two slots empty in Per Process File Descriptor
Table, then your system call will fail.
Select correct option:

Pipe
Read
Write
Open

The manual pages can be read in Linux using command.


Select correct option:

man
wan
desc
help

All Threads within a process share the address space.


Select correct option:

Same
Different

Taking the CPU from one process and giving the CPU to another process is
termed as
1. Context switching
2. Dispatching
3. Swapping
4. Tracking

The correct command for compiling C program named program.c in Linux


environment is
1. gcc program.c –o FirstPrgram P/28 Google
2. gcc –o FirstProgram program.c
3. gcc –z FirstProgram program.c
4. gcc program.c –m FirstPrgram

The hardware mechanism that enables a device to notify CPU is called an -------
------

Interrupt
Signal
Trap
Process

You can display the contents (names of files and directories) of a directory in
UNIX/Linux directory structure with the --------------- command.
ls
ls
none of the given options

The -------------- system call suspends the calling process.

fork
wait
exec
exit

In ---------addressing, the recipient is not required to name the sender.

Symmetric
Asymmetric
Both symmetric and asymmetric
None of the given options

The process of switching from one process to another is called latency.


1. True
2. False P/31

The priority of a process can be changed using command.


Select correct option:

nice P/91
cmd
cat
grep

The nice value helps in assigning to a process.


Select correct option:

Priority P/91
Weight
Time
Scheduling
You can use the ---------command in UNIX to create a directory.
rmdir
mkdir
cp
gcc

The time it takes for the dispatcher to stop one process and start another running
is known as the-----------.

Dispatch latency
Scheduling
Context switching
None of the given options

First-Come, First-Served (FCFS) is a --------------scheduling algorithm.

preemptive
non-preemptive
both preemptive and non- preemptive
none of the given options

The Shortest-Job-First Scheduling algorithm can be

Preemptive only
non-preemptive only
preemptive or non-preemptive.
None of the given options

I MB or 1 megabyte is equivalent to----

1024 bytes
10242 bytes (may be this)
10243 bytes
1000000 bytes

------------has a hierarchical file system structure.

DOS
Windows
UNIX
None of the given options

Files that start with a -------- in UNIX/Linux directory structure are known as
hidden files.

. (dot)
# ( hash )
/ (slash)
~ (tilt)

The creating process is called a--------------- process while the new processes are
called the -------------- of that process

None of the given options


Children, parent
Parent, children
Zombie, single

------------buffer places no practical limit on the size of the buffer

Bounded
Unbounded
Both Unbounded & bounded
None of the given options

is the basis of queuing theory which is branch of mathematics


used to analyze systems involving queues and servers.
Select correct option:

Little’s Formula P/94


Deterministic Modeling
Queuing Theory
Queuing analysis

Kernel is responsible for scheduling the user level threads.


True P/90 Google
False

DOS is a single user operating system.


Select correct option:
True Google
False

The scheduling of are done by the operating system.


Select correct option:
Kernel threads P/70
User level threads
Both Kernel and User Level thread
None of the give option

A major problem with priority scheduling algorithms is .


Select correct option:
Deadlock
Aging
Starvation P/3
None of these

A major problem with priority- scheduling algorithms is indefinite blocking


(or starvation).

Round Robin algorithm is most suitable for .


Select correct option:
Time sharing system P/85
Real time systems and batch systems
Running Batch programs
Expert system

Which of the following is correct definition for wait operation?


► wait(S) {
while(S<=0) P/108
;// no o
S--;
}
► wait(S) {
S++;
}
► wait(S) {
while(S>=0)
;// no op
S--;
}
► wait(S) {
S--;
}

(VISIT VURANK FOR MORE)

You might also like