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

Q1 (8 points) Answer with True\" or \"False\" (a) In demand paging pages are bro

ID: 3912101 • Letter: Q

Question

Q1 (8 points) Answer with True" or "False" (a) In demand paging pages are brought in only when an actual request for a page occurs. (b) Thrashing occurs when a program spends less time page faulting than executing. (c) Segmented virtual memory schemes suffer from internal fragmentation. (d) Trap is automatic procedure call initiated by some exceptional condition caused by the A semaphore is a synchronization tool that does not require busy waiting. program itself Cycle stealing is the process of having a DMA controller take bus cycles away from the Procedure calls don't cause the flow of control to be altered. In immediate addressing, the address of the operand is included in the instruction. CPU.

Explanation / Answer

a) True

We'll store all pages in virtual memory and whenever a request is placed for the page then the page would brought into main memory. With this no need lo load all pages into main memory during execution. So, at a time more processes may be maintained by main memory.

b) True

Ex: The total number of pages for a particular instruction=8, and all eight pages must be present in memory at the same time. If the operating system allocates fewer than eight pages of actual memory, when it attempts to swap out some part of the instruction or data to bring in, the instruction will again page fault, and it will thrash on every attempt to restart the failing instruction.

c) False

As processes are loaded and removed from the memory, the free memory space is broken into little pieces, causing External fragmentation not internal.

d) True

Trap is nothing but an exception. Here are some exaples of Trap:

an attempt to execute an unimplemented opcode, an attempt to divide by zero, a misaligned memory reference etc.

e) True

Semaphore can be accessed through 2 operations only. One is signal and another is wait. When a process has to wait, it will put in a blocked queue of processes waiting for the same event.

No busy waiting means when a process wakes up from wait, the resource or the condition that the process needed should be given to it.

f) True

Bus cycle means time required to make a single read or write operation between cpu and external memory. When a disk is being run by DMA, many bus cycles will be needed. During these cycles CPU will have to wait because DMA bus cycle has higher priority than the CPU because I/O devices cannot tolerate the delays. This is known as cycle stealing.

g) True

They can alter the transfer of control but not the flow of control.

h) True

Ex: move #200, R0 ------> Means move immediate value 200 into the register R0