Operating System MCQ Number 01284

Operating System MCQ Set 1

1. Virtual memory uses disk space as an extension of ___
a) secondary storage
b) main memory
c) tertiary storage
d) none of the mentioned

Answer

Answer: b [Reason:] None.

2. Using swap space significantly ___ system performance.
a) increases
b) decreases
c) maintains
d) does not affect

Answer

Answer: b [Reason:] Disk access is much slower than memory access.

3. Linux ____ the use of multiple swap spaces.
a) allows
b) does not allow
c) may allow
d) none of the mentioned

Answer

Answer: a [Reason:] Putting these swap spaces on seperate disks reduces the load places on the I/O system.

4. A single swap space ______ reside in two places.
a) can
b) cannot
c) must not
d) none of the mentioned

Answer

Answer: a [Reason:] None.

5. If the swap space is simply a large file, within the file system, ______ used to create it, name it and allocate its space.
a) special routines must be
b) normal file system routines can be
c) normal file system routines cannot be
d) swap space storage manager is

Answer

Answer: b [Reason:] None.

6. For swap space created in a seperate disk partition where no file system or directory structure is placed, _______ used to allocate and deallocate the blocks.
a) special routines must be
b) normal file system routines can be
c) normal file system routines cannot be
d) swap space storage manager is

Answer

Answer: d [Reason:] None.

7. When a fixed amount of swap space is created during disk partitioning, more swap space can be added only by :
I) repartitioning of the disk
II) adding another swap space elsewhere
a) only I
b) only II
c) both I and II
d) neither I nor II

Answer

Answer: c [Reason:] None.

8. In UNIX, two per process ________ are used by the kernel to track swap space use.
a) process tables
b) swap maps
c) memory maps
d) partition maps

Answer

Answer: b [Reason:] None.

9. It is ____ to reread a page from the file system than to write it to swap space and then to reread it from there.
a) useless
b) less efficient
c) more efficient
d) none of the mentioned

Answer

Answer: c [Reason:] None.

Operating System MCQ Set 2

1. Thread cancellation is :
a) the task of destroying the thread once its work is done
b) the task of removing a thread once its work is done
c) the task of terminating a thread before it has completed
d) none of the mentioned

Answer

Answer: c [Reason:] None.

2. When a web page is loading, and the user presses a button on the browser to stop loading the page :
a) the thread loading the page continues with the loading
b) the thread loading the page does not stop, but continues with another task
c) the thread loading the page is paused
d) the thread loading the page is cancelled

Answer

Answer: d [Reason:] None.

3. When one thread immediately terminates the target thread, it is called :
a) Asynchronous cancellation
b) Systematic cancellation
c) Sudden Termination
d) Deferred cancellation

Answer

Answer: a [Reason:] None.

4. When the target thread periodically checks if it should terminate and terminates itself in an orderly manner, it is called :
a) Asynchronous cancellation
b) Systematic cancellation
c) Sudden Termination
d) Deferred cancellation

Answer

Answer: d [Reason:] None.

5. Cancelling a thread asynchronously :
a) frees all the resources properly
b) may not free each resource
c) spoils the process execution
d) none of the mentioned

Answer

Answer: b [Reason:] None.

6. Cancellation point is the point where :
a) the thread can be cancelled – safely or otherwise doesnt matter
b) the thread can be cancelled safely
c) the whole process can be cancelled safely
d) none of the mentioned

Answer

Answer: b [Reason:] None.

7. If multiple threads are concurrently searching through a database and one thread returns the result then the remaining threads must be :
a) continued
b) cancelled
c) protected
d) none of the mentioned

Answer

Answer: b [Reason:] None.

Operating System MCQ Set 3

1. Which of the following system calls does not return control to the calling point, on termination ?
a) fork
b) exec
c) ioctl
d) longjmp

Answer

Answer: b [Reason:] None.

2. The following program:

   main()
   {
      if(fork()>0)
      sleep(100);
   }

results in the creation of:
a) an orphan process
b) a zombie process
c) a process that executes forever
d) none of the mentioned

Answer

Answer: b [Reason:] None.

3. Which of the following system calls transforms executable binary file into a process ?
a) fork
b) exec
c) ioctl
d) longjmp

Answer

Answer: b [Reason:] None.

4. The following C program :

 main()
   {
     fork();fork();printf("yes");
   }
   prints yes:

a) only once
b) twice
c) four times
d) eight times

Answer

Answer: c [Reason:] None.

5. Which of the following calls never returns an error ?
a) getpid
b) fork
c) ioctl
d) open

Answer

Answer: a [Reason:] None.

6. A fork system call will fail if :
a) the previously executed statement is also a fork call
b) the limit on the maximum number of processes in the system would be executed
c) the limit on the minimum number of processes that can be under execution by a single user would be executed
d) all of the mentioned

Answer

Answer: b [Reason:] None.

7. If a thread invokes the exec system call,
a) only the exec executes as a separate process.
b) the program specified in the parameter to exec will replace the entire process
c) the exec is ignored as it is invoked by a thread.
d) none of the mentioned

Answer

Answer: b [Reason:] None.

8. If exec is called immediately after forking,
a) the program specified in the parameter to exec will replace the entire process
b) all the threads will be duplicated
c) all the threads may be duplicated
d) none of the mentioned

Answer

Answer: a [Reason:] None.

9. If a process does not call exec after forking,
a) the program specified in the parameter to exec will replace the entire process
b) all the threads should be duplicated
c) all the threads should not be duplicated
d) none of the mentioned

Answer

Answer: b [Reason:] The new process is purely based on fork, due to no exec command, duplication will be done.

Operating System MCQ Set 4

1. Thread pools are useful when :
a) when we need to limit the number of threads running in the application at the same time
b) when we need to limit the number of threads running in the application as a whole
c) when we need to arrange the ordering of threads
d) none of the mentioned

Answer

Answer: a [Reason:] None.

2. Instead of starting a new thread for every task to execute concurrently, the task can be passed to a _____
a) process
b) thread pool
c) thread queue
d) none of the mentioned

Answer

Answer: b [Reason:] None.

3. Each connection arriving at multi threaded servers via network is generally :
a) is directly put into the blocking queue
b) is wrapped as a task and passed on to a thread pool
c) is kept in a normal queue and then sent to the blocking queue from where it is dequeued
d) none of the mentioned

Answer

Answer: b [Reason:] None.

4. The idea behind thread pools is :
a) a number of threads are created at process startup and placed in a pool where they sit and wait for work
b) when a process begins, a pool of threads is chosen from the many existing and each thread is allotted equal amount of work
c) all threads in a pool distribute the task equally among themselves
d) none of the mentioned

Answer

Answer: a [Reason:] None.

5. If the thread pool contains no available thread :
a) the server runs a new process
b) the server goes to another thread pool
c) the server demands for a new pool creation
d) the server waits until one becomes free

Answer

Answer: d [Reason:] None.

6. Thread pools help in :
a) servicing multiple requests using one thread
b) servicing a single request using multiple threads from the pool
c) faster servicing of requests with an existing thread rather than waiting to create a new thread
d) none of the mentioned

Answer

Answer: c [Reason:] None.

7. Thread pools limit the number of threads that exist at any one point, hence :
a) not letting the system resources like CPU time and memory exhaust
b) helping a limited number of processes at a time
c) not serving all requests and ignoring many
d) none of the mentioned

Answer

Answer: a [Reason:] None.

8. The number of the threads in the pool can be decided on factors such as :
a) number of CPUs in the system
b) amount of physical memory
c) expected number of concurrent client requests
d) all of the mentioned

Answer

Answer: d [Reason:] None.

Operating System MCQ Set 5

1. Signals that occur at the same time, are presented to the process :
a) one at a time, in a particular order
b) one at a time, in no particular order
c) all at a time
d) none of the mentioned

Answer

Answer: b [Reason:] None.

2. Which of the following is not TRUE :
a) Processes may send each other signals
b) Kernel may send signals internally
c) a field is updated in the signal table when the signal is sent
d) each signal is maintained by a single bit

Answer

Answer: c [Reason:] A field is updated in the process table when the signal is sent.

3. Signals of a given type :
a) are queued
b) are all sent as one
c) cannot be queued
d) none of the mentioned

Answer

Answer: b [Reason:] The signal handler will be invoked only once.

4. The three ways in which a process responds to a signal are :
a) ignoring the signal
b) handling the signal
c) performing some default action
d) all of the mentioned

Answer

Answer: d [Reason:] None.

5. Signals are identified by :
a) signal identifiers
b) signal handlers
c) signal actions
d) none of the mentioned

Answer

Answer: a [Reason:] None.

6. When a process blocks the receipt of certain signals :
a) The signals are delivered
b) The signals are not delivered
c) The signals are received until they are unblocked
d) The signals are received by the process once they are delivered

Answer

Answer: a [Reason:] None.

7. The _______ maintains pending and blocked bit vectors in context of each process.
a) CPU
b) Memory
c) Process
d) Kernel

Answer

Answer: d [Reason:] None.

8. In UNIX, the set of masked signals can be set or cleared using the ________ function.
a) sigmask
b) sigmaskproc
c) sigprocmask
d) sigproc

Answer

Answer: c [Reason:] None.

9. The usefulness of signals as a general inter process communication mechanism is limited because :
a) they do not work between processes
b) they are user generated
c) they cannot carry information directly
d) none of the mentioned

Answer

Answer: c [Reason:] None.

10. The usual effect of abnormal termination of a program is :
a) core dump file generation
b) system crash
c) program switch
d) signal destruction

Answer

Answer: a [Reason:] None.

11. In UNIX, the abort() function sends the ________ signal to the calling process, causing abnormal termination.
a) SIGTERM
b) SIGSTOP
c) SIGABORT
d) SIGABRT

Answer

Answer: d [Reason:] None.

12. In most cases, if a process is sent a signal while it is executing a system call :
a) the system call will continue execution and the signal will be ignored completely
b) the system call is interrupted by the signal, and the signal handler comes in
c) the signal has no effect until the system call completes
d) none of the mentioned

Answer

Answer: c [Reason:] None.

13. A process can never be sure that a signal it has sent _______
a) has which identifier
b) has not been lost
c) has been sent
d) all of the mentioned

Answer

Answer: b [Reason:] None.

14. In UNIX, the _____ system call is used to send a signal.
a) sig
b) send
c) kill
d) sigsend

Answer

Answer: c [Reason:] None.

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.