OS Assignment 9
If a memory access requires 100 nanoseconds and servicing a page fault requires 6 milliseconds, what is the effective access time with page fault rate of p = .3? A: 1,800,070 ms B: 1,800,030 ms C: 4,500,025 ms D: 1,500,075 ms E: 1,500,025 ms
1,800,070 ms
"Allocating kernel memory", using the buddy system, what size segment would requesting 14 KB be allocated to? A: 16 KB B: 64 KB C: 25 KB D: 14 KB
16 KB
Which is the correct order of steps in basic page replacement? 1. Find a free frame. 2. Continue the process from where the page fault occurred. 3. Find the location of the desired page on secondary storage. 4. Read the desired page into the newly freed frame; change the page and frame tables. A. 3, 1, 4, 2 B. 2, 4, 1, 3 C. 1, 2, 3, 4 D. 4, 3, 2, 1 E. 3, 2, 1, 4
3, 1, 4, 2
Which of these describes a chain pointer in an inverted page table entry? A: A chain pointer is the index value of the next entry in the chain. B: A chain pointer is the page number portion of the virtual address. C: A chain pointer is the process that owns this page. D: A chain pointer includes flags and protection and locking information E: A chain pointer is the number of chains in each entry.
A chain pointer is the index value of the next entry in the chain.
Which of the following is the correct definition of FRAME in memory? A: A fixed-length block of main memory B: A fixed-length block of data that resides in secondary memory C: A variable-length block of data that resides in secondary memory D: A variable-length block of data that resides in main memory E: a rigid structure that surrounds or encloses something such as a door or window
A fixed-length block of main memory
What is a slab? A: A section of memory made up of one or more contiguous pages B: A temporary copy of data stored in a reserved memory area to improve performance C: An instance of a class or an instance of a data structure D: Pairs of equal size E: an allocator that satisfies memory requests, in units sized as a power of 2, from a fixed-sized segment consisting of contiguous pages
A section of memory made up of one or more contiguous pages
What is the best definition of thrashing? A: A state in which the system spends most of its time swapping process pieces rather than executing instructions B: Translating a page number from a virtual address to get its proper page number for its physical address C: Simultaneously interrogating multiple entries in the Translation Lookaside Buffer D: Increasing the locality of references in a program E: Moving in a violent and convulsive way
A state in which the system spends most of its time swapping process pieces rather than executing instructions
What is the definition of virtual memory? A. The address of a storage location in main memory. B. A storage allocation scheme in which secondary memory can be addressed as though it were part of main memory. C. The address assigned to a location in virtual memory to allow that location to be accessed as though it were part of main memory. D. The virtual storage assigned to a process. E. The range of memory addresses available to a process.
A storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
The Variable-Interval Sampled Working Set (VSWS) is driven by three parameters. Which of these answers is not one of those three parameters? A. The minimum duration of the sampling interval B. A use bit to be associated with each page in memory C: The maximum duration of the sampling interval D: The number of page faults that are allowed to occur between sampling instances
A use bit to be associated with each page in memory
What does global and local replacement strategies have in common? A. Activated by a page fault when there are no free page frames. B. Chooses only among the resident pages of the process that generated the page fault C. Considers all unlocked pages in main memory D. Both B & C
Activated by a page fault when there are no free page frames.
Which of the following is NOT true regarding Virtual Memory segmentation? A. All of the segments of a process must be in main memory for process to run, unless overlays are used. B. No internal fragmentation. C. Processor uses segment number, offset to calculate absolute address. D. Reading a segment into main memory may require writing 1+ segments to disk.
All of the segments of a process must be in main memory for process to run, unless overlays are used.
In the C programming language which of the following would cause a segmentation fault error? A: Attempting to access a NULL pointer B: Leaving a bracket open C: Dividing by zero D: Making a loop without an ending condition E: Reusing variable names in different functions
Attempting to access a NULL pointer
What situation causes thrashing? A: Attempting to maximize CPU utilization through multiprogramming. The CPU will always try to increase utilization, even when utilization is low because there are not enough frames to run more processes. B: Thrashing occurs when CPU utilization is low for too long. C: Thrashing occurs when there is an error in memory and a process tries to access that memory. D: Thrashing occurs when there is not enough memory for all processes. E: Thrashing occurs when CPU utilization is high for too long.
Attempting to maximize CPU utilization through multiprogramming. The CPU will always try to increase utilization, even when utilization is low because there are not enough frames to run more processes.
Which of the following is NOT true about Virtual Memory? A: Before a process can execute, it requires that an entire process is in memory. B: Programs can be larger than physical memory. C: This technique allows for processes to share files and libraries. D: Does not require an entire process to be in memory before it can execute. E: It provides an efficient way of creating processes.
Before a process can execute, it requires that an entire process is in memory.
Which characteristic(s) is (are) fundamental to memory management? A: Both C and D B: Neither C or D C: Processes can be broken up into noncontiguous locations in main memory during execution D: All memory addresses are dynamically translated from logical to physical at runtime
Both C and D
Which of the following is a benefit of virtual memory explained by demand paging? A: By loading only the portions of programs that are needed, memory is used more efficiently. B: Demand paging lowers the execution time of all processes, increasing performance. C: If a process tries to access a page that was not brought into memory, demand paging prevents an error from occurring. D: Pages can be shared during process creation with the fork() system call, thus speeding up process creation. E: Usage of virtual memory has no benefits.
By loading only the portions of programs that are needed, memory is used more efficiently.
Which of the following is a condition required for entering deadlock? A: Circular Wait B: Resource Preemption C: Starvation D: Safe Sequence E: Headlock
Circular Wait
Which of the following is NOT a advantage of segmentation? A: Combines the user program into a single segment B: Lends itself to protection C: Allows programs to be altered and recompiled independently D: Lends itself to sharing data among processes E: Simplifies handling of growing data structures
Combines the user program into a single segment
Which of the following is NOT a characteristic of Prepaging? A. Pages other than the one demanded by a page fault are brought in B: Ineffective if extra pages are not referenced C: Exploits the characteristics of most secondary memory devices D. Could also be called "swapping"
Could also be called "swapping"
When we encounter a deadlock, what is NOT a common/good approach to dealing with a deadlock? A. Realizing that there is no single, effective approach that can deal with all deadlock types B. Deadlock Elimination C. Deadlock Avoidance D. Deadlock Detection E. Deadlock Prevention
Deadlock Elimination
What is NOT a condition for deadlocks? A. Circular Wait B: Mutual Exclusion C: Hold-and-wait D: No pre-emption E. Deadlock Prevention
Deadlock Prevention
Which is the most popular method to handle deadlocks? A: Deadlock ignorance B: Deadlock prevention C: Deadlock avoidance D: Don't open your laptop
Deadlock ignorance
Which of the following are the two main types of fetch policy? A. Placement Policy and Replacement Policy B. Demand Paging and Prepaging C. Cleaning Policy and Load Control D. Clock Policy and Page Buffering
Demand Paging and Prepaging
Which of the following possible states mean that "[a]ll objects in the slab are marked as free." A. Partially-Full B. Free C. Full D. Partial E. Empty
Empty
Non-uniform memory access (NUMA) _____ A: Exists when memory access times can vary B: Refers to the hierarchy of memory from registers through main memory to secondary storage C: Occurs when page references are resolved in the TLB without having to access the page table D: Exists when memory access times can not vary
Exists when memory access times can vary
What is the difference between internal and external fragmentation? A: External fragmentation is between the allocations - when a process is removed from the main memory and internal fragmentation occurs when you take up the whole memory but don't necessarily use all of it - the process uses less space than the allotted memory block. B: Internal Fragmentation doesnt use virtual memory, but external Fragmentation does. C: External segmentation takes up the whole form but doesnt assign all of it, but internal is between the pages/allocation. D: Internal fragmentation occurs before External fragmentation. E: Internal Fragmentation occurs inside the system, and external fragmentation occurs outside the system.
External fragmentation is between the allocations - when a process is removed from the main memory and internal fragmentation occurs when you take up the whole memory but don't necessarily use all of it - the process uses less space than the allotted memory block.
Which of the definition for the elements in a page table best matches that for the control bits? A: Flags and protection and locking information B: Is the page number portion of the virtual address C: The process that owns this page D: The index value of the next entry in the chain E: Segmentation
Flags and protection and locking information
Which of the following describes Belady's anomaly? A: For "some" page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases B: For "all" replacement algorithms, the page-fault rate may increase as the number of allocated frames increases C: For "some" page replacement algorithms, the page-fault rate may decrease as the number of allocated frames increases D: For "all" replacement algorithms, the page-fault rate may decrease as the number of allocated frames increases E: For "some" page replacement algorithms, the page-fault rate may stay the same as the number of allocated frames increases
For "some" page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases
Which of the following is NOT included in each entry of an Inverted Page Table? A. Chain Pointer B. Control Bits C. Process Identifier D. Frame Number E. Page Number
Frame Number
Which of the following is not true about Clock Policy? A. Requires the association of an additional bit with each frame B. Gives a process a fixed number of frames in main memory within which to execute C. When a page is first loaded in memory or referenced, the use bit is set to 1 D. Any frame with a use bit of 1 is passed over by the algorithm
Gives a process a fixed number of frames in main memory within which to execute
What is NOT a class of a resource? A. Process Resources B. Swappable Space C. Main Memory D. Internal Resources E. Hardware Resources
Hardware Resources
What are the two requirements for virtual memory to be "practical and effective"? A. Hardware that supports paging and segmentation, and an operating system that includes software for managing the movement between secondary and main memory. B. Main memory must be smaller than 8GB and secondary memory must be larger than 16 GB. C. Virtual Memory must only be used when the secondary memory is a solid state drive, and the process must be larger than the size of main memory. D. The process must be split into segments, not pages, and all segments need to be in secondary memory. E. The process must be split into pages, not segments, and all pages must not be partially in main and secondary memory.
Hardware that supports paging and segmentation, and an operating system that includes software for managing the movement between secondary and main memory.
When a process is suspended, if the degree of multiprogramming is to be reduced, one or more of the current resident processes must be swapped out. There are six possible swaps to make, which of these options is NOT a possibility listed in our notes? A: Highest priority process B: Lowest priority process C: Largest process D: Process with the largest remaining execution window E: Faulting process
Highest priority process
Which of the following statements about Load Control is NOT true? A. Too many processes will lead to thrashing. B: Determines the number of processes that will be resident in main memory. C: It is critical in effective memory management. D: If there are too few processes, there will be many occasions when all processes will be blocked and much time will be spent in swapping. E. If there is too few processes, it will lead to thrashing.
If there is too few processes, it will lead to thrashing.
Which of the following cannot bebe said about the organization of segmentation? A. In organizing segmentation, it is not possible to offset the starting address of a segment B. Each segment table entry contains the starting address of the corresponding segment in main memory and the length of the segment C. A bit is needed to determine if the segment is already in main memory D. Another bit is needed to determine if the segment has been modified since it was loaded in main memory
In organizing segmentation, it is not possible to offset the starting address of a segment
The technique know as "Copy-on-write" allows the parent and child process to initially do which of the following? A: It allows the parent and child processes to initially share the same page. B: It allows for the parent to own the page C: It allows for the child to own the page D: It allows for the child to duplicate the parent's page E: It allows for the parent to duplicate the child's page
It allows the parent and child processes to initially share the same page.
What is true about the global scope of variable allocation? A. can allocate variables from one computer to another, unconnected, computer B: There will be a high page fault rate if the allocation is too small C: considers all unlocked pages in main memory D: chooses only among the resident pages E: It is the easiest to implement
It is the easiest to implement
Which of the following is correct concerning shared memory? A. Permission is remove-only. B: It's a common block of virtual memory shared by at most two processes. C: Permission is just read-only. D: Mutual exclusion constraints are a large part of the shared-memory facility. E. It is the fastest form of interprocess communication
It is the fastest form of interprocess communication
What algorithm for page replacement is best described by Replacing the page that has not been referenced for the longest time? A: Least Recently Used B: First In First Out C: Clock D: Optimal E: Last Out
Least Recently Used
What is an advantage of smaller page sizes? A. More pages are required which means larger page tables B. Lesser amount of internal fragmentation C. Some page tables must be stored in virtual memory D. Secondary-memory devices are more efficient with larger pages E. Memory is more likely to get paper cuts dealing with smaller page sizes
Lesser amount of internal fragmentation
When grouping resources into classes to find an appropriate strategy of preventing deadlock in the integrated deadlock strategy, which group of resource is "assignable to processes in pages or segments"? A. External Resources B. Main Memory C: Process resource D: Internal resources E. Swappable space
Main Memory
Which of the choice does not belong to the Simple Paging/Virtual Memory Paging? A. Processor uses page number B. Program borken by the compiler C. It must contain a page table D. It has internal fragmentation but not external E. Main memory not partitioned
Main memory not partitioned
Which of the following is not an example of a reusable resource? A. Main Memory B. I/O Channels C. Processors D. Messages
Messages
Which of the following is NOT a method to handle deadlocks? A. Deadlock Prevention B. Mutual Exclusion C: Deadlock avoidance D: Ignore deadlock E: Allow deadlock
Mutual Exclusion
What is the main characteristic of demand paging? A: Only brings paging into memory when a reference is made to a location on that page. B: Pages other than the ones demanded are brought in. C: Exploits the pages of a secondary memory device D: Is closely correlated to frame locking E: Where you must demand pages or segmentation faults occur.
Only brings paging into memory when a reference is made to a location on that page.
Which of the following is an incorrect description of a deadlock? A. No efficient solution in the general sense B. None of the events is ever triggered C. Only one process can use resources at a time D. A permanent blocking of processes E. Each blocked process can only be activated by an event from another blocked process
Only one process can use resources at a time
Which of the following is not a characteristic of virtual memory paging? A. Main memory is partitioned into small fixed-size chunks called frames B. Operating system must maintain a list of free holes in main memory C. Reading a page into main memory may require writing a page out to disk D. No external fragmentation E. The operating system must maintain a free frame list
Operating system must maintain a list of free holes in main memory
Which of the following is NOT an algorithm for dealing with selecting a page to replace? A. Clock B. Least Recently Used C. Optimal D. Page Buffering E. First in First Out
Page Buffering
What is transparent to the programmer in a combined paging/segmentation system? A. Thrashing B. Frame locking C. Internal fragmentation D. Segmentation E. Paging
Paging
Which of the following statements is not true regarding operating system policies for virtual memory? A. Placement policies determine when a page should be brought into memory. B. Fetch policies determine when a page should be brought into memory. C. Placement policies determine where a process piece is to reside in real memory. D. Replacement policies deal with selecting a page in main memory to be replaced. E. Cleaning policies deal with determining whether a modified page should be written out to secondary memory.
Placement policies determine when a page should be brought into memory
What is the definition of a Resident Set? A. The range of memory addresses available to a process. B. Portion of process that is in main memory. C: Generated when an address is needed that is not in main memory. D: Allows for effective multiprogramming and relieves the user of tight constraints of main memory. E: Program and data references within a process tend to cluster.
Portion of process that is in main memory.
What memory organization method can prevent thrashing? A. Internal fragmentation B. Bestfit Allocation C. Paging D. Fixed Memory Table E. Principle of Locality
Principle of Locality
Which quality does NOT support virtual memory to be practical and effective? A. Principles of locality B. Hardware that supports paging C. Hardware that supports segmentation D. Operating systems that include software for managing the movement of paging E. Operating systems that include segments between secondary memory and main memory.
Principles of locality
A process' allocated space is divided into fixed-size pages managed in contiguous regions. Which of the following is not a state the region may be in? A. Available B. Committed C. Reserved D. Ready
Ready
The paging system in a memory management system provides for dynamic mapping between a virtual address used in a program and what? A. Virtual Address in main memory B. Real address in main memory C: A real address in a program D: None of the above
Real address in main memory
What is the difference between Real Memory and Virtual Memory A. Real memory is on the actual RAM while Virtual memory is on the cloud B. Real memory is saved to the disk while Virtual memory is saved on the RAM C. Real memory is on the actual RAM while Virtual memory is on a virtual machine D. Real memory is on the actual RAM while Virtual memory is saved on the disk E. Real memory is non volatile while Virtual memory is volatile
Real memory is on the actual RAM while Virtual memory is saved on the disk
Which is not a part of execution of a process? A: Relaunch Code B: An interrupt is generated when an address is needed that is not in main memory C: Operating system places the process in a blocking state D: Resident set E: Operating system brings into main memory a few pieces of the program
Relaunch Code
Which of the following is for Deadlock Avoidance? A. Hold and Wait B. Circular Wait C. Safe State D. Mutual Exclusion E. No Preemption
Safe State
Which of the following is defined as the most common technique for protecting a critical section in Linux where it is built on integer location in memory that is checked by each thread before it enters its critical section? A. Semaphores B. Readers/Writer Lock C. Spinlocks D. Atomic Operations
Spinlocks
There are multiple strategies that may be employed to prevent deadlock and starvation of all processes across classes based on the circumstances. Which of the following strategies best fit a case where a process must allocate all resources it requires all at once, as in the hold-and-wait prevention strategy? A. Enforced deadlock B. Internal resources C. Process resources D. Main memory E. Swappable space
Swappable space
Which of the following are NOT recovery strategies to recover from deadlock? A. Abort all deadlocked processes B. Terminate the whole program C. Back up each deadlock process to some previously defined checkpoint and restart all processes. D. Successively abort deadlocked process until deadlock no longer exists. E. Successively preempt resources until deadlock no longer exits.
Terminate the whole program
Which of the following is not true about page sizes? A. The TLB contains every page table number, but doesn't contain any of the page table entries. B. For large programs in a multi programmed environment, some portion of page tables must be in virtual memory rather than main memory. C. The lesser the page size the lesser the amount of internal fragmentation. D. Larger page sizes are favored by most secondary-memory devices. E. Having more pages per process means having larger page tables.
The TLB contains every page table number, but doesn't contain any of the page table entries.
Which of the following is a correct explanation of what a virtual address is? A: The address assigned to a location in virtual memory to allow that location to be accessed as though it were part of the main memory. B: The virtual storage assigned to a process. C: The range of memory addresses available to a process. D: A storage allocation scheme in which secondary memory can be addressed as though it were part of the main memory. E: The address of a storage location in the main memory.
The address assigned to a location in virtual memory to allow that location to be accessed as though it were part of the main memory.
Which of the following is NOT a fundamental area of choice in the design of the memory management portion of an operating system. A. Whether or not to use virtual memory techniques B. The size allocation of memory within a machine. C. The algorithms employed for various aspects of memory management D. The use of paging or segmentation or both
The size allocation of memory within a machine.
Why do we want to avoid long memory lookup times? A. They are scary B: To save memory C: Memory lookup usually takes a super long time D: It is bad for your computer E. They happen constantly
They happen constantly
Spinlocks are the most common technique for protecting critical sections of the linux kernel. What is the major disadvantage of this technique? A: Threads which are waiting aren't just standing-by, they are busy waiting. B: Each thread has to check an integer location in memory, and memory is slow to access. C: Access can only be granted to one thread at a time. D: The expected wait time is very long so the threads might be stuck waiting. E: The API to use them is very difficult to understand.
Threads which are waiting aren't just standing-by, they are busy waiting.
Which of the following options is defined as "the virtual storage assigned to a process"? A. Real Address B. Virtual Address C. Virtual Memory D. Address Space E. Virtual Address Space
Virtual Address Space
Which of the following is NOT a type of kernel semaphore? A. Binary semaphore B. Virtual Semaphore C. Counting semaphore D. Reader-Writer semaphore
Virtual Semaphore
Which of the following best describes a page fault? A. the writing of zeros into a page before it is made available to a process B: a demand paging screen where no no page is brought into memory until it is referenced C: secondary storage backing-store used to store pages that are paged outside of memory D: memory not associated with a file E. a fault which results from referencing a non-memory-resident page of memory
a fault which results from referencing a non-memory-resident page of memory
Other considerations, which of the following is related to TLB? A: resolution B: hit ratio C: TLB reach D: contiguous bit E: associative memory
resolution
What semaphore command is used to initialize the dynamically created semaphore with a count of 0 (initially locked)? A. void init MUTEX LOCKED (struct semaphore *sem) B. void init MUTEX (struct semaphore *sem) C. void sema init (struct semaphore *sem, int count) D. void down(struct semaphore *sem) E. void up (struct semaphore *sem)
void init MUTEX LOCKED (struct semaphore *sem)