You are on page 1of 16

CS604 Operating Systems

MCQz solved, by

Miss Kazmi.
http://vustudents.ning.com

Bounded Buffer is a buffer of ____________ size Variable Fixed P/41

___________ is also called Swapper. Long term Short term Medium term Swap space Shared libraries and kernel modules are stored in _____________ directory. /bin /dev /boot /lib P/23 P/34

__________ displays information about the top processes. Is Cs Top Cd Cooperating processes never share any data, code, memory or state. True False P/2 , 41, 97 P/64

Miss Kazmi
http://vustudents.ning.com

First _______ entries in Per Process File Descriptor Table are used as soon as the process is created. 1 2 3 4 When process opens its first file e xplicitly it will get descriptor number _________ 1 2 3 4 Taking the CPU from one process and giving the CPU to another process is termed as Context Switching Dispatching Swapping Tracking __________ scheduler selects the process from the job pool and put them in main memory. Long term Short term Medium term Swapper P/33 P/31 Google

1. Linux OS can support multiple users at a time a) b) True False

2. The Operating system is a layer of software b etween _________ and ___________. a) hardware, software application P/1

Miss Kazmi
http://vustudents.ning.com

b) c) d)

Kernel, hardware Dos, Windows Windows, Kernel

3. The major advantage of multi -programming system is a) b) c) d) More than one jobs can be processed at a giv en time CPU utilization can be increased Jobs can be completed quickly All of the options are correct P/7

4. The main characteristic of a Real time system is a) b) c) d) Efficiency Large Virtual Memory Large secondary storage device Usability P/6

5. Command-line interpreter is also called __________ in some operating systems. a) b) c) d) Kernel Shell Signal API P/13

6. I/O instructions are Privileged Instructions. a) b) True False P/8

7. In Linux directory structure, there is ___________ root directory. a) b) c) d) 1 2 3 4 P/22

8. Utilities used for system administration (halt, ifconfig, fdisk, etc.) are stored in _____________ directory.

Miss Kazmi
http://vustudents.ning.com

a) b) c) d)

/dev /boot /lib /sbin P/24

9. rm and rmkdir commands are used to _____________ directory. a) b) c) d) Create Move Remove Modify

10. You can use the mv file1 file2command to move ______________ a) b) c) d) e) file1 to file2. file 2 to file 1 this command will not work for moving files None of the option is correct. Both option a and b are correct

11. Taking the CPU from one process and giving the CPU to another process is termed as a) b) c) d) Context Switching Dispatching Swapping Tracking P/31

12. ___________ scheduler is also called Swapper. a) b) c) d) Long term Short term Medium term Swap space

Miss Kazmi
http://vustudents.ning.com

13. A Process A that has finished working, a s well as its parent process has also finished its execution. In this state the process A will be called as _________ process. a) b) c) d) Child Thread Zombie Fork

14. Bounded Buffer is a buffer of ____________ size a) b) variable Fixed

15. In ________ communication the process which wants to communicate with the other process must explicitly name the recipient and the sender. a) b) c) d) Direct Indirect Automatic Self P/43

16. In indirect inter pro cess communication, a sender ________ mention the name of the recipient. a) b) does does not

17. The returned code to the child process after successful fork system call execution is a) b) c) d) 1 2 3 0

18. If the fork system call fails, it returns a) 1

Miss Kazmi
http://vustudents.ning.com

b) c) d)

-1 2 0

19. When a process opens its first file explicitly it will get descriptor number _________ a) b) c) d) 1 2 3 4 Google

Normally, a process will start out with file descriptors 0, 1 and 2 assigned to stdin, stdout and stderr, and the first file descriptor that you explicitly open will be 3, so you'll get away with it!

20. In Unix/ Linux, by default the standard input file is attached to the ___________ a) b) c) d) Mouse Keyboard Light pen Joystick P/52

The file descriptor for Standard Input (stdin) is ---------------0 1 2 3 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

Miss Kazmi
http://vustudents.ning.com

T F User mode can run the Privileged instructions T F

Google

________________ algorithm is the optimal scheduling algorithm among all the nonpreemptive scheduling algorithms. SJF Priority FCFS RR A semaphore that cause Busy-Waiting is termed as ___________. Spinlock Critical Section Monitor Critical Region P/111

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

Miss Kazmi
http://vustudents.ning.com

Write () Close () are used for communication between related processes on a system. Pipe FIFO None Named Fifo P/49

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
top who ls

P/63

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

fg
bg jobs kill

P/65

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

bg
jobs kill

P/65

You can terminate a foreground process by pressing -------------<Ctrl-A> <Ctrl-C> P/66 <Ctrl-Z> None of the given options

Miss Kazmi
http://vustudents.ning.com

In Unix/ Linux, by default the standard output file is attached to the ___________ Select correct option: File Screen Printer Scanner

P/52

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:

Miss Kazmi
http://vustudents.ning.com

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 cs mv P/25

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

Miss Kazmi
http://vustudents.ning.com

10

cp
mv mkdir

P/27

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

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

Miss Kazmi
http://vustudents.ning.com

11

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

Miss Kazmi
http://vustudents.ning.com

12

Process You can display the contents (names of files and directories) of a directory in UNIX/Linux directory structure with the --------------- command. l s 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 cmd cat grep P/91

The nice value helps in assigning ______ to a process. Select correct option: Priority Weight Time Scheduling P/91

Miss Kazmi
http://vustudents.ning.com

13

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

Miss Kazmi
http://vustudents.ning.com

14

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: Littles Formula Deterministic Modeling Queuing Theory Queuing analysis P/94

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

Miss Kazmi
http://vustudents.ning.com

15

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--; }

Miss Kazmi
http://vustudents.ning.com

16

You might also like