Download COP4610 Midterm 2 Quiz Questions well answered to pass and more Exams Nursing in PDF only on Docsity! COP4610 Midterm 2 Quiz Questions The time lost is swap out and swap in can be reduced by ________. A) writing the swapped out page based on dirty bit B) storing the pages in cache instead of memory C) storing the pages in ROM instead of the memory D) directly overwriting on existing pages - correct answer ✔✔writing the swapped out page based on dirty bit (A) Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within out system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string? - correct answer ✔✔8 Which of the following concepts is best at preventing page faults? A) Address location resolution B) Hit ratios C) The working set D) Paging - correct answer ✔✔The working set (C) Belady's anomaly states that _________. A) Giving more memory to a process will improve its performance B) for some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases C) as the number of allocated frames increases, the page-fault rate may decrease for all page replacement algorithms D) for some page replacement algorithms, the page-fault rate may decrease as the number of allocated frames increases - correct answer ✔✔for some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases (B) _________ occurs when a process spends more time paging than executing. A) Demand paging B) Thrashing C) Memory-mapping D) Swapping - correct answer ✔✔Thrashing (B) What size segment will be allocated for a 39 KB request on a system using the Buddy system for kernel memory allocation? - correct answer ✔✔64 KB Which of the following is a benefit of allowing a program that is only partially in memory to execute? A) Programs can be written to use more memory than is available in physical memory. B) Less I/O is needed to load or swap each user program into memory. C) CPU utilization and throughput is increased. D) All of the other options - correct answer ✔✔all of the other options (D) Optimal page replacement _________. A) is used mostly for comparison with other page-replacement schemes B) requires that the system keep track of previously used pages C) can suffer from Belady's anomaly D) is the page-replacement algorithm most often implemented - correct answer ✔✔is mostly used for comparison with other page-replacement schemes (A) Which of the following memory management schemes solved internal fragmentation? A) Parallel partition B) segmented memory allocation C) paged memory allocation D) fixed partition - correct answer ✔✔segmented memory allocation (B) Belady's Anomaly is observed in ______. A) optimal algorithm D) results when several threads try to access and modify the same data concurrently - correct answer ✔✔results when several threads try to access and modify the same data concurrently (D) A(n) ____________ is an inactive unit, such as a file stored on a disk. A) process B) program C) job D) device E) thread - correct answer ✔✔program (B) A(n) _____________ is created by a process, and it can be scheduled and executed independently of its parent process. A) cache hit B) interrupt C) segment D) thread E) page - correct answer ✔✔thread (D) A task in a blocked state A) must still be placed in the run queues B) is executable C) is waiting for same temporarily unavailable resources D) is running E) none of the options - correct answer ✔✔is waiting for same temporarily unavailable resources (C) The term ________ is used to refer to the time required to execute a job and return the output to the user. A) CPU quantum B) wait time C) burst time D) turnaround time - correct answer ✔✔turnaround time (D) Round-robin scheduling A) is quite complex to implement B) gives each task the same chance at the processor C) allows the processor-bound tasks more time in the processor D) allows interactive tasks quicker access to the processor - correct answer ✔✔gives each task the same chance at the processor (B) Between a process and a CPU, the 'Run till Done' mode is __________. A) a throughput enhancing scheme B) a preemptive scheme C) a non-preemptive scheme D) a strategy to ensure fairness - correct answer ✔✔a non-preemptive scheme (C) When the timer runs out, a process goes from 'Running' state to _______ state. A) 'Ready' B) 'Blocked' C) 'Swapped' D) 'Terminated' - correct answer ✔✔Ready (A) The SJF algorithm executes first the job _________. A) that first entered the queue B) that last entered the queue C) with the least processor needs D) that has been in the queue the longest - correct answer ✔✔with the least processor needs (C) Which of the following transitions might typically not happen in a process scheduling state diagram? A) Ready -> Held B) Blocked -> Ready C) Ready -> Running D) Running -> Ready - correct answer ✔✔Ready -> Held (A) Which of the following scheduling objectives should be applied to the following?: the system should admit jobs to create a mix that will keep most devices busy. A) to balance resource utilization B) to obey priorities C) to be fair D) to be predictable - correct answer ✔✔to balance resource utilization (A)