SHARE
TWEET

Untitled

a guest Dec 9th, 2019 153 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 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
  2. 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.
  3. 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.
  4. How does contiguous disk allocation compare with linked disk allocation? : Contiguous provides faster sequential and random access but causes external fragmentation.
  5. How does indexed disk allocation compare with contiguous disk allocation?          
  6.   - (F) Indexed gives faster sequential access but contiguous causes less external fragmentation.   - (T) Contiguous gives faster sequential access but indexed causes less external fragmentation.
  7.   - (F) Indexed gives faster random access but contiguous causes less internal fragmentation.       - (F) Contiguous gives faster sequential access but indexed causes less internal fragmentation.
  8. How does indexed disk allocation compare with linked disk allocation?
  9.   - (F) Indexed gives faster random access but linked causes less external fragmentation.   - (F) Linked gives faster random access but indexed causes less external fragmentation.
  10.   - (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.
  11. 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.
  12. 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.
  13. How does the page size affect the performance of a memory management system?
  14.   - (T) Increasing the page size increases internal fragmentation.  - (T) Increasing the page size increases the page fault rate (assuming pure demand paging).
  15. How does the page-fault frequency (PFF) technique prevent thrashing?
  16.   - (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.
  17.   - (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.
  18. If a process uses 1100B of memory in a system with a page size of 512B, what’s the size of internal fragmentation? : 436B
  19. 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
  20. 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)
  21. What are the limitations of Amdahl’s Law?
  22.   - (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.
  23.   - (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.
  24.   - (T) It does not account for communication and synchronization overhead.
  25. What is (are) the advantage(s) of dividing an application into multiple threads relative to dividing it into multiple processes?                                                
  26.   - (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
  27. 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.
  28. What is the difference between shared memory and message passing?
  29.   - (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.
  30.   - (T) Shared memory communication involves less kernel intervention than message passing. - (F) Shared memory is faster than message passing on all systems.
  31. 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.
  32. What is the maximum number of processes/threads that can be active in a monitor at the same time?: ONE
  33. What’s the difference between blocking receive and non-blocking receive?
  34.   - 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).
  35.   - 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
  36. What’s the difference between Rate-Monotonic Scheduling (RM) and Earliest-Deadline-First (EDF) Scheduling? : RM uses fixed priorities while EDF dynamically adjusts priorities.
  37. What’s the relationship between page size and fragmentation?: A larger page size increases internal fragmentation.
  38. Which disk scheduling algorithm(s) may cause starvation?:  SSTF
  39. Which of the following factors determine(s) the context-switching time?
  40.   - (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.
  41. Which of the following is (are) true about concurrency and parallelism?
  42.   - (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.                                      
  43.   - (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.                                      
  44.   - (T) Parallelism requires multiple CPUs, while concurrency may be achieved on a single CPU.
  45.   - (T) With concurrency, only one process may be running at a given point in time, while with parallelism multiple processes may be running simultaneously.
  46. Which of the following is (are) true about paging and segmentation?
  47.   - (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.
  48. Which of the following is (are) true about paging and segmentation?
  49. - 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.
  50. Which of the following is (are) true about the working set size?
  51.   - (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.
  52.   - (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.
  53. Which of the following is a necessary condition for deadlocks: Some resources are non-preemptive.
  54. Which of the following is not necessarily performed by the kernel in handling a page fault?
  55.   - (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.
  56.   - (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.
  57.   - (F) Updating the page table to indicate that the missing frame is now in physical memory.
  58. Which of the following is not true about paging and segmentation?: A single operand can never access more than one page.
  59. Which of the following is not true about Remote Procedure Calls (RPCs)? : The user program communicates directly with the matchmaker without kernel intervention.
  60. Which of the following is not true about shared memory and message passing?  : Shared memory is slower than message passing on all multiprocessor systems.
  61. Which of the following is not true about virtual memory (VM) and physical memory (PM)?
  62.   - (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.
  63.   - (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.
  64.   - (F) A VM system may load into physical memory a data element that the program will never access.
  65. 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.
  66. Which of the following is true about disk scheduling algorithms?
  67.   - (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.  
  68.   - (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.
  69. Which of the following is true about memory frame allocation?
  70.   - (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.
  71.   - (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.
  72. Which of the following is true about multilevel-feedback-queue scheduling?
  73.   - (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.
  74.   - (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.
  75. Which of the following is true about page replacement policies?
  76.   - 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.
  77. Which of the following is true about paging?
  78.   - (F) Paging eliminates internal fragmentation but does not eliminate external fragmentation. - (T) Paging eliminates external fragmentation but does not eliminate internal fragmentation.
  79.   - (F) Paging eliminates both external fragmentation and internal fragmentation.       - (F) Paging only reduces fragmentation but does not eliminate any kind of fragmentation.
  80. 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.                                      
  81. Which of the following is true about starvation in disk scheduling? :
  82.   - 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.  
  83. 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.
  84. 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.
  85. Which of the following is true about threads and processes? : Threads within a process share global variables.
  86. Which of the following is(are) managed by the OS?: True: Main Memory + Disk Space    //  False CPU Registers + The Cache
  87. Which of the following statements is true about cycles in the resource allocation graph (RAG)?
  88.   - (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.
  89.   - (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.
  90. Which of the following will not prevent deadlocks?: Set a limit on the number of processes in the system.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top