Sail E0 Webinar

MCQs

Total Questions : 14 | Page 1 of 2 pages
Question 1. An un-interruptible unit is known as :
  1.    single
  2.    atomic
  3.    static
  4.    None of these
 Discuss Question
Answer: Option B. -> atomic


None.


Question 2. The main disadvantage of spinlocks is that :
  1.    they are not sufficient for many process
  2.    they require busy waiting
  3.    they are unreliable sometimes
  4.    they are too complex for programmers
 Discuss Question
Answer: Option B. -> they require busy waiting


None.


Question 3. Semaphore is a/an _______ to solve the critical section problem.
  1.    hardware for a system
  2.    special program for a system
  3.    integer variable
  4.    None of these
 Discuss Question
Answer: Option C. -> integer variable


None.


Question 4. The TestAndSet instruction is executed :
  1.    after a particular process
  2.    periodically
  3.    atomically
  4.    None of these
 Discuss Question
Answer: Option C. -> atomically


None.


Question 5. Spinlocks are :
  1.    CPU cycles wasting locks over critical sections of programs
  2.    locks that avoid time wastage in context switches
  3.    locks that work better on multiprocessor systems
  4.    All of these
 Discuss Question
Answer: Option D. -> All of these


None.


Question 6. The wait operation of the semaphore basically works on the basic _______ system call.
  1.    stop()
  2.    block()
  3.    hold()
  4.    wait()
 Discuss Question
Answer: Option B. -> block()


None.


Question 7. The code that changes the value of the semaphore is :
  1.    remainder section code
  2.    non "“ critical section code
  3.    critical section code
  4.    None of these
 Discuss Question
Answer: Option C. -> critical section code


None.


Question 8. A semaphore :
  1.    is a binary mutex
  2.    must be accessed from only one process
  3.    can be accessed from multiple processes
  4.    None of these
 Discuss Question
Answer: Option C. -> can be accessed from multiple processes


None.


Question 9. If the semaphore value is negative :
  1.    its magnitude is the number of processes waiting on that semaphore
  2.    it is invalid
  3.    no operation can be further performed on it until the signal operation is performed on it
  4.    None of these
 Discuss Question
Answer: Option A. -> its magnitude is the number of processes waiting on that semaphore


None.


Question 10. What will happen if a non-recursive mutex is locked more than once ?
  1.    Starvation
  2.    Deadlock
  3.    Aging
  4.    Signaling
 Discuss Question
Answer: Option B. -> Deadlock


If a thread which had already locked a mutex, tries to lock the mutex again, it will enter into the waiting list of that mutex, which results in deadlock. It is because no other thread can unlock the mutex.


Latest Videos

Latest Test Papers