Assignment 4 Questions

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

According to the slides over chapter 7, memory management: Consider the following statements and answer the question that follows: I: A frame is a fixed-length block of main memory (such as RAM). II: A page is the exact same as a frame and can be used synonymously with frame. III: A segment is a variable-length block of data that resides in secondary memory (something like a disk drive or SSD). Which of the following statements is the best answer regarding the above statements? --- A: Only I and III are true B: Only II is true C: Only III is true D: None of the above are true E: I, II, and III are all are true

a: a is the best answer because I is true, a frame is a fixed-length block of memory, and III is true, A segment is a variable-length block of memory residing in secondary memory. a is also the best answer because II is false, a page is not necessarily synonymous with frame, as while, it is of fixed length, it is stored in secondary memory instead of the main memory. b: b is not the best answer because as explained in a, II is false. c: c is not the best answer because while III is true, so is I. d: d is not the best answer because I and III are both true. e: e is not the best answer because while I and III are both true, II is not true.

According to chapter 8 Deadlocks, Which of the following is not a method in deadlock handling? --- A: Deadlock distribution B: Deadlock prevention C: Deadlock avoidance D: Deadlock detection

*A is correct. Because deadlock distribution is a circular dependency on processes holding and requesting resources. *B is incorrect. Because deadlock prevention is one of mainly four methods for handling deadlock. These methods prevent deadlocks by constraining how requests for resources can be made. *C is incorrect. Because deadlock avoidance is one of mainly four methods for handling deadlock. These methods employ algorithms to access the possibility that deadlock would occur and not act accordingly. *D is incorrect. Because deadlock detection is one of mainly four methods for handling deadlock. When the system is deadlock then a deadlock situation may occur, operator deals with the deadlock manually and the second is the system will automatically recover from deadlock.

According to the Deadlock PDF in the week 11 module, what is a safe state? --- A: a state in which there is at least one sequence of resource allocations to processes that does not result in a deadlock B: the current allocation of resources to processes C: a state that is not safe D: the permanent blocking of a set of processes E: poggers

A - Correct, a safe state is a state in which there is at least one sequence of resource allocations to processes that does not result in a deadlock B - Incorrect, that is the definition of a state C - Incorrect, that is the definition of an unsafe state D - Incorrect, that is the definition of a deadlock E - Incorrect, poggers

According to ch09.pdf which of these is NOT a stage in which Address binding of instructions and data to memory addresses can happen? --- A: Edit Time B: Compile Time C: Load Time D: Execution Time

A is correct as Edit Time does not have the ability to Address bind. B is incorrect as Address bind can happen at this phase. C is incorrect as Address bind can happen at this phase. D is incorrect as Address bind can happen at this phase.

According to Chapter 5 slides CPU Scheduling, which scheduling is NOT nonpreemptive? --- A: When process considers access to shared data B: When a process switches from running to waiting state C: When a process switches from running to ready state D: When a process terminates E: When a process switches from waiting to ready

A is correct as its scheduling is preemptive B is incorrect as it is a nonpreemptive scheduling C is incorrect as it is a nonpreemptive scheduling D is incorrect as it is a nonpreemptive scheduling E is incorrect as it is a nonpreemptive scheduling

According to the lecture notes virtual-memory.pdf, which of these is NOT an advantage of segmentation? --- A: It makes accessing memory more efficient B: It simplifies handling of growing data structures C: It allows programs to be altered and recompiled independently D: It aids in sharing data amongst various processes

A is correct as segmentation does not make accessing memory any more efficient. Segmentation only affects the view on memory. B is incorrect as simplifying the handling of growing data structures through viewing memory as various segments is a benefit of segmentation C is incorrect as viewing memory as various segments makes it possible to alter and recompile programs independently D is incorrect as viewing memory as various segments helps share data amongst various processes

According to Lecture 24, when dealing with dynamic partitioning, which statement describes the algorithm(s) that have better speed and utilization compared to Worst Fit? --- A: Best Fit and First Fit B: Best Fit and Next Fit C: First Fit and Next Fit D: Only Best Fit E: Only First Fit

A is correct because Best Fit and First Fit both were mentioned as having better speed & utilization compared to Worst Fit. B is incorrect because Next Fit was not mentioned as having better speed & utilization compared to Worst Fit. C is incorrect because Next Fit was not mentioned as having better speed & utilization compared to Worst Fit. D is incorrect because First Fit also has better speed & utilization compared to Worst Fit. E is incorrect because Best Fit also has better speed & utilization compared to Worst Fit.

Which of the following is Memory Management NOT intended to satisfy? --- A: Redundancy B: Relocation C: Logic organization D: Sharing E: Protection

A is correct because Memory management is not explicitly intended to provide Redundancy, not to be confused with Protection. B is incorrect because Memory Management needs to be able to swap processes in and out of the main memory. C is incorrect because Memory Management uses segmentation to organize memory based on different needs. D is incorrect because in Memory Management it is often more efficient to have different process share the same resource than to make copies of those resources. E is incorrect because Memory Management uses reading and writing permissions to protect various resources from other processes.

According to Ch09.pdf slides, in an Intel IA-32 architecture, what is the max size of each segment without page address extension? --- A: 4 GB B: 8 GB C: 4 KB D: 64 GB E: 1 GB

A is correct because a process segment can be up to 4 GB B is incorrect because this is just a random number that I thought of C is incorrect because 4KB is one of the options for the page size of this architecture D is incorrect because 64 GB is the size of physical memory in the address space with page address extension E is incorrect as 1 GB is an option for the page size of the x86-64 bit architecture

According to lecture the chapter 9 lecture slides pdf, which of the following is not true of an inverted page table? --- A: Each process has a page table and keeps track of all possible logical pages. B: There exists one entry for each real page of memory. C: Each entry consists of the virtual address of the page stored in thatreal memory location, with information about the process thatowns that page. D: This method Decreases memory needed to store each page table, butincreases time needed to search the table when a pagereference occurs.

A is correct because an inverted page table instead tracks all physical pages B is incorrect because this is true of an inverted page table C is incorrect because this is true of an inverted page table D is incorrect because this is true of an inverted page table

According to ch09.pdf, what is the first time amount that affects a running program? --- A: Compile time B: Load time C: Execution time D: Exit time

A is correct because compiling the program is the first time-consuming activity performed. B is incorrect because it is the second activity performed. C is incorrect because it is the third activity performed. D is incorrect because that is not a time-consuming activity.

According to the deadlock.pdf, what is "Process Initiation Denial" in Deadlock Avoidance? --- A: To not start a process if a demands might lead to a deadlock. B: Do not grant an incremental resource request to a process if this allocation might lead to deadlock C: Is one in which there is at least one sequence of resource allocations to processes that does not result in adeadlock. D: Limiting access to resources by imposing restrictions on processes. E: There is no such thing as that. Only Process Initiation Approval.

A is correct because it defines what a Process Initiation Denial is. B is incorrect because that defines what "Resource Allocation Denial" is. C is incorrect because it defines what a "Safe State" is and not what the question asks. D is incorrect because this is simply a conservative deadlock prevention strategy. E is incorrect because there is in fact a process initiation denial

According to ch09.pdf, which of the following describes "Static linking?" --- A: System libraries and program code are combined by the loader into the binary program image B: Swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executed C: Transferring the I/O to kernel space, then to I/O device D: Shuffling memory contents to place all free memory together in one large block

A is correct because it is the definition for static linking B is incorrect because it is the definition for roll out, roll in swapping C is incorrect because it is describing double buffering D is incorrect because it is describing compaction

According to the deadlock pdf, which statement best summarizes the Hold and Wait condition for deadlock? --- A: A process can hold resources until the next assignment of resources appears. B: A process cannot have resources it is holding forcibly removed C: Only one process can use resources at a time. D: Each process will hold at least one resource needed by the next process

A is correct because it is the only answer that correctly describes the hold and wait condition B is incorrect because it describes the No Pre-emption condition C is incorrect because it describes mutual exclusion condition D is incorrect because it describes circular wait condition

According to lecture 23, what is a direct method for preventing a deadlock? --- A: Prevent an occurrence of a Circular Wait B: Prevent an occurrence of Mutual Exclusion C: Prevent an occurrence of Hold-and-Wait D: Prevent an occurrence of No Pre-emption E: There are no methods to prevent deadlock

A is correct because preventing circular wait is a direct method for preventing deadlock B is incorrect because this is an indirect method of preventing deadlock C is incorrect because this is an indirect method of preventing deadlock D is incorrect because this is an indirect method of preventing deadlock E is incorrect because there are two main methods to prevent deadlock

According to Lecture 24, which of the following is the best definition for Worst Fit dynamic partitioning? --- A: Allocate the largest hole that is available in memory B: Allocate the first space that is available in memory C: Allocate the smallest hole that is large enough for the allocation D: Allocate the first space available and keep a pointer to the last allocated block E: Allocate a random space in memory that is available

A is correct because this is the best definition for Worst Fit, as understood from the lecture. B is incorrect because this definition better suits First Fit partitioning. C is incorrect because this definition better suits Best Fit partitioning. D is incorrect because this definition better suits Next Fit partitioning. E is incorrect because this definition does not match any Fit partitioning method.

According to Lecture 25 & virtual-memory.pdf, Which statement is NOT associated with Prepaging? --- A: Only brings pages into main memory when a reference is made to a location on the page B: Pages other than the one demanded by a page fault are brought in C: Exploits the characteristics of most secondary memory devices D: Ineffective if extra pages are not referenced

A is correct since this statement is associated with Demand Paging. B is incorrect since the statement "Pages other than the one demanded by a page fault are brought in" is associated with Prepaging. C is incorrect since the statement "Exploits the characteristics of most secondary memory devices" is associated with Prepaging. D is incorrect since the statement "Ineffective if extra pages are not referenced" is associated with Prepaging.

According to deadlock.pdf, what is the benefit of using deadlock detection over deadlock prevention? --- A: Resources are granted to processes quickly and whenever possible. B: Resources are only allocated if the CPU can guarantee a safe-state. C: Processes use fixed amounts of resources. D: Processes can pipe needed resources between each other.

A is correct, deadlock detection allows granting resources quickly whenever possible. B is incorrect, deadlock detection does not check for a safe-state before resource allocation. C is incorrect, deadlock detection allows for variable resource allocation, fixed allocation is not a benefit. D is incorrect, piping resources between processes is the same for deadlock detection and prevention.

According to lecture 25, which of the following is NOT true about pages in memory? --- A: Pages have a dynamic size B: Multiple pages can belong to one process C: Pages do not need to be contiguous in memory D: Pages are completely hidden from the user

A is correct, pages are always a fixed size across the block of memory in which they are being used. B is incorrect, a process can have any number of pages which fit within the aforementioned block of memory. C is incorrect, pages do not need to be contiguous, which allows processes to be easily swapped out when one is completed. D is incorrect, the pages are utilized in areas of the OS which the user never sees. Only the OS can make a page request, which is one way they differ from segments.

According to the deadlock pdf, what is the best definition of the deadlock condition prevention "No Preemption"? --- A: A process holding certain resources must release its original resources and request them again if it is denied a further request. B: Defining a linear ordering or resource types in order to prevent the overlap on need in resources. C: Not granting a resource request that might lead to deadlock. D: Grants a resource request when possible, but checks for the presence of deadlock.

A is correct, the OS may preempt the second process and require it to release its resources. B describes circular wait and, therefore, is incorrect. C is incorrect as it is an approach to avoid deadlock. D is incorrect as it is a deadlock detection approach.

According to lecture 22(Deadlock), which one of the following best describe of "Deadlock Avoidance". --- A: All of above B: Allows the three necessary conditions but makes judicious choices to assure that the deadlock point is never reached C: A decision is made dynamically whether the current resource allocation request will, if granted, potentially lead to a dead lock D: Requires knowledge of future process requests

A is correct. B is incorrect because it is the describe of "Deadlock Avoidance", but it is not the only one listed. C is incorrect because it is the describe of "Deadlock Avoidance", but it is not the only one listed. D is incorrect because it is the describe of "Deadlock Avoidance", but it is not the only one listed.

According to Lecture 20 and 21, which of the following is NOT a way to handle mutual exclusion. --- A: Having a wait queen for processes B: Dekker's algorithm C: Peterson's algorithm D: Test and Set E: Compare and swap

A is the correct answer since having waiting queen for process is cannot guarantee mutual exclusion. B) Dekker's algorithm is one of the software approaches to handle mutual exclusion. C) Peterson's algorithm is another software approach to handle mutual exclusion. D) Test and Set is one of the hardware support for mutual exclusion. E) Compare and swap is another hardware support for mutual exclusion.

According to Lecture 20 (Synchronization tools), Livelock is known as ______? --- A: A situation in which two or more processes continuously change their states in response to changes in the other process(es) without doing any useful work. B: A situation in which two or more processes are unable to proceed because each is waiting for one of the others to do something. C: A situation in which a runnable process is overlooked indefinitely by the scheduler; although it is able to proceed, it is never chosen. D: A section of code within a process that requires access to shared resources and that must not be executed while another process is in a corresponding section of code. E: Quiznos

A is the correct description of Livelock. B is the incorrect. It is the description of Deadlock. C is incorrect. It is the description of Starvation. D is incorrect. It is the description of Critical Section. E is incorrect.

According to lecture 22, how can you prevent a hold-and-wait deadlock? --- A: By requiring that a process requests all it's required resources at one time. B: By defining a linear ordering of resource type. C: By ensuring that the process releases it's original resources and requests them again. D: By supporting multiple access for reads but exclusive access for writes. E: Hold-and-wait cannot be prevented.

A) Correct B) Wrong, this is for a circular wait C) Wrong, this is for no preemption D) Wrong, this is for mutual exclusion D) Wrong, there is a way to prevent it

According to Chapter 9: Main Memory pdf, what is the definition for External Fragmentation? --- A: Total memory space that exists to satisfy a request, but it is not contiguous B: Allocated memory which may be slightly larger than requested memory C: Swapping variant which is used for priority-based scheduling algorithms D: Is used to combine system libraries and program code using the loader into the binary program image E: Set of all logical addresses generated by a program

A) Correct, because this is correct definition for External Fragmentation B) Incorrect, because this is the definition for Internal Fragmentation C) Incorrect, because this is the definition for a swapping term called Roll out, Roll in D) Incorrect, because this is the definition for Static Linking E) Incorrect, because this is the definition for Logical Address Space

From Ch07-OS9e.pdf and Project 2 If a 24 MB frame of memory is allocated in the following order: Block 1: 3 MB Block 2: 1 MB Block 3: 2 MB Block 4: 5 MB Block 5: 5 MB Block 6: 5 MB and Blocks 1, 3, and 5 are freed, where would a 1 MB memory allocation request be placed if using Best-fit placement algorithm? --- A: In place of Block 3 B: In place of Block 1 C: In place of Block 2 D: In place of Block 5 E: At the end, after Block 6

A) Correct, of the available free blocks of memory, the 2 MB sized Block 3 is the best fit. B) This is where a First-fit algorithm would allocate the memory; the 3 MB sized Block 1 is not the best fit. C) The 1 MB sized Block 2 would be the best fit, but it is not a freed block. D) This is where a Worst-fit algorithm would allocate the memory; the 5 MB sized Block 5 is not the best fit. E) This is where a Next-fit algorithm would allocate the memory; the remaining 3 MB space at the end is not the best fit.

According to the Dino book, in the preamble to section 9.5 You allocate an array with one million elements, and it worked! But you know you don't have enough RAM for that. Your array probably ended up... --- A: In a secondary storage location, ready to be swapped back in when needed B: In main memory, but with elements re-sized to save space C: In any available network storage device the operating system could access, to increase your available memory capacity D: In main memory, spilling over into the memory space of other running processes

A) Is correct, the OS will use virtual memory techniques like paging to divide the request and store the data in secondary locations like a hard disk B) Is incorrect, the OS doesn't know what elements you're going to put in the array, just how much space you have requested C) Is incorrect, unless you have installed some nasty malware D) Is incorrect, memory is strictly controlled so that one process cannot access the memory of another process

According to Lecture 23, which method of multithreading takes in a pointer to a boolean flag that gets reset after the atomic critical section? --- A: Test and Set B: Memory Barrier C: Compare and Swap D: Atomic Variables E: Grant's Algorithm

A) This Is the correct answer B) A memory barrier is incorrect because the function being run does not reset the flag C) Compare and swap is incorrect because this takes in an expected, current and new value, compares them, and swaps as necessary D) Atomic variables are incorrect because these use functions to change rather than a flag E) Someday, but not yet

According to table 7.2 in the Ch07-OS9e.pdf presentation which is the simplest implementation of memory management techniques? --- A: Fixed Partitioning B: Dynamic Partitioning C: Virtual Memory Paging D: Virtual Memory Segmentation E: Thanksgiving break needs to come sooner

A) This is correct because the memory is divided into static partitions at the system generation time and partitions based on the size the programmer sets B) This is incorrect, implementation is more complex because it partitions based on the size needed by the process C) This is incorrect because of the huge overhead of complex memory management D) This is incorrect because of the huge overhead of complex memory management E) This is incorrect because thanksgiving break is already here! (im skipping class tuesday)

According to the deadlock pdf, which of the following best describes "Circular Wait"? --- A: A chain of processes exists, such that each process holds at least one resource needed by the next process in the chain. B: A process may hold allocated resources while awaiting assignment of other resources. C: No resource can be forcibly removed from a process holding it. D: Only one process may use a resource at a time. E: No process may access a resource until that has been allocated to another process.

A) This is the correct description of Circular Wait. B) This is the description of Hold-and-Wait. C) This is the description of No Pre-emption. D) This is one of the descriptions of Mutual Exclusion. E) This is one of the descriptions of Mutual Exclusion.

According to Chapter 7, what is the correct ordering of steps for translating a logical address to a physical address when using segmentation? I. Compare the offset, expressed in the rightmost m bits, to the length of the segment. If the offset is greater than or equal to the length, the address is invalid. II. Extract the segment number as the leftmost n bits of the logical address. III. Use the segment number as an index into the process segment table to find the starting physical address of the segment. IV. The desired physical address is the sum of the starting physical address of the segment plus the offset. --- A: II->III->I->IV B: I->II->III->IV C: II->IV->I->III D: III->II->IV->I

A) This is the correct ordering of steps. B) This is incorrect, the first step requires the segment number to be known which it is not until step 2. C) This is incorrect, the starting physical address is not yet known for the first stepas it has not been looked up in the table yet. D) This is incorrect, the segment number has not been extracted yet for the first step.

According to chapter 9 pdf, what pair defines the logical address space? --- A: Base and limit register B: Base and relocation register C: Limit register and hole D: Cache and Hole

A) is correct as the cpu checks to make sure every memory access generated must be between a base and limit. B) is incorrect as the relocation register is added when an address generated by the logical address is low compared to a limit register. C) is incorrect as a hole is a block of available memory. D) is incorrect a cache sits between main memory and cpu registers, and not base and limit.

According to the Chapter 9 pdf, what is Internal Fragmentation? --- A: Internal fragmentation is when allocated memory is slightly larger than requested memory. The size difference is memory internal to a partition but not being used B: Internal fragmentation is when allocated memory is slightly smaller than requested memory. C: Internal fragmentation is when enough total memory space exists, but it is not contiguous. D: Internal fragmentation is when there isn't enough total memory space for the program. E: Internal fragmentation is when your computer breaks internally.

A) is correct. The size difference is memory internal to a partition but not being used. B) is incorrect, internal fragmentation is when allocated memory is larger, not smaller, than requested memory. C) is incorrect, this is the definition of external fragmentation. D) is incorrect, internal fragmentation is when there is more allocated memory than requested. E) is incorrect.

According to the lecture 24 about chapter 9 Main Memory which piece of memory logic turns logical address in to physical address when the CPU makes memory requests? --- A: Memory management unit B: Limit register C: Memory address register D: Relocation register E: Dynamic loading register

A, is correct because memory management unit is responsible for the mapping of a logical address to a physical address. B, is incorrect because limit registers contains the range of logical addresses. C, is incorrect because memory address register holds the address of the current instruction that is to be fetched from memory. D, is incorrect because relocation register is a base register which contains value of the smallest physical address. E, is incorrect because dynamic loading registers helps in the loading of a process routine when it is called rather than when the process is started. Source- Lecture 24 and Chapter 9 in operating system concepts.

According to lecture 23, which is not true about shared memory? --- A: Shared memory can not be used by multiple processes B: Shared memory is the fastest form of interprocess communication C: Permission is read only or read-write for processes D: Shared memory works within threads

A. A is the correct answer because shared memory can be used my multiple processes. B. is incorrect because the statement is true. C. is incorrect because those are the only two permissions you can use. D. is incorrect because shared memory works within threads because threads use the same versions of memory.

What describes the deadlock avoidance method? --- A: Do not grant a resource request if this allocation might lead to a deadlock. B: Disallow one of the three necessary conditions for deadlock occurrence, or prevent circular wait condition from happening. C: Grant resource requests when possible, but periodically check for the presence of deadlock and take action to recover D: Avoid taking any sort of action related to possible deadlock.

A. Correct definition of deadlock avoidance according to deadlock.pdf B. Definition of deadlock prevention according to deadlock.pdf C. Definition of deadlock detection according to deadlock.pdf D. Not a valid approach to tackle possible deadlock

According to Chapter 7/9 slides, which of the following is a strength of fixed partitioning as a memory management technique? --- A: Operating system overhead B: Use of memory C: Active process number D: Dynamic partitions E: Favorite method of dinosaurs

A. Correct, fixed partitioning has little overhead B. Incorrect, inefficient use of memory due to internal fragmentation C. Incorrect, maximum size is fixed D. Incorrect, uses static partitions E. Incorrect (unless)

According to the pdf cs3113sp20class25 2.pdf, when does synchronization matter? --- A: When there are shared resources only B: When the resources are only not shared C: When there are no resources D: When there are an even or odd number of resources that are not shared

A. Correct; to prevent two processes from executing in their critical section at the same time with a shared resource. B. Incorrect; synchronization only matters if the resources are shared. C. Incorrect; synchronization only matters if the resources are shared and if there is no resources at all, then there are other problems. D. Incorrect; synchronization only matters if the resources are shared so having an odd or even number of resources won't affect synchronization if they are not shared resources

According Lecture 22 and Ch 7 on Deadlocks, which of the following is not a class of resources with a strategy to avoid Deadlocks --- A: Item Removal B: Swappable Space C: Process Resources D: Main Memory

A. Is correct because it is not class of resources or strategy to avoid deadlocks B. Is incorrect because swappable space is used to have a secondary storage for swapping processes to prevent deadlocks C. Is incorrect because process resources are used to avoid deadlocks through resource ordering D. Is incorrect because main memory is used to prevent deadlocks by preemptively swapping to secondary memory to free up space to avoid deadlocks

According to the prerecorded lecture 24, Which part of the memory hierarchy has the fastest performance? --- A: Registers B: Disk C: Internet D: Cache E: Main Memory

A. Is correct, as accessing the registers is the fastest. B. Is incorrect, the disk drive is quite large, so accessing the memory here is slow. C. Is incorrect, accessing the storage on the internet will take some time, and is considered one of the slowest in the hierarchy. D. Is incorrect, is the second fastest in accessing memory. E. Is incorrect, is the third fastest in accessing memory.

According to the notes from class 25 (Deadlock), what is the difference between strong and weak semaphores? --- A: Strong semaphores have a strict FIFO ordering, while weak semaphores do not. B: Strong semaphores track which resources in a resource pool are free, while weak semaphores only track how many are free. C: Strong semaphores are not immune to deadlock, while weak semaphores are. D: Strong semaphores utilize the "signal" or "V" operation, while weak semaphores utilize the "wait" or "P" operation. E: Strong semaphores are able to headlock "heavy" processes, while weak semaphores are only able to headlock "light" processes.

A. Strong semaphores are defined as those that strictly obey a FIFO scheduling order. B. All counting semaphores track just how many resources are free (in a resource pool). C. No semaphores are immune to deadlock; they are simply a method to avoid it. D. All semaphores utilize the basic P and V operations. E. This is an obvious joke answer. Semaphores cannot headlock anything.

According to deadlock.pdf from Week 11, which of the following are deadlock avoidance restrictions? --- A: All of the above B: Maximum resource requirement for each process must be stated in advance C: Processes under consideration must be independent and with no synchronization requirements D: There must be a fixed number of resources to allocate E: No process may exit while holding resources

A. This answer is correct. B. This is incorrect because "maximum resource requirement for each process must be stated in advance" is a deadlock avoidance restriction, but not the only one listed. C. This is incorrect because "processes under consideration must be independent and with no synchronization requirements" is a deadlock avoidance restriction, but not the only one listed. D. This is incorrect because "there must be a fixed number of resources to allocate" is a deadlock avoidance restriction, but not the only one listed. E. This is incorrect because "no process may exit while holding resources" is a deadlock avoidance restriction, but not the only one listed.

According to Synchronization-Tools.pdf in week 10, which is NOT an issue that arises for the OS due to concurrency? --- A: The OS has no way of allocating resources for two competing processes. B: The OS must keep track of various processes. C: The OS must allocate and de-allocate resources for each active process. D: The OS must protect the data and physical resources of each process against unintended interference. E: The functioning and output of a process must be independent of its execution speed relative to the speed of other concurrent processes.

A. is Correct (incorrect) because this is NOT a problem of concurrency. B-E. Are all Incorrect because they are all problems that arise due to concurrency.

According to lecture 21, what keyword best defines a class/ Object-Oriented structure that uses functions to restrict access to resources? --- A: Monitor B: Mutex C: Segment D: Semaphores

A. is correct B. is a lock meant to prevent deadlock C. is a non-fixed block of memory D. are another method of preventing deadlock but through the use of flags

According to Lecture 24 (Chapter 9), Which of the following most accurately describes a Page in memory: --- A: A fixed-length block in secondary memory B: A fixed-length block in main memory C: A non-fixed block of memory D: Used by processor to produce a physical address

A. is correct because a memory page resides in secondary memory (such as a disk) B. is incorrect because it describes a frame C. is incorrect because it describes a segment D. is incorrect because it describes a page table.

According to the lecture on 11/16/21 and the chapter 7 slides: Using the Buddy System, what would be the correct partitioning of a 64M block of memory, without compacting, to fit block A which takes up 13M of memory? Original memory block: [64M] --- A: [A + 3M][16M][32M] B: [A + 3M][16M][16M][16M] C: [A][51M] D: [16M][16M][A + 3M][16M] E: [32M][A + 3M][16M]

"A" is the correct answer because using the Buddy System, one should partition memory in half going to the leftmost partition each time until you have the smallest possible partition that still accepts the block of memory you are trying to account for, which in this case was 13M. "B" is incorrect because it is not necessary to divide every segment in half. You only have to divide partitions in half starting from the leftmost available partition with sufficient size. "C" is incorrect because there is additional memory that needs to be partitioned before accounting for A. "D" is incorrect because A must be placed into the leftmost available partition with sufficient size and the original block of memory has been partitioned too many times. "E" is incorrect A must be placed into the leftmost available partition with sufficient size.

According to the slides on Memory Management, which of the following statements is NOT true about Main Memory utilization? --- A: A program will occupy an entire partition, depending on the program size B: Main memory utilization is inefficient C: A program may be too big to fit in a partition D: There can be Internal fragmentation E: (All Of The Above Statements Are FALSE)

(a) This is CORRECT. This statement is FALSE, because any program, regardless of size, will occupy an entire partition (b) This is incorrect. This statement is TRUE. A program will occupy an entire partition, regardless of size (c) This is incorrect. This statement is TRUE. Program needs to be designed with the use of overlays because of this (d) This is incorrect. This statement is TRUE. There can be wasted space due to the block data loaded being smaller than the partition (e) This is incorrect. Not all of the statements are FALSE. Three of the statements are true, while only 1 is correct.

Claim matrix C C R1 R2 R3 R4 P1 4 4 5 1 P2 3 0 1 3 P3 9 9 2 0 Allocation Matrix A A R1 R2 R3 R4 P1 1 4 0 0 P2 0 0 1 0 P3 0 3 2 0 Resource vector R R R1 R2 R3 R4 16 8 3 4 Availability Vector V V R1 R2 R3 R4 15 1 1 4 Given these matrices for the banker's algorithm, determine which resource allocation will produce a safe state. --- A: 3 of R1 to P2, and 3 of R4 to P2. B: 1 of R1 to P1, and 4 of R2 to P1 C: 1 of R3 to P2 D: 3 of R1 to P1, 3 of R1 to P2, and 9 of R1 to P3

A.) Correct, because subtracting those resources from the availability vector and adding them to the allocation matrix creates a row identical to the one for P2 in the claim matrix, meaning that the process has everything it needs to complete, thus keeping the program out of deadlock. B.) Incorrect, because there is not enough of the R2 resource to make this allocation, according to the availability vector. C.) Incorrect, because this allocation does not meet the amount of R1 and R4 that P2 needs to execute. This would likely be chosen when mistaking the allocation matrix for the claim matrix. D.) Incorrect, because this allocation fulfills the requirements for R1 in all of the processes, but the processes are still in an unsafe state, because at least one process needs all four of its resource claims to be satisfied in order to be executed without deadlock.

According to the lecture on 9/18, what is the benefit of defragmentation on memory usage? --- A: It fixes external fragmentation by reallocating partitions so the free space is consolidated. B: It fixes internal fragmentation by taking unused memory away from partitions. C: It fixes both internal and external fragmentation by moving around and shortening partitions D: It rewrites and optimizes the processes stored in memory to reduce size. E: It deletes all data stored on the computer that hasn't been accessed within a certain time to conserve memory.

A.) Correct. This is what defragging does B.) Incorrect. Defragging only fixes external fragmentation C.) Incorrect. Once again, defragging only fixes external fragmentation D.) Incorrect. This would break a lot of programs on accident. E.) Incorrect. This would cause chaos and the loss of many old photos.

According to the virtual-memory slides from lecture 26, which of the following is not included in each entry in the Inverted Page Table? --- A: Offset B: Chain pointer C: Control bits D: Process identifier E: Page number

A: Correct because it is not in the page table and is the last bits of the virtual address. B: Incorrect because it is the index value of the next entry in the chain in the page table. C: Incorrect because it includes flags and protection and locking information in the page table. D: Incorrect because this is the process that owns this page in the page table. E: Incorrect because it is the page number portion of the virtual address in the page table.


Set pelajaran terkait

Kearley Biol 1010 final application questions

View Set

Chem 1411 Ch. 10 Multiple Choice

View Set

Life Insurance and Health Insurance

View Set