Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. One of the following statements are false about interrupts: a. If the interru

ID: 3910054 • Letter: 1

Question

1. One of the following statements are false about interrupts:
a. If the interrupts are enabled, the CPU checks for interrupts after the execution of every instruction
b. If an interrupt is detected, the currently running program is terminated and replaced by an interrupt handler
c. Interrupt vector is a table containing addresses of the interrupt handlers.
d. Interrupts may have different priorities
e. Interrupts can be disabled only when the CPU is in kernel mode.
2. One of the following statements is false:
a. The only way a user process can enter a kernel mode is by performing system call, which will give the control to the OS kernel.
b. I/O hardware can be directly accessed only by a process running in the kernel mode.
c. If a privileged instruction is executed while the CPU is in the user mode, an interrupt is raised and the current process is terminated.
d. Any process can change from user mode to kernel(privileged) mode and continue executing its own code, but when its kernel mode work is done, the control is given to the
OS kernel to check for any unauthorized access.
e. If a user process needs to perform I/O operation, it has to make a system call to ask the OS kernel to perform it in its behalf.
3. Two of the following statements are false about process states and state transitions:
a. A process state changes from NEW to READY when it is admitted to the system by the long term scheduler
b. Process state changes from RUNNING to WAITING when its time slice expires
c. Only processes in the READY state can change into RUNNING state.
d. If a process is preempted, its state changes to READY.
e. There can be several processes in the WAITING state, but only one in the READY state.
4. One of the following statements is false about processes and threads:
a. Context switching for threads requires less overhead that for processes.
b. When a process invokes an I/O system call, its state may be changed from executing to waiting.
c. With the many to one model, user threads are managed by the kernel.
d. One task of context switching is to store the CPU state in the PCB.
e. Overhead in creating and terminating threads can be reduced through the use of thread pools.
5. One of the following statements is true about processes and threads:
a. Threads share the same address space, including code segment, data segment, stack pointer and program counter
b. User threads do not share memory, only kernel threads do
c. Thread library implementing many-to-one model can make use of at most 4 CPUs.
d. When one thread of a process makes exec() call, all threads are terminated.
e. The thread library is responsible for thread scheduling, regardless of which model (manyto-one, one-to-one, many-to-many) is used.
6. Two of the following statements about scheduling are false:
a. Preemptive scheduler lets the process finish its CPU burst, but preempts the process when it starts blocking I/O operation
b. Round Robin is a preemptive scheduler and does not suffer from starvation
c. Non-preemptive schedulers suffer from the convoy effect.
d. Shortest-Job-First scheduler is only of theoretical interest, as we cannot know the future CPU burst lengths
e. Multilevel Feedback Queue scheduler gives priority to I/O intensive processes
7. Solution requirements for the critical section problem are:
a. Progress, Mutual exclusion and Bounded Waiting.
b. Progress, Interleaved execution, and Mutual Exclusion
c. Bounded waiting, Simultaneous memory access, and Efficiency.
d. Efficiency, Progress, and Bounded Waiting.
e. Simultaneous memory access, Mutual Exclusion, and Progress.
8. One of the following statements is true:
a. Peterson’s algorithm does not have busy waiting
b. Unlike Peterson's algorithm, using hardware instructions (test&set, xchng) eliminates busy waiting.
c. Unlike hardware instructions (test&set, xchng), semaphores allow elimination of busy waiting.
d. If a process/thread invokes the wait() method of a semaphore, it will block until some other process/thread calls the signal() method
e. Interrupt disabling ensures mutual exclusion on single- and multi-CPU computers, but on a multi-CPU computer a process can be preempted even if the interrupts are disabled.

Explanation / Answer

Answer)

1 e) Interrupts can be disabled only when CPU is in kernel mode.

Please note: As per Chegg policy, if any question has multiple questions then a minimum of one question can be answered. If you wish to get all the answers please help to re-post the same in separate questions instead of down rating the same.