CSCI 4500 / 8506 Sample Questions for Quiz 5

Similar documents
6. Which of the following operating systems was the predecessor of Microsoft MS-DOS? a. Dynix b. Minix c. CP/M

COMPUTER SCIENCE 4500 OPERATING SYSTEMS

CS Operating Systems

CS Operating Systems

Requirements, Partitioning, paging, and segmentation

Memory Management. Memory Management

Memory Management. Memory Management Requirements

Requirements, Partitioning, paging, and segmentation

CIS Operating Systems Contiguous Memory Allocation. Professor Qiang Zeng Spring 2018

Chapter 7 Memory Management

Process. Memory Management

Process. One or more threads of execution Resources required for execution. Memory (RAM) Others

Process. One or more threads of execution Resources required for execution

Memory Management. COMP755 Advanced Operating Systems

Process. One or more threads of execution Resources required for execution. Memory (RAM) Others

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit

CIS Operating Systems Memory Management. Professor Qiang Zeng Fall 2017

Memory Management. Jo, Heeseung

Memory Management Basics

Memory: Overview. CS439: Principles of Computer Systems February 26, 2018

Memory Management. Reading: Silberschatz chapter 9 Reading: Stallings. chapter 7 EEL 358

Preview. Memory Management

Chapter 9 Real Memory Organization and Management

Chapter 9 Real Memory Organization and Management

Operating systems. Part 1. Module 11 Main memory introduction. Tami Sorgente 1

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

Lecture 7. Memory Management

Memory Management william stallings, maurizio pizzonia - sistemi operativi

Part II: Memory Management. Chapter 7: Physical Memory Chapter 8: Virtual Memory Chapter 9: Sharing Data and Code in Main Memory

MEMORY MANAGEMENT. Jo, Heeseung

CS420: Operating Systems

Objectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency

MEMORY MANAGEMENT/1 CS 409, FALL 2013

UNIT III MEMORY MANAGEMENT

Operating System Support

Operating Systems. Memory Management. Lecture 9 Michael O Boyle

Memory Management. Frédéric Haziza Spring Department of Computer Systems Uppsala University

12: Memory Management

8: Memory Management

Operating Systems (2INC0) 2017/18

Compile: compiler. Load: loader. compiler linker loader memory. source object load code module module 2

CS370 Operating Systems

Main Memory (Part I)

Chapter 8. Operating System Support. Yonsei University

CS399 New Beginnings. Jonathan Walpole

Chapter 8 Memory Management

Last Class: Deadlocks. Where we are in the course

Chapter 9 Memory Management

Operating Systems Memory Management. Mathieu Delalandre University of Tours, Tours city, France

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD

1. a. Show that the four necessary conditions for deadlock indeed hold in this example.

In multiprogramming systems, processes share a common store. Processes need space for:

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition

Memory Management. Memory Management. G53OPS: Operating Systems. Memory Management Monoprogramming 11/27/2008. Graham Kendall.

Q1. What is Deadlock? Explain essential conditions for deadlock to occur?

The Memory Management Unit. Operating Systems. Autumn CS4023

Model answer of AS-4159 Operating System B.tech fifth Semester Information technology

File Systems. OS Overview I/O. Swap. Management. Operations CPU. Hard Drive. Management. Memory. Hard Drive. CSI3131 Topics. Structure.

Memory Management (1) Memory Management

Memory Management (1) Memory Management. CPU vs. memory. No.8. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

Memory Management. Memory Management

With regard to operating systems the kernel consists of the most frequently used functions in the operating system and it kept in main memory.

3. Memory Management

CS 390 Chapter 8 Homework Solutions

Roadmap. Tevfik Koşar. CSC Operating Systems Spring Lecture - XII Main Memory - II. Louisiana State University

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

Virtual Memory. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Operating Systems: Internals and Design Principles. Chapter 7 Memory Management Seventh Edition William Stallings

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2

Operating Systems Unit 6. Memory Management

Memory Management. Today. Next Time. Basic memory management Swapping Kernel memory allocation. Virtual memory

Chapter 8 & Chapter 9 Main Memory & Virtual Memory

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

CSCE Operating Systems Non-contiguous Memory Allocation. Qiang Zeng, Ph.D. Fall 2018

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

Heap Management portion of the store lives indefinitely until the program explicitly deletes it C++ and Java new Such objects are stored on a heap

Virtual Memory Outline

CS 143A - Principles of Operating Systems

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science

Administrivia. Deadlock Prevention Techniques. Handling Deadlock. Deadlock Avoidance

Memory Management. CSE 2431: Introduction to Operating Systems Reading: , [OSC]

Background. Contiguous Memory Allocation

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

CIS Operating Systems Non-contiguous Memory Allocation. Professor Qiang Zeng Spring 2018

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1

Memory Management Prof. James L. Frankel Harvard University

Memory Management. 3. What two registers can be used to provide a simple form of memory protection? Base register Limit Register

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18

Chapter 8: Main Memory

Frequently asked questions from the previous class survey

CS418 Operating Systems

CS307 Operating Systems Main Memory

Memory management: outline

Chapter 8: Memory-Management Strategies

Operating Systems. 09. Memory Management Part 1. Paul Krzyzanowski. Rutgers University. Spring 2015

Memory management: outline

Module 8: Memory Management

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table

Transcription:

CSCI 4500 / 8506 Sample Questions for Quiz 5 1. Why might a system treat memory allocation requests from the operating system itself differently from those generated by an application? a. The OS typically requests memory in large units, while applications usually request small units of memory. b. Failure of a memory request made by the OS could possibly cause the entire system to fail. Failure of an application request would cause a single application to fail, not the entire system. c. It doesn t; requests from the OS and from any application are treated identically. 2. Since memory is a non-consumable resource, a. processes need not be concerned with deadlock involving memory as a resource. b. there must be facilities to deallocate (reclaim) previously used regions of memory when they are no longer used. c. All of the above answer choices are correct. 3. The sole advantage of monoprogramming over multiprogramming is a. simplicity. b. it eliminates the need for mutual exclusion, thereby eliminating the possibility of deadlock. c. it can handle multiple processors. 4. What is done with memory that is not used by the single process executing in a monoprogrammed system? a. It is used to provide interprocess communication. b. Since all the memory in the system is assigned to the single executing process, there is no unused memory. c. It is unused, and therefore wasted. 5. Which of the following is required of a program designed to run on a monoprogrammed system? a. It must be written so it can use a variable amount of memory. b. It cannot use more memory than is physically available. c. It must be written to dynamically relocate itself when execution begins. 6. Which of the following operating systems was the predecessor of Microsoft MS-DOS? a. OS/2 b. Dynix c. CP/M 7. Which of the following is the name of a technique that makes it possible to have multiple processes resident in memory at the same time? a. multithreading b. multiprogramming c. multiprocessing 8. Which of the following techniques can be used to perform a reasonably accurate analysis of the behavior of multiprogramming systems? a. small and large Minkowski model b. birth and death Markov process model c. Petri nets

9. In modeling multiprogramming systems, each state in the model represents a unique number of processes in the ready state, and state 0 corresponds to the system being in a state with all processes blocked (not ready). How many ready processes are represented by state 1 in the model? a. zero or one processes b. one or more processes c. exactly one process 10. The simple model used to determine processor utilization discussed uses elementary probability theory to determine the probability that all N processes are not blocked when the probability of an individual process being blocked is p. What is the probability that all N processes are not blocked? a. 1 minus (p to the Nth power) b. (p to the Nth power) - 1 11. In general, what happens to processor utilization as the number of processes in memory increases but the probability of a process being blocked remains constant? a. Processor utilization decreases to a point, then begins to increase. b. Processor utilization increases to a point, then begins to decrease. c. Processor utilization increases. 12. Assume the number of processes resident in memory remains constant, but the probability of each process being blocked increases. In general, what happens to overall processor utilization? a. It is impossible to tell, since it depends on the exactly number of processes resident in memory. b. Processor utilization decreases. c. Processor utilization decreases to a point, and then it begins to increase. 13. In multiprogramming we place multiple processes in memory at the same time. Where these processes are placed varies. In the IBM operating system named OS/MFT, where were processes placed? a. Processes are placed at random locations. b. Each process was placed in one of several regions of memory, each with a fixed size. 14. Some systems used multiple queues of jobs waiting to be executed, one for each memory partition. In this scheme, how are incoming (new) jobs assigned to queues? a. A new job was placed in the shortest queue. b. A new job was placed in a randomly-selected queue. c. A new job was placed in a queue associated with a partition that was large enough to satisfy the job s memory requirements. 15. In a system that uses a single queue of jobs waiting to be executed, it is common for the job at the head of the queue to be placed in the first partition to become unused (because of the completion of the job that was running there). What other condition is necessary for the job at the head of the queue to be assigned to the first available memory partition? a. The job had to have a priority greater than the job that had just been using the memory partition. b. The job s memory requirements had to be no larger than the size of the memory partition. 16. Another problem with running jobs in different memory partitions is that the job must be prepared to execute in the range of addresses associated with the partition. Which of the following techniques can not be used to accomplish this? a. Statically preparing the program to run in a particular region of memory. b. Shifting each of the addresses generated by the program during its execution left by the number of bits corresponding to its partition number (1, 2,...)

17. The term used for modifying the addresses used with a program depending on where in physical memory it will execute is called a. translation. b. relocation. c. dynamic linking. 18. In the IBM System/360, a base register is a. a register whose contents are added to each address generated by an instruction. b. a register whose contents contain the high-order 24 bits of the address of the lower address of the partition in which a process is executing. 19. In the IBM System/360, a base register is a. a general-purpose register whose contents are not controlled by the process. b. one of the general-purpose registers explicitly used by a program. c. a special-purpose register that can be controlled by the process. 20. When a system includes a special-purpose register to solve the relocation problem, it is common for that register a. to be subtracted from the addresses generated by a program during its execution. b. to contain the address of the lowest, or first location used by a user program. 21. When the CPU is switched from executing one user program to another in a system with multiple programs resident, and a system using a single relocation register a. the user process receiving control of the CPU must manually change the contents of the relocation register. b. the contents of the relocation register need not be altered. c. the operating system must modify the contents of the relocation register as part of each context switch operation. 22. The term memory protection is used to describe the techniques used to a. prevent an executing program from modifying values in the stack associated with the program. b. prevent an executing user program from modifying and/or accessing regions of memory not assigned to that program. 23. A common approach to memory protection uses a register that is frequently called a. the limits register. b. the security register. c. the authority register. 24. Suppose a system uses a limits register as part of its memory protection scheme. When an address generated by the program exceeds the value in the limits register, a. the address is left-shifted by the number of bits sufficient to ensure the resulting address is less than or equal to the value in the limits register. b. the address is replaced by the value in the limits register. c. a memory protection fault is generated.

25. The term swapping is used to describe a. the process of copying all of the memory contents associated with a program to a reserved region on disk, and then copying all of the information on disk for another program into the primary memory just vacated. b. copying the contents of a small region of memory to disk so that memory can be used to hold part of another process. c. exchanging the contents of a region of memory with the contents of a different region of memory belong to a different process. 26. The IBM operating system called OS/MVT differs from OS/MFT in what major way? a. The size of the memory partitions in OS/MVT was variable, while they were fixed in OS/MFT. b. it allowed multiple processes to be resident in memory, whereas OS/MFT allowed only a single process in memory at a time. c. It supported execution of a single process on multiple System/360 CPUs at the same time. 27. After a system using variable partition sizes has been in operating for some time, the available free memory a. becomes fragmented into small regions between the allocations made for running programs. b. reaches a stable minimum value. c. tends to be grouped together into two regions, one at the bottom of the physical memory and one at the top of the physical memory. 28. Suppose there are numerous small regions of unused memory in a system, each of which is too small to load a program for execution. The process of moving programs in memory so these small fragments are grouped together in a larger region is generally termed a. shrinking the memory. b. compacting the memory. c. compressing the memory. 29. What is the CPU doing while the small unused regions of memory resulting from variable-size partitions are being moved so they form a larger region? a. moving the contents of partitions to new locations, and possibly relocating programs. b. it is moving the contents of the holes so they can be realigned to yield a larger unused memory region. 30. Which of the following schemes will probably waste the least amount of memory, given a sufficient collection of work to be processed? a. swapping b. OS/MVT 31. What program/process property must be accurately specified if partitioned memory management is to be used effectively? a. indication of whether the process will request additional memory during execution b. the size of the memory region required for the program s execution c. the size of the input data files 32. What is the heap? a. a region of memory used to satisfy dynamic memory allocation requests b. a region of memory used during sorting

33. Suppose the memory available for execution of a process in a partitioned memory organization is sufficient to begin execution, but insufficient to complete execution because of increases in the size of the stack and/or the heap. Which of the following events is used to identify this condition? a. The memory allocated to the stack and the memory allocated to the text (code) region collide. b. The program generates a page fault. c. The memory allocated to the heap and the memory allocated to the stack collide. 34. There are several major techniques used to keep track of the status (allocated or free) and size of each block of contiguous physical memory in a system. What are two of these? a. bit maps and hash tables b. linked lists and balanced binary trees c. bits maps and linked lists 35. Suppose a bit map is used to record the status of memory blocks. Which of the following tasks is relatively difficult to perform using the bit map approach? That is, which task is likely to require the most execution time to complete? a. deallocating a single block of memory b. allocating a memory region with N contiguous blocks c. joining two blocks deallocated at separate times into one contiguous block 36. Suppose a linked list is used to record the location and size of each unused block of memory in a system. Further assume the list is ordered by the size of each free region, from the smallest region (at the front of the list) to the largest region (at the end of the list). Which of the following requests is most difficult to perform, in general, with this scheme? a. allocating a memory region that includes a specified location b. identifying the largest unused block of physical memory in the system c. coalescing all regions of memory that are physically adjacent 37. Suppose a linked list is used to record the location and size of each unused block of memory in a system. Further assume the list is ordered by the location of each free region, from the region with the smallest address (at the front of the list) to the region with the largest address (at the end of the list). Which of the following requests is easiest to perform, in general, with this scheme? a. allocating a block of memory with an arbitrary specified size b. identifying the largest unused block of physical memory in the system c. coalescing all regions of memory that are physically adjacent 38. When the first fit algorithm finds an unused region of memory that is sufficient to satisfy a memory allocation request, what happens if the region is larger than the requested size? a. The region is split, and the region containing the excess memory is placed back on the list of free/unused regions. b. The entire region is allocated to the process making the request. 39. How does the next fit algorithm differ from the first fit algorithm? a. First fit finds the first unused memory region that satisfies an allocation request. Next fit finds the second best fit for an allocation request. b. First fit always starts with the first node in the linked list of nodes identifying free memory regions. The next fit algorithm begins where the search for the last request ended.

40. Suppose the address of a block of memory being managed by the buddy system is 01101111000 (binary). What is the binary address of its buddy if the block is of size 4, and if the block is of size 16? a. 01101101000, 01101101000 b. 01101111100, 01101101000 41. Suppose the buddy system is used to manage the available regions of unallocated memory. What is unique about the size of unused memory regions in this algorithm? a. Each unused region must be paired with another unused region (its buddy) to satisfy any memory allocation request. b. Each unused region has a size equal to a power of 2. c. Each unused region is exactly the same size as every other unused region. 42. Which of the following pairs of schemes for managing memory provide reasonably efficient techniques for deallocation? a. the buddy system and bit maps b. linked lists ordered by size and linked lists ordered by location c. bit maps and linked lists ordered by size 43. To what does the term fragmentation refer when applied to memory allocation in a computer system? a. the creation of areas in memory that are not used, or are not usable, by programs. b. the need to use two memory regions that are not physically contiguous because no single contiguous region with a sufficient size can be found. c. the creation of areas in memory that are used too frequently by executing programs 44. External fragmentation results in small regions of unallocated memory located a. in a region jointly allocated to the heap of two or more programs. b. outside the allocations belonging to any program. c. in the memory allocated to the data region of a program. 45. Internal fragmentation results in small regions of unused memory located a. between a region of read-only memory and the top (upper limit) of the physical address space. b. in regions that have been allocated to programs. 46. Knuth s fifty percent rule says that, averaged over time, a. there will be fifty percent as many holes in memory as there are processes. b. the size of holes will be fifty percent as large as the size of the largest process. c. there will be fifty percent as many processes in memory as there are holes. 47. The unused memory rule for partitioned memory is a rather astounding result. If the average size of a hole (i.e. a small unused memory region) is k times the average amount of memory associated with a process, then the fractional part of memory occupied by holes is given by the expression a. (k + 1) / (k + 2) b. (k - 1) / (k + 1) c. k / (k + 2) 48. Suppose the buddy system is used to manage memory allocation and deallocation of a system that does not divide memory into blocks smaller than 1K. When a process requests a 40K block, how large a block will it receive if the allocation request is successful? a. 52K b. 64K c. It is impossible to tell from the information given.

49. Suppose a system has the following unused blocks of memory: 10K at location 15K, 15K at location 35K, and 10K at location 55K. A process relinquishes 5K of memory at location 30K. What unused blocks of memory will exist after the deallocation is performed? a. 10K at location 15K, 20K at location 30K, and 10K at location 55K b. 15K at location 15K, 15K at location 35K, and 10K at location 55K. 50. A worst fit memory allocation technique might make sense because a. it would leave the largest unused region of memory available to satisfy future allocations. b. it would make use of excess CPU time. c. it would justify the purchase of additional memory.