CS604 SOLVED MCQs FINAL TERM BY JUNAID
CS604 SOLVED MCQs FINAL TERM BY JUNAID
CS604 SOLVED MCQs FINAL TERM BY JUNAID
System
(Solved MCS’s)
LECTURE FROM
(23 to 45)
[email protected] FOR MORE VISIT JUNAID MALIK
[email protected]
VULMSHELP.COME 0304-1659294
AL-JUNAI D INSTITUTE GROUP
1........................ is the separation of user logical memory from physical
memory.
a. physical memory
b. ROM
c. virtual memory pg#185
d. one of the given
2. When the address used in the program gets converted to an actual physical
RAM address is called……..
a. Execution
b. loading
c. compiling
d. Address binding pg#151
3. The set of all Logical address generated by a program from ................ of the
process.
a. process address space
a. Physical address space pg#155
b. logical address space
c. none of the given
4. 1 KB is equivalent to…..
a. 10 bytes
b. 100 bytes
c. 1000bytes from Google
d. 1024 bytes
7. In ……… system, the user space contain one process at a time because only
one process is executing at given time
a. Multi programmed
b. Batch pg#5
c. Time-sharing system
d. None of the given
10.The address generated by the CPU after any indexing or other addressing-
mode arithmetic is called ............ address and the address it gets translated by
MMU is called ............. address.
a. Virtual, physical pg#153
b. Hexadecimal, Binary
c. Valid, Virtual
d. Physical, Virtual
15. In scan algorithm the disk ............... starts at one end of the disk, and moves
towards other end, servicing requests as it reaches each cylinder, until it gets
to the other end of the disk.
a. arm pg#245
b. cylinder
c. head
d. none
17. In ................ , each file is a linked lists blocks may be scattered anywhere on
the disk.
a. Indexed Allocation
b. Contiguous Allocation
c. Linked Allocation pg#235
d. none of the above
AL-JUNAI D INSTITUTE GROUP
18..............enables process to communicate with each other.
a. Directory
b. FIFO pg#218
c. Linked File
d. Ordinary File
24. When a .............. link is created, a directory entry for the existing file is
created.
AL-JUNAI D INSTITUTE GROUP
a. Hard pg#225
b. Soft
c. soft and hard
d. hard or soft
25. In case of thrashing if CPU utilization is too low the operating system
…………the degree of multiprogramming.
a. Increase pg#208
b. Decrease
c. Increase or Decease
d. None
26. Which one of the following is correct syntax to copy file 1 to file 2?
a. cp fie2,fie1
b. cp file1/file2 Pg#27
c. cp file2 file1
d. cp file1 file2
28 keeps in memory only those instructions and data that are needed at
any given time.
a. paging
b. swapping
c. overlays pg#156
d. fragmentation
31.Assume the logical address space of 16 pages of 1024 word, each mapped
into physical memory of 32 frames. Each word consists of 2 bytes. what will
be the total number of bits to require for the P (page number)
a. 4 bits pg#166
b. 8 bits
c. 16 bits
d. 32 bits
33. Every ............... generated by the CPU is divided into two parts a page
number (p) and a page offset(d)
a. page
b. process address
c. physical
d. Logical address pg#164
37. Operating system enables the user to use the Hardware Resources.
a. True pg#4
b. False
38.Which of the following is NOT a Hardware Resource?
a. CPU
b. OS pg#4
c. I/O Devices
d. Memory
45. The Home Directory for super user in Linux and Unix is
a. /home
b. /root pg#27
c. None of the given
49.If your processor does not have two slots empty in Per Process File
Descriptor Table, then your system callwill fail.
a. Pipe pg#55
b. read
c. write
AL-JUNAI D INSTITUTE GROUP
d. open
56. In Unix/ Linux, by default the standard output file is attached to the
a. File
AL-JUNAI D INSTITUTE GROUP
b. Screen pg#59
c. Printer
d. Scanner
61. When process opens its first file explicitly it will get descriptor number
a. 1
b. 2
c. 3 google
d. 4
66.A parent process calling system call will be suspended until children process
terminates.
a. wait google
b. fork
c. exit
d. exec
70.The time it takes for the dispatcher to stop one process and start another
running is known as the -------.
a. Dispatch latency pg#82
b. Scheduling
AL-JUNAI D INSTITUTE GROUP
c. Context switching
d. None of the given options
71.You can display all of the signals supported by your system, along with their
numbers, by using the------------ command
a. <Ctrl-A>
b. fg
c. jobs
d. kill -l pg#69
74. The creating process is called a -------------- process while the new processes
are called the .........of that Process
a. None of the given options
b. Children, parent
c. Parent, children pg#38
d. Zombie, single
75.Files that start with a in UNIX/Linux directory structure are known as hidden
files.
a. . (dot) pg#28
b. # ( hash )
c. / (slash)
d. ~ (tilt)
82.A Process that has finished working, as well as its parent process has also
finished its execution. In this state theprocess A will be called as
process.
a. Child
b. Thread
c. Zombie
d. Fork
83.Taking the CPU from one process and giving the CPU to another process is
termed as
AL-JUNAI D INSTITUTE GROUP
a. Context switching Google
b. Dispatching
c. Swapping
d. Tracking
85.Utilities used for system administration (halt, ifconfig, fdisk, etc.) are stored
indirectory.
a. /dev
b. /boot
c. /lib
d. /sbin pg#27
94. _ _ Scheduler selects the process from the job pool and put them in
main memory.
a. Long term pg#36
b. Short term
c. Medium term
d. Swapper
102. Mkfifo() is a .
a. Library Call pg#58
b. Command
c. Directory
d. None of Above
107. Each process must first request permission to enter its critical section.
The section of code implementing thisrequest is called the
a. entry section pg#100
b. Critical Section
c. remainder section
d. None of all these
108. The interval from the time of submission to the time of completion is
the
a. Turnaround time pg#83
b. Waiting time
c. Response time
d. None of all these
109. You can create a threads by using the pthread_create() call.
a. True pg#64
b. False
110. Typically the execlp system call is used after a fork system call.
AL-JUNAI D INSTITUTE GROUP
a. True pg#39
b. False
111. A solution to the critical section problem must satisfy the following
requirements
a. Progress
b. Mutual exclusion
c. Bounded Waiting
d. All of these pg#101
113. The process id returned to the child process after successful fork
system call execution is.
a. 0 Pg#40
b. 1
c. 2
d. 3
a. Semaphore pg#111
b. Monitor
c. Critical region
d. Critical section
120. The condition in which a set {P0, P1… Pn} of waiting processes must
exist such that P0 is waiting for a resource that is held by P1, P1 is waiting
for a resource that is held by P2, and so on, Pn-1 is waiting for a resource
held by Pn, and Pn is waiting for a resource held by P0. This condition is
known as.
a. Mutual exclusion
b. Hold and wait
c. No preemption
d. Circular wait Pg#131
128. When the process tries to access locations that are not in
memory, the hard traps the operating system. This is called as .
a. Page fault Pg#188
b. Page replacement
c. Paging
d. Segmentation
139. Use of semaphore create a problem of busy waiting, this wastes CPU
cycles that some other process may beable to use productively. This type of
semaphore is also called
a. Semaphore S
b. Spinlock Pg#112
c. Locking
d. Semaphore Mutex
155. Which command, Display permissions and some other attributes for
prog1.c in your current directory?
a. ls –l prog1.c Pg#234
b. ls –d prog1.c
c. ls file prog1.c
d. ls –l prog1.c /Directory
156. The requires that once a writer is ready, that writer performs its
write as soon as possible , if a writerwaiting to access the object, no new
readers may start reading.
a. first readers-writers problem
b. second readers-writers problem Pg#119
c. third readers-writers problem
d. fourth readers-writers problem
158. The basic purpose of is to help the users to utilize the hardware
resources for completingdifferent tasks in a simplified manner
166. You can display the contents (names of files and directories) of a
directory in UNIX/Linux directory structurewith the command.
a. l
b. s
c. ls Pg#28)
d. none of the given options
167. The critical section problem can be solved by the following except
a. Software based solution
b. Firmware based solution Pg#101
c. Operating system based solution
d. Hardware based solution
a.Cycle Pg#147
b.Graph
AL-JUNAI D INSTITUTE GROUP
c. Edge
d.Node
170. In page replace algorithm we will replace the page that has not
been used for the longestperiod of time.
a. counter based
b.Least Frequently Used
c. FIFO
d.LRU Pg#202
172. If a process continues to fault, replacing pages, for which it then faults
and brings back in right away. This highpaging activity is called.
a. paging
b. thrashing Pg#210
c. page fault
d. CPU utilization
173. The method requires each file to occupy a set of contiguous blocks
on the disk.
a. Contiguous Allocation pg#236
b. Linked Allocation
c. Indexed Allocation
d. None of the given options
174. a way to establish a connection between the file to be shared and the
directory entries of the userswho want to have aces to this file.
a.Link pg#231
b.Directory
c. Common Group
AL-JUNAI D INSTITUTE GROUP
d.Access Permission
184. The hardware mechanism that enables a device to notify CPU is called
an
a. Interrupt google
b. Signal
c. Trap
d. Process
186. Which register holds the smallest legal physical memory address for a
process?
a. Base register (Page 13)
b. Limit register
c. Status register
d. None of the given options
192. A page table needed for keeping track of pages of the page table is
called
a. 2-level paging
b. Page directory (Page 173)
c. Page size
d. Page table size
193. Each page is a power of -------- bytes long in paging scheme.
a. 2
b. 3
c. 4 (Page 167)
d. 5
AL-JUNAI D INSTITUTE GROUP
194. Which part of the computer system helps in managing the file and
memory management system?
a. Operating System (Page 5)
b. Device Drivers
c. Application Software
d. Hardware
b. wait(S) {
S++;
}
c. wait(S) {
while(S>=0)
;// no op
S--;
}
d. wait(S) {
S--;
}
196. Wrong use of wait and signal operations (in context with semaphores)
can cause problem(s).
a. Mutual Exclusion
b. Deadlock
c. Bounded Waiting
d. All of the given options are correct
199. The size of pages and frames are same in logical memory and physical
memory respectively.
a. True (Page 165)
b. False
207. The process of holding at least one resource and waiting to acquire
additional resources that are currently being held by other processes is
known as .
a. Mutual exclusion
b. Hold and wait (Page 131)
c. No preemption
d. Circular wait
210. In the C-Scan and C-Look algorithms, when the disk head reverses its
direction, it moves all the way to the other end, without serving any requests,
and then reverses again and starts serving requests.
a. True (Page 249)
b. False
219. Fragmentation when using ICMP for path MTU should be avoided.
a. True
b. False
224. An optimal page-replacement algorithm has the lowest page fault rate
of all algorithms.
AL-JUNAI D INSTITUTE GROUP
a. True (Page 199)
b. False
229. The main memory is usually divided into two partitions, one for
_ and other for .
a. resident operating System, User processes (Page 158)
232. In order to remove the problem like busy waiting, some high level
synchronization constructs are defined. What are they?
AL-JUNAI D INSTITUTE GROUP
a. Critical regions and Monitors (Page 124)
243. An absolute pathname starts with the root directory (/) and a relative
pathname starts with your home directory.
a. True (Page 25)
b. False
245. Mach, MacOS X Server, QNX, OS/2 and Windows NT are examples
of OS Based on _.
a. Layered
b. Micro Kernal (Page 22)
c. Virtual Machine
d. None of The Given
246. In Layered Approach of OS, the Layer highest Layer is User Interface
layer.
a. True (Page 21)
b. False
254. Users are the People, machines or a computer that uses the Hardware
resources.
a. True (Page 4)
b. False
AL-JUNAI D INSTITUTE GROUP
255. Database, Complier, Video games are examples of .
a. Hardware
b. Application (Page 4)
c. Operating System
d. Users
259. In Unix/ Linux, by default the standard input file is attached to the
_ _
a. Mouse
b. Keyboard (Page 55)
c. Light pen
d. Joystick
264. Cooperating processes never share any data, code, memory or state.
a. True
b. False (Page 5)
267. _ system call is used to write to a file or FIFO or any other IPC
channel.
a. read
b. write (Page 48)
c. open
d. Fork
268. A Process ‘A’ that has finished working but its parent process has also
finished its execution. In this state the process ‘A’ will be called as
process.
a. Child
b. Thread
c. Zombie (Page 42)
d. Fork
AL-JUNAI D INSTITUTE GROUP
269. _ scheduling allows a process to move between
queues.
a. Round Robin
b. First Come First Serve
c. Multilevel Feedback Queue (Page 92)
d. Shortest Remaining Time First
278. scheme works well if members of the team are to work on these
shared files sequentially.
a. Common Group
b. Duplicating Files PG # 288
c. Common Login
d. Link
279. UNIX recognizes _ modes of access
a. One
b. Two
c. Three PG # 230
d. Four
280. The algorithm selects the request with the minimum seek time from
the current head position
a. Scan
b.SSTF PG # 244
c. Look
d.C-Look
281. Which part of the computer system helps in managing the file and memory
management system?
a.Operating System
b.Device Drivers
AL-JUNAI D INSTITUTE GROUP
c. Application Software
d.Hardware
282. is used to store data on secondary storage device.
a. Link PG # 229
b. Directory
c. Common Group
d. Access Permission
284. Which one of the following indicates end of the file in a read ( ) system
call?
a. -1
b. 0
c. 1
d. 2
285. In one of the deadlock prevention methods, impose a total ordering of
all resource types, and require that each process requests resources in an
increasing order of enumeration. This violates
the
conditionof deadlock.
a. Mutual exclusion
b.Hold and Wait
c. Circular Wait PG # 134
d.No Preemption Right
AL-JUNAI D INSTITUTE GROUP
286. The bottom layer in the layered approach of Operating System is .
a. User interface
b.Hardware PG # 18
c. Kernel
d.API
287. The non-critical section code in any critical section problem is termed as
a. Critical Section
b.Entry Section
c. Leave/Exit Section
d.Remainder Section
288. The process that satisfies all three requirements of critical section problem
is
called
.
a. Algorithm 1
b.Algorithm 2
c. Algorithm 3
d.Algorithm N
289. The main disadvantage of semaphore is .
a. Context switching
b.Busy waiting PG # 111
c. Synchronization
d.Deadlock
290. In Unix/Linux, pipes provide a method of one-way communication and for
this reason it may be called
a. Soft pipes
b. FIFO named pipes
c. Full-duplex pipes
d.Half-duplex pipes PG # 46
291. Consider process A is trying to access a page that does not belong to its
address space. Which of the followingprotection scheme provide
protection against such actions under paging?
AL-JUNAI D INSTITUTE GROUP
a.Valid/invalid (v) bit PG # 170
b.Null bit/parity (n) bit
c. Execute/parity (e) bit
d.Write/null (w) bit
292. --------- is the separation of user logical memory from physical memory.
a.Arm PG # 245
b.Cylinder
c. Head
d.Vector
295. In case of thrashing, if CPU utilization is too low, the
operating system_ the degree ofmultiprogramming
a.Increases PG # 208
b.Decreases
c. Increases or Decreases
d.Keeps constant
296. When there is no external fragmentation, free memory blocks are
scattered on hard disk then is usedin order to utilize these blocks for
space management.
AL-JUNAI D INSTITUTE GROUP
a. Indexed Allocation
b.Contiguous Allocation
c. Linked Allocation PG # 235
d.Variable Allocation
297. In a Multilevel Queue, the foreground queue has -------- scheduling
algorithm and background queue has --------
------ scheduling algorithm.
a. First Come First Serve, Round-Robin
b.Round-Robin, First Come First Serve
c. Round Robin, Round Robin
d.First Come First Serve, First Come First Serve
298. Main memory is a large array of -- called memory locations ranging in
size from hundreds of thousands
to billions.
a. Interrupts
b.Registers
c. Digits
d.Words PG # 12
299. The syntax for input redirection is
a.command < input-file PG # 55
b.command > input-file
c. command >= input-file
d.command =< input-file
317. A state is if the system can allocate resources for each process in
some order and still avoid adeadlock.
. None
. Unsafe
. Starvation
. Safe pg#134
318. algorithm is used in Deadlock avoidance.
AL-JUNAI D INSTITUTE GROUP
. Bakery
. Mutual exclusion
. Banker’s Google
. Safe sequence
319. Typical
ly monitor, a high level synchronization tool is characterized by and .
. Single, wait
. Global variable, local variable
. Local data, programmer defined operator pg#122
. Local variables, semaphores
356. Every-------------- generated by the CPU is divided into two parts: a page
number (p) and a page offset (d).
• Page
• Logical Error
• Physical Error
• Process Address Space
355 ------------------ points to the page table.
• Translation look-aside buffers
• Page offset
• Page-table length register (PRLR)
• Page-table base register (PTBR
AL-JUNAI D INSTITUTE GROUP
356.To eliminate external fragmentation in segmentation the scheme used is
.