Comprehensive Course Work Sample Questions
Operating System
OPERATING SYSTEM(SET 1)
1. The systems which allow only one process execution at a time, are called
a) uniprogramming systems
b) uniprocessing systems
c) unitasking systems
d) none of the mentioned
ANS: b
2. In operating system, each process has its own
a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned
ANS : d
3. In Unix, Which system call creates the new process?
a) fork
b) create
c) new
d) none of the mentioned
ANS: a
4. A process can be terminated due to
a) normal exit
b) fatal error
c) killed by another process
d) all of the mentioned
Ans:d
5. What is the ready state of a process?
a) when process is scheduled to run after some execution
b) when process is unable to run until some task has been completed
c) when process is using the CPU
d) none of the mentioned
Ans : a
6. What is interprocess communication?
a) communication within the process
b) communication between two process
c) communication between two threads of same process
d) none of the mentioned
Ans:b
7. A set of processes is deadlock if
a) each process is blocked and will remain so forever
b) each process is terminated
c) all processes are trying to kill each other
d) none of the mentioned
Ans: a
8. A process stack does not contain
a) Function parameters
b) Local variables
c) Return addresses
d) PID of child process
Ans : d
9. Which system call can be used by a parent process to determine the termination of child
process?
a) wait
b) exit
c) fork
d) get
Ans: a
10. The address of the next instruction to be executed by the current process is provided by the
a) CPU registers
b) Program counter
c) Process stack
d) Pipe
Ans : b
11. A Process Control Block(PCB) does not contain which of the following?
a) Code
b) Stack
c) Bootstrap program
d) Data
Ans: c
12. The number of processes completed per unit time is known as
a) Output
b) Throughput
c) Efficiency
d) Capacity
Ans : b
13. The state of a process is defined by
a) the final activity of the process
b) the activity just executed by the process
c) the activity to next be executed by the process
d) the current activity of the process
Ans : d
14. Which of the following is not the state of a process?
a) New
b) Old
c) Waiting
d) Running
Ans: b
5. What is a Process Control Block?
a) Process type variable
b) Data Structure
c) A secondary storage section
d) A Block in memory
Ans : b
16. The entry of all the PCBs of the current processes is in
a) Process Register
b) Program Counter
c) Process Table
d) Process Unit
Ans : c
17. What is the degree of multiprogramming?
a) the number of processes executed per unit time
b) the number of processes in the ready queue
c) the number of processes in the I/O queue
d) the number of processes in memory
Ans : d
18. A single thread of control allows the process to perform
a) only one task at a time
b) multiple tasks at a time
c) only two tasks at a time
d) all of the mentioned
Ans : a
19. What is the objective of multiprogramming?
a) Have a process running at all time
b) Have multiple programs waiting in a queue ready to run
c) To increase CPU utilization
d) None of the mentioned
Ans :c
20. Which of the following do not belong to queues for processes?
a) Job Queue
b) PCB queue
c) Device Queue
d) Ready Queue
Ans : b
21. When the process issues an I/O request
a) It is placed in an I/O queue
b) It is placed in a waiting queue
c) It is placed in the ready queue
d) It is placed in the Job queue
Ans : a
22. What will happen when a process terminates?
a) It is removed from all queues
b) It is removed from all, but the job queue
c) Its process control block is de-allocated
d) Its process control block is never de-allocated
Ans : a
23. What is a long-term scheduler?
a) It selects processes which have to be brought into the ready queue
b) It selects processes which have to be executed next and allocates CPU
c) It selects processes which heave to remove from memory by swapping
d) None of the mentioned
Ans: a
24. If all processes I/O bound, the ready queue will almost always be and the Short
term Scheduler will have a to do.
a) full, little
b) full, lot
c) empty, little
d) empty, lot
Ans: c
25. What is a medium-term scheduler?
a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of the mentioned
Ans : c
26. What is a short-term scheduler?
a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of the mentioned
Ans: b
27. The primary distinction between the short term scheduler and the long term scheduler is
a) The length of their queues
b) The type of processes they schedule
c) The frequency of their execution
d) None of the mentioned
Ans : c
28. The only state transition that is initiated by the user process itself is
a) block
b) wakeup
c) dispatch
d) none of the mentioned
Ans: a
29. In a time-sharing operating system, when the time slot given to a process is completed, the
process goes from the running state to the
a) Blocked state
b) Ready state
c) Suspended state
d) Terminated state
Ans:b
30. In a multiprogramming environment
a) the processor executes more than one process at a time
b) the programs are developed by more than one person
c) more than one process resides in the memory
d) a single user can execute many programs at the same time
Ans : c
31. Suppose that a process is in “Blocked” state waiting for some I/O service. When the service
is completed, it goes to the
a) Running state
b) Ready state
c) Suspended state
d) Terminated state
Ans: b
32. The context of a process in the PCB of a process does not contain
a) the value of the CPU registers
b) the process state
c) memory-management information
d) context switch time
Ans: d
33. Which of the following need not necessarily be saved on a context switch between
processes?
a) General purpose registers
b) Translation lookaside buffer
c) Program counter
d) All of the mentioned
Ans: b
34. Which of the following does not interrupt a running process?
a) A device
b) Timer
c) Scheduler process
d) Power failure
Ans: c
OPERATING SYSTEM (SET 2)
1. Which process can be affected by other processes executing in the system?
a) cooperating process
b) child process
c) parent process
d) init process
Ans: a
2. When several processes access the same data concurrently and the outcome of the
execution depends on the particular order in which the access takes place is called
a) dynamic condition
b) race condition
c) essential condition
d) critical condition
Ans:b
3. If a process is executing in its critical section, then no other processes can be executing in
their critical section. What is this condition called?
a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion
Ans: a
4. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket
Ans: c
5. A semaphore is a shared integer variable
a) that can not drop below zero
b) that can not be more than zero
c) that can not drop below one
d) that can not be more than one
Ans: a
6. Mutual exclusion can be provided by the
a) mutex locks
b) binary semaphores
c) both mutex locks and binary semaphores
d) none of the mentioned
Ans: c
7. When high priority task is indirectly preempted by medium priority task effectively inverting the
relative priority of the two tasks, the scenario is called
a) priority inversion
b) priority removal
c) priority exchange
d) priority modification
Ans: a
8. Process synchronization can be done on
a) hardware level
b) software level
c) both hardware and software level
d) none of the mentioned
Ans: c
9. A monitor is a module that encapsulates
a) shared data structures
b) procedures that operate on shared data structure
c) synchronization between concurrent procedure invocation
d) all of the mentioned
Ans: d
10. To enable a process to wait within the monitor
a) a condition variable must be declared as condition
b) condition variables must be used as boolean objects
c) semaphore must be used
d) all of the mentioned
Ans: a
1. Restricting the child process to a subset of the parent’s resources prevents any process from
a) overloading the system by using a lot of secondary storage
b) under-loading the system by very less CPU utilization
c) overloading the system by creating a lot of sub-processes
d) crashing the system by utilizing multiple resources
Ans: c
12.A parent process calling system call will be suspended until children processes
terminate.
a) wait
b) fork
c) exit
d) exec
Ans: a
13. Cascading termination refers to termination of all child processes if the parent process
terminates
a) Normally
b) Abnormally
c) Normally or abnormally
d) None of the mentioned
Ans: c
14. With only one process can execute at a time; meanwhile all other process
are waiting for the processor. With more than one process can be running
simultaneously each on a different processor.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing
d) Uniprogramming, Multiprocessing
Ans : d
15. In UNIX, each process is identified by its
a) Process Control Block
b) Device Queue
c) Process Identifier
d) None of the mentioned
Ans: c
16. In UNIX, the return value for the fork system call is for the child process and
for the parent process.
a) A Negative integer, Zero
b) Zero, A Negative integer
c) Zero, A nonzero integer
d) A nonzero integer, Zero
Ans: c
17. The child process can
a) be a duplicate of the parent process
b) never be a duplicate of the parent process
c) cannot have another program loaded into it
d) never have another program loaded into it
Ans: a
18. The child process completes execution, but the parent keeps executing, then the child
process is known as
a) Orphan
b) Zombie
c) Body
d) Dead
Ans: b
19. What is Interprocess communication?
a) allows processes to communicate and synchronize their actions when using the same
address space
b) allows processes to communicate and synchronize their actions
c) allows the processes to only synchronize their actions without communication
d) none of the mentioned
Ans: b
20. Message passing system allows processes to
a) communicate with each other without sharing the same address space
b) communicate with one another by resorting to shared data
c) share data
d) name the recipient or sender of the message
Ans: a
21. Which of the following two operations are provided by the IPC facility?
a) write & delete message
b) delete & receive message
c) send & delete message
d) receive & send message
Ans: d
22. Messages sent by a process
a) have to be of a fixed size
b) have to be a variable size
c) can be fixed or variable sized
d) none of the mentioned
Ans: c
23. The link between two processes P and Q to send and receive messages is called
a) communication link
b) message-passing link
c) synchronization link
d) all of the mentioned
Ans: a
24. Which of the following are TRUE for direct communication?
a) A communication link can be associated with N number of process(N = max. number of
processes supported by system)
b) A communication link is associated with exactly two processes
c) Exactly N/2 links exist between each pair of processes(N = max. number of processes
supported by system)
d) Exactly two link exists between each pair of processes
Ans:b
25. In indirect communication between processes P and Q
a) there is another process R to handle and pass on the messages between P and Q
b) there is another machine between the two processes to help communication
c) there is a mailbox to help communication between P and Q
d) none of the mentioned
Ans: c
26. In the non blocking send
a) the sending process keeps sending until the message is received
b) the sending process sends the message and resumes operation
c) the sending process keeps sending until it receives a message
d) none of the mentioned
Ans: b
27. In the Zero capacity queue
a) the queue can store at least one message
b) the sender blocks until the receiver receives the message
c) the sender keeps sending and the messages don’t wait in the queue
d) none of the mentioned
Ans:b
28. The Zero Capacity queue
a) is referred to as a message system with buffering
b) is referred to as a message system with no buffering
c) is referred to as a link
d) none of the mentioned
Ans : b
29. Bounded capacity and Unbounded capacity queues are referred to as
a) Programmed buffering
b) Automatic buffering
c) User defined buffering
d) No buffering
Ans: b
30. Remote Procedure Calls are used
a) for communication between two processes remotely different from each other on the same
system
b) for communication between two processes on the same system
c) for communication between two processes on separate systems
d) none of the mentioned
Ans: c
31. To differentiate the many network services a system supports are used.
a) Variables
b) Sockets
c) Ports
d) Service names
Ans: c
32. RPC provides a(an) on the client-side, a separate one for each remote procedure.
a) stub
b) identifier
c) name
d) process identifier
Ans: a
33. What is stub?
a) transmits the message to the server where the server side stub receives the message and
invokes procedure on the server side
b) packs the parameters into a form transmittable over the network
c) locates the port on the server
d) all of the mentioned
Ans: d
34. To resolve the problem of data representation on different systems RPCs define
a) machine dependent representation of data
b) machine representation of data
c) machine-independent representation of data
d) none of the mentioned
Ans c
35. The remote method invocation
a) allows a process to invoke memory on a remote object
b) allows a thread to invoke a method on a remote object
c) allows a thread to invoke memory on a remote object
d) allows a process to invoke a method on a remote object
Ans:b
36. A process that is based on IPC mechanism which executes on different systems and can
communicate with other processes using message based communication, is called
a) Local Procedure Call
b) Inter Process Communication
c) Remote Procedure Call
d) Remote Machine Invocation
Ans: c
37. The initial program that is run when the computer is powered up is called
a) boot program
b) bootloader
c) initializer
d) bootstrap program
Ans : d
38. How does the software trigger an interrupt?
a) Sending signals to CPU through bus
b) Executing a special operation called system call
c) Executing a special program called system program
d) Executing a special program called interrupt trigger program
Ans: b
39. What is a trap/exception?
a) hardware generated interrupt caused by an error
b) software generated interrupt caused by an error
c) user generated interrupt caused by an error
d) none of the mentioned
Ans: b
40. What is an ISR?
a) Information Service Request
b) Interrupt Service Request
c) Interrupt Service Routine
d) Information Service Routine
Ans: c
41. What is an interrupt vector?
a) It is an address that is indexed to an interrupt handler
b) It is a unique device number that is indexed by an address
c) It is a unique identity given to an interrupt
d) None of the mentioned
Ans: a
42. DMA is used for
a) High speed devices(disks and communications network)
b) Low speed devices
c) Utilizing CPU cycles
d) All of the mentioned
Ans: a
43. In a memory mapped input/output
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready
b) the CPU writes one data byte to the data register and sets a bit in control register to show
that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly
Ans: b
44. In a programmed input/output(PIO)
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready
b) the CPU writes one data byte to the data register and sets a bit in control register to show
that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly
Ans: a
45. In an interrupt driven input/output
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready
b) the CPU writes one data byte to the data register and sets a bit in control register to show
that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly
Ans: c
46. In the layered approach of Operating Systems
a) Bottom Layer(0) is the User interface
b) Highest Layer(N) is the User interface
c) Bottom Layer(N) is the hardware
d) Highest Layer(N) is the hardware
Ans: b
47. How does the Hardware trigger an interrupt?
a) Sending signals to CPU through a system bus
b) Executing a special program called interrupt program
c) Executing a special program called system program
d) Executing a special operation called system call
Ans: a
48. Which operation is performed by an interrupt handler?
a) Saving the current state of the system
b) Loading the interrupt handling code and executing it
c) Once done handling, bringing back the system to the original state it was before the interrupt
occurred
d) All of the mentioned
Ans: d
OPERATING SYSTEM SET 3
1. Which module gives control of the CPU to the process selected by the short-term scheduler?
a) dispatcher
b) interrupt
c) scheduler
d) none of the mentioned
Ans: a
2. The processes that are residing in main memory and are ready and waiting to execute are
kept on a list called
a) job queue
b) ready queue
c) execution queue
d) process queue
Ans: b
3. The interval from the time of submission of a process to the time of completion is termed as
a) waiting time
b) turnaround time
c) response time
d) throughput
Ans: b
4. Which scheduling algorithm allocates the CPU first to the process that requests the CPU
first?
a) first-come, first-served scheduling
b) shortest job scheduling
c) priority scheduling
d) none of the mentioned
Ans: a
5. In priority scheduling algorithm
a) CPU is allocated to the process with highest priority
b) CPU is allocated to the process with lowest priority
c) Equal priority processes can not be scheduled
d) None of the mentioned
Ans: a
6. In priority scheduling algorithm, when a process arrives at the ready queue, its priority is
compared with the priority of
a) all process
b) currently running process
c) parent process
d) init process
Ans: b
7. Which algorithm is defined in Time quantum?
a) shortest job scheduling algorithm
b) round robin scheduling algorithm
c) priority scheduling algorithm
d) multilevel queue scheduling algorithm
Ans: b
8. Process are classified into different groups in
a) shortest job scheduling algorithm
b) round robin scheduling algorithm
c) priority scheduling algorithm
d) multilevel queue scheduling algorithm
Ans: d
9. In multilevel feedback scheduling algorithm
a) a process can move to a different classified ready queue
b) classification of ready queue is permanent
c) processes are not classified into groups
d) none of the mentioned
Ans: a
10. Which one of the following can not be scheduled by the kernel?
a) kernel level thread
b) user level thread
c) process
d) none of the mentioned
Ans: b
11. CPU scheduling is the basis of
a) multiprocessor systems
b) multiprogramming operating systems
c) larger memory sized systems
d) none of the mentioned
Ans: b
12. With multiprogramming is used productively.
a) time
b) space
c) money
d) all of the mentioned
Ans: a
13. What are the two steps of a process execution?
a) I/O & OS Burst
b) CPU & I/O Burst
c) Memory & I/O Burst
d) OS & Memory Burst
Ans: b
14. An I/O bound program will typically have
a) a few very short CPU bursts
b) many very short I/O bursts
c) many very short CPU bursts
d) a few very short I/O bursts
Ans: c
15. A process is selected from the queue by the scheduler, to be executed.
a) blocked, short term
b) wait, long term
c) ready, short term
d) ready, long term
Ans: c
16. In the following cases non – preemptive scheduling occurs?
a) When a process switches from the running state to the ready state
b) When a process goes from the running state to the waiting state
c) When a process switches from the waiting state to the ready state
d) All of the mentioned
Ans: b
17. The switching of the CPU from one process or thread to another is called
a) process switch
b) task switch
c) context switch
d) all of the mentioned
Ans: d
18. What is Dispatch latency?
a) the speed of dispatching a process from running to the ready state
b) the time of dispatching a process from running to ready state and keeping the CPU idle
c) the time to stop one process and start running another one
d) none of the mentioned
Ans: c
19. Scheduling is done so as to
a) increase CPU utilization
b) decrease CPU utilization
c) keep the CPU more idle
d) none of the mentioned
Ans: a
20. Scheduling is done so as to
a) increase the throughput
b) decrease the throughput
c) increase the duration of a specific amount of work
d) none of the mentioned
Ans: a
21. What is Turnaround time?
a) the total waiting time for a process to finish execution
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process
Ans: d
22. Scheduling is done so as to
a) increase the turnaround time
b) decrease the turnaround time
c) keep the turnaround time same
d) there is no relation between scheduling and turnaround time
Ans: b
23. What is Waiting time?
a) the total time in the blocked and waiting queues
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process
Ans: b
24. Scheduling is done so as to
a) increase the waiting time
b) keep the waiting time the same
c) decrease the waiting time
d) none of the mentioned
Ans: c
25. What is Response time?
a) the total time taken from the submission time till the completion time
b) the total time taken from the submission time till the first response is produced
c) the total time taken from submission time till the response is output
d) none of the mentioned
Ans: b
26. Round robin scheduling falls under the category of
a) Non-preemptive scheduling
b) Preemptive scheduling
c) All of the mentioned
d) None of the mentioned
Ans: b
27. With round robin scheduling algorithm in a time shared system
a) using very large time slices converts it into First come First served scheduling algorithm
b) using very small time slices converts it into First come First served scheduling algorithm
c) using extremely small time slices increases performance
d) using very small time slices converts it into Shortest Job First algorithm
Ans: a
28. The portion of the process scheduler in an operating system that dispatches processes is
concerned with
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) all of the mentioned
Ans: a
29. Complex scheduling algorithms
a) are very appropriate for very large computers
b) use minimal resources
c) use many resources
d) all of the mentioned
Ans: a
30. What is FIFO algorithm?
a) first executes the job that came in last in the queue
b) first executes the job that came in first in the queue
c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs
Ans: b
31. The strategy of making processes that are logically runnable to be temporarily suspended is
called
a) Non preemptive scheduling
b) Preemptive scheduling
c) Shortest job first
d) First come First served
Ans: b
32. What is Scheduling?
a) allowing a job to use the processor
b) making proper use of processor
c) all of the mentioned
d) none of the mentioned
Ans: a
33. Orders are processed in the sequence they arrive if rule sequences the jobs.
a) earliest due date
b) slack time remaining
c) first come, first served
d) critical ratio
Ans: c
34. Which of the following algorithms tends to minimize the process flow time?
a) First come First served
b) Shortest Job First
c) Earliest Deadline First
d) Longest Job First
Ans: b
35. Under multiprogramming, turnaround time for short jobs is usually and that for
long jobs is slightly
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
Ans : b
36. Which of the following statements are true? (GATE 2010)
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
Ans: d
OPERATING SYSTEM SET 4
1. Which is the most optimal scheduling algorithm?
a) FCFS – First come First served
b) SJF – Shortest Job First
c) RR – Round Robin
d) None of the mentioned
Ans : b
2. The real difficulty with SJF in short term scheduling is
a) it is too good an algorithm
b) knowing the length of the next CPU request
c) it is too complex to understand
d) none of the mentioned
Ans: b
3. The FCFS algorithm is particularly troublesome for
a) time sharing systems
b) multiprogramming systems
c) multiprocessor systems
d) operating systems
Ans:b
4. Preemptive Shortest Job First scheduling is sometimes called
a) Fast SJF scheduling
b) EDF scheduling – Earliest Deadline First
c) HRRN scheduling – Highest Response Ratio Next
d) SRTN scheduling – Shortest Remaining Time Next
Ans:d
5. An SJF algorithm is simply a priority algorithm where the priority is
a) the predicted next CPU burst
b) the inverse of the predicted next CPU burst
c) the current CPU burst
d) anything the user wants
Ans: a
6. Choose one of the disadvantages of the priority scheduling algorithm?
a) it schedules in a very complex manner
b) its scheduling takes up a lot of time
c) it can lead to some low priority process waiting indefinitely for the CPU
d) none of the mentioned
Ans: c
7. What is ‘Aging’?
a) keeping track of cache contents
b) keeping track of what pages are currently residing in memory
c) keeping track of how many times a given page is referenced
d) increasing the priority of jobs to ensure termination in a finite time
Ans: d
8. A solution to the problem of indefinite blockage of low – priority processes is
a) Starvation
b) Wait queue
c) Ready queue
d) Aging
Ans: d
9. Which of the following statements are true? (GATE 2010)
i) Shortest remaining time first scheduling may cause starvation
ii) Preemptive scheduling may cause starvation
iii) Round robin is better than FCFS in terms of response time
a) i only
b) i and iii only
c) ii and iii only
d) i, ii and iii
Ans: d
10. Which of the following scheduling algorithms gives minimum average waiting time?
a) FCFS
b) SJF
c) Round – robin
d) Priority
Ans: b
11. Concurrent access to shared data may result in
a) data consistency
b) data insecurity
c) data inconsistency
d) none of the mentioned
Ans: c
12. A situation where several processes access and manipulate the same data concurrently and
the outcome of the execution depends on the particular order in which access takes place is
called
a) data consistency
b) race condition
c) aging
d) starvation
Ans: b
13. The segment of code in which the process may change common variables, update tables,
write into files is known as
a) program
b) critical section
c) non – critical section
d) synchronizing
Ans:b
14. Which of the following conditions must be satisfied to solve the critical section problem?
a) Mutual Exclusion
b) Progress
c) Bounded Waiting
d) All of the mentioned
Ans:d
15. Mutual exclusion implies that
a) if a process is executing in its critical section, then no other process must be executing in
their critical sections
b) if a process is executing in its critical section, then other processes must be executing in their
critical sections
c) if a process is executing in its critical section, then all the resources of the system must be
blocked until it finishes execution
d) none of the mentioned
Ans:a
16. Bounded waiting implies that there exists a bound on the number of times a process is
allowed to enter its critical section
a) after a process has made a request to enter its critical section and before the request is
granted
b) when another process is in its critical section
c) before a process has made a request to enter its critical section
d) none of the mentioned
Ans: a
17. A minimum of variable(s) is/are required to be shared between processes to solve the
critical section problem.
a) one
b) two
c) three
d) four
Ans: b
18. In the bakery algorithm to solve the critical section problem
a) each process is put into a queue and picked up in an ordered manner
b) each process receives a number (may or may not be unique) and the one with the lowest
number is served next
c) each process gets a unique number and the one with the highest number is served next
d) each process gets a unique number and the one with the lowest number is served next
Ans: b
19. An un-interruptible unit is known as
a) single
b) atomic
c) static
d) none of the mentioned
Ans:b
20. TestAndSet instruction is executed
a) after a particular process
b) periodically
c) atomically
d) none of the mentioned
Ans: c
21. Semaphore is a/an to solve the critical section problem.
a) hardware for a system
b) special program for a system
c) integer variable
d) none of the mentioned
Ans: c
22. What are the two atomic operations permissible on semaphores?
a) wait
b) stop
c) hold
d) none of the mentioned
Ans: a
23. What are Spinlocks?
a) CPU cycles wasting locks over critical sections of programs
b) Locks that avoid time wastage in context switches
c) Locks that work better on multiprocessor systems
d) All of the mentioned
Ans: d
24. What is the main disadvantage of spinlocks?
a) they are not sufficient for many process
b) they require busy waiting
c) they are unreliable sometimes
d) they are too complex for programmers
Ans:b
25. The wait operation of the semaphore basically works on the basic system call.
a) stop()
b) block()
c) hold()
d) wait()
Ans: b
26. The signal operation of the semaphore basically works on the basic system call.
a) continue()
b) wakeup()
c) getup()
d) start()
Ans:b
27. If the semaphore value is negative
a) its magnitude is the number of processes waiting on that semaphore
b) it is invalid
c) no operation can be further performed on it until the signal operation is performed on it
d) none of the mentioned
Ans: a
28. The code that changes the value of the semaphore is
a) remainder section code
b) non – critical section code
c) critical section node
d) none of the mentioned
Ans:c
29. What will happen if a non-recursive mutex is locked more than once?
a) Starvation
b) Deadlock
c) Aging
d) Signaling
Ans:b
30. What is a semaphore?
a) is a binary mutex
b) must be accessed from only one process
c) can be accessed from multiple processes
d) none of the mentioned
Ans: c
31. What are the two kinds of semaphores?
a) mutex & counting
b) binary & counting
c) counting & decimal
d) decimal & binary
Ans: b
32. What is a mutex?
a) is a binary mutex
b) must be accessed from only one process
c) can be accessed from multiple processes
d) none of the mentioned
Ans: b
33. A binary semaphore is a semaphore with integer values
a) 1
b) -1
c) 0.8
d) 0.5
Ans: a
34. Semaphores are mostly used to implement
a) System calls
b) IPC mechanisms
c) System protection
d) None of the mentioned
Ans:b