Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A logical address space of a process has 512 pages with an 8-KB page size. How many bits are required in the logical address?: 512 = 2^9. 8K=2^13. Ans: 9+13=22
- How do processor affinity and load balancing interact in a multi-processor environment? : Improving load balancing may conflict with the processor affinity requirement in some cases.
- How does contiguous disk allocation compare with FAT-based linked (FAT-linked) allocation? : Contiguous gives faster sequential access but FAT-linked causes less internal fragmentation.
- How does contiguous disk allocation compare with linked disk allocation? : Contiguous provides faster sequential and random access but causes external fragmentation.
- How does indexed disk allocation compare with contiguous disk allocation?
- - (F) Indexed gives faster sequential access but contiguous causes less external fragmentation. - (T) Contiguous gives faster sequential access but indexed causes less external fragmentation.
- - (F) Indexed gives faster random access but contiguous causes less internal fragmentation. - (F) Contiguous gives faster sequential access but indexed causes less internal fragmentation.
- How does indexed disk allocation compare with linked disk allocation?
- - (F) Indexed gives faster random access but linked causes less external fragmentation. - (F) Linked gives faster random access but indexed causes less external fragmentation.
- - (T) Indexed gives faster random access but wastes more disk space for smaller files. - (F) Linked gives faster random access but wastes more disk space for larger files.
- How does indexed disk allocation compare with FAT-based linked allocation? : Indexed allocation may waste a substantial amount of disk space if there are many small files.
- How does protecting a critical section (CS) with a semaphore ensure mutual exclusion?: When a process is in its CS, any process that tries to access a CS that is protected by the same semaphore is put in waiting state.
- How does the page size affect the performance of a memory management system?
- - (T) Increasing the page size increases internal fragmentation. - (T) Increasing the page size increases the page fault rate (assuming pure demand paging).
- How does the page-fault frequency (PFF) technique prevent thrashing?
- - (T) It takes frames from a process if its page fault rate falls below a certain lower bound. - (F) It gives more frames to a process if its page fault rate falls below a certain lower bound.
- - (F) It takes frames from a process if its page fault rate exceeds a certain upper bound. - (T) It gives more frames to a process if its page fault rate exceeds a certain upper bound.
- If a process uses 1100B of memory in a system with a page size of 512B, what’s the size of internal fragmentation? : 436B
- In a given program, only 1 / 6 of the code is parallelizable. What’s the maximum speedup factor that can be achieved on a 2-core system under ideal conditions?: 1 / (5/6 + 1/(6 * 2)) = 12/11
- The worst-case running time for finding a safe sequence in the Bankers Algorithm for deadlock detection on a system with p processes and q resource types is: O(p^2*q)
- What are the limitations of Amdahl’s Law?
- - (F) You cannot apply it to a system with more than 8 CPUs - (F) You cannot apply it when the number of processes is greater than 16.
- - (T) It assumes that the parallelizable code can be divided equally among the CPUs. - (F) You can apply it only when all CPUs are on the same chip not on different chips.
- - (T) It does not account for communication and synchronization overhead.
- What is (are) the advantage(s) of dividing an application into multiple threads relative to dividing it into multiple processes?
- - (F) Utilizing a multi-core system - (F) One slow task won’t slow the whole application - (T) Using less resources - (T) Easier communication using global variables
- What is the difference between an I/O-bound process and a CPU-bound process?: An I/O-bound process has shorter CPU bursts than a CPU-bound process.
- What is the difference between shared memory and message passing?
- - (T) The format of the shared memory object is determined by user processes while the format of a message is determined by the OS. - (T) A shared memory block is physically located in the user address space while mail boxes are in the kernel address space.
- - (T) Shared memory communication involves less kernel intervention than message passing. - (F) Shared memory is faster than message passing on all systems.
- What is the difference between the Scan and the C-Scan disk scheduling algorithms? : Scan services requests when it is moving in both directions, while C-Scan services requests only when it is moving in one direction.
- What is the maximum number of processes/threads that can be active in a monitor at the same time?: ONE
- What’s the difference between blocking receive and non-blocking receive?
- - True: With blocking receive, process is put in waiting state if no msg is available / A non-blocking receive may not return an actual msg, while a blocking receive always returns a msg(unless an error).
- - False: With non-blocking receive, a process is put in the waiting state if no message is available / Blocking receive must be used if the send is blocking
- What’s the difference between Rate-Monotonic Scheduling (RM) and Earliest-Deadline-First (EDF) Scheduling? : RM uses fixed priorities while EDF dynamically adjusts priorities.
- What’s the relationship between page size and fragmentation?: A larger page size increases internal fragmentation.
- Which disk scheduling algorithm(s) may cause starvation?: SSTF
- Which of the following factors determine(s) the context-switching time?
- - (F) The number of instructions in the process that will be losing the CPU after switching. - (F) The number of instructions in the process that will be getting the CPU after switching. - (T) The speed of the memory system. - (T) The internal design of the OS.
- Which of the following is (are) true about concurrency and parallelism?
- - (F) With concurrency, the total time needed to execute a given set of processes is always less than the time needed to execute the processes sequentially.
- - (F) With parallelism on a dual-core processor, the total time needed to execute a given set of processes is always half the time needed to execute the processes sequentially.
- - (T) Parallelism requires multiple CPUs, while concurrency may be achieved on a single CPU.
- - (T) With concurrency, only one process may be running at a given point in time, while with parallelism multiple processes may be running simultaneously.
- Which of the following is (are) true about paging and segmentation?
- - (T) Paging always divides memory into equal blocks. - (F) Segmentation always divides memory into equal blocks. - (F) A single instruction cannot access more than one page. - (F) A single operand cannot access more than one page.
- Which of the following is (are) true about paging and segmentation?
- - Paging divides memory into equal blocks, but segmentation may divide it into unequal blocks. - In both segmentation and paging the address space of a process does not have to be contiguous.
- Which of the following is (are) true about the working set size?
- - (T) A larger working set size increases the chances of having page faults. (page fault rate) - (F) A larger working set size decreases the chances of having page faults.
- - (T) If the sum of working set sizes exceeds the number of available frames, the system will thrash. - (F) The working set size of a process remains constant throughout the process’s lifetime.
- Which of the following is a necessary condition for deadlocks: Some resources are non-preemptive.
- Which of the following is not necessarily performed by the kernel in handling a page fault?
- - (F) Issuing a read request to the disk to fetch the missing frame into memory. - (F) Saving the state of the process that caused the page fault.
- - (F) Restoring the state of the process that caused the page fault. - (T) Granting the CPU to a process other than the process that caused the page fault.
- - (F) Updating the page table to indicate that the missing frame is now in physical memory.
- Which of the following is not true about paging and segmentation?: A single operand can never access more than one page.
- Which of the following is not true about Remote Procedure Calls (RPCs)? : The user program communicates directly with the matchmaker without kernel intervention.
- Which of the following is not true about shared memory and message passing? : Shared memory is slower than message passing on all multiprocessor systems.
- Which of the following is not true about virtual memory (VM) and physical memory (PM)?
- - (F) VM allows the OS to load more processes in memory, thus giving more options to the scheduler. - (F) VM decreases the amount of I/O needed. - (T) Implementing VM does not need any hardware support.
- - (F) With VM, a program can be run even if the size of its logical address space exceeds the PM size. - (F) A VM system may load into physical memory an instruction that the program will never execute.
- - (F) A VM system may load into physical memory a data element that the program will never access.
- Which of the following is true about a page fault? : Handling a page fault always involves transferring data from disk to memory. + Page faults occur infrequently due to locality of reference.
- Which of the following is true about disk scheduling algorithms?
- - (F) Scan always reaches the end of the disk, while C-Scan may not reach a disk end. - (F) Look always reaches the end of the disk, while Scan may not reach a disk end.
- - (F) C-Scan services requests when it is moving in both directions, while Scan services requests only when it is moving in one direction. - (T) Scan services requests .. in both directions, while C-Scan services requests only when it is moving in one direction.
- Which of the following is true about memory frame allocation?
- - (T) With global frame allocation, the execution time of a process depends on other processes. - (T) Global frame allocation does a better job at utilizing memory than local frame allocation.
- - (F) Local frame allocation does a better job at utilizing memory than global frame allocation. - (F) The minimum number of frames that must be allocated to a process is hardware independent.
- Which of the following is true about multilevel-feedback-queue scheduling?
- - (F) If a process uses its entire time quantum, it is moved to a higher priority level. - (T) If a process uses its entire time quantum, it is moved to a lower priority level.
- - (T) If a process spends a lot of time in a low-priority level without getting the CPU, it is moved to a higher priority level.
- Which of the following is true about page replacement policies?
- - Optimal page replacement is theoretically the best but is impossible to implement in practice. - With FIFO page replacement, increasing the number of frames may increase page faults.
- Which of the following is true about paging?
- - (F) Paging eliminates internal fragmentation but does not eliminate external fragmentation. - (T) Paging eliminates external fragmentation but does not eliminate internal fragmentation.
- - (F) Paging eliminates both external fragmentation and internal fragmentation. - (F) Paging only reduces fragmentation but does not eliminate any kind of fragmentation.
- Which of the following is true about spin locks and mutex locks?: - A process waiting on a spin lock uses CPU cycles but a process waiting on a mutex does not. // Using mutex locks involves more context switching.
- Which of the following is true about starvation in disk scheduling? :
- - FCFS can never cause starvation. - SSTF is the only algorithm (among the ones we studied) that may cause starvation. - Scan doesn’t cause starvation, b/c waiting time can be long but will always be bounded.
- Which of the following is true about storage allocation algorithms?: - First fit and best fit have been found to give better utilization, on average, than worst fit.
- Which of the following is true about the difference between the Round Robin (RR) and the Shortest-Job-First (SJF) scheduling algorithms?: SJF minimizes the average waiting time, but RR does not.
- Which of the following is true about threads and processes? : Threads within a process share global variables.
- Which of the following is(are) managed by the OS?: True: Main Memory + Disk Space // False CPU Registers + The Cache
- Which of the following statements is true about cycles in the resource allocation graph (RAG)?
- - (T) Having a cycle in the RAG is always a necessary condition for deadlocks. - (F) Having a cycle in the RAG is always a sufficient condition for deadlocks.
- - (F) Having a cycle in the RAG is always a necessary and a sufficient condition for deadlocks. - (T) Having a cycle in the RAG is a sufficient condition for deadlocks if all resources have single instances.
- Which of the following will not prevent deadlocks?: Set a limit on the number of processes in the system.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement