Computer Science Exam 7

docx

School

James Madison University *

*We aren’t endorsed by this school

Course

446

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by DeaconKomodoDragon3841

Report
**Operating Systems Exam: Memory Management** --- **Instructions:** 1. Answer all questions. 2. Write your answers in the spaces provided. 3. Ensure your responses are clear and concise. --- **Section A: Multiple Choice (1 mark each)** 1. **What is the primary purpose of memory management in an operating system?** a) File storage b) Task scheduling c) Resource allocation d) User interface **Answer: c** 2. **Which memory management technique allows a process to be executed even if it is not completely loaded into memory?** a) Swapping b) Paging c) Segmentation
d) Fragmentation **Answer: a** 3. **What is thrashing in the context of virtual memory?** a) Efficient memory utilization b) Excessive page swapping c) Fast context switching d) Dynamic memory allocation **Answer: b** --- **Section B: True/False (1 mark each)** 4. **In demand paging, pages are brought into memory only when they are required.** **Answer: True** 5. **Fragmentation occurs when free memory is broken into small, non-contiguous blocks.** **Answer: True** ---
**Section C: Short Answer (2 marks each)** 6. **Explain the difference between internal fragmentation and external fragmentation.** **Answer:** Internal fragmentation occurs when memory is allocated in fixed- size blocks, and the allocated memory may be larger than what is required, leading to wasted space within a block. External fragmentation, on the other hand, occurs when free memory is scattered throughout the system, making it challenging to allocate contiguous blocks for a process. 7. **Describe the purpose of the Memory Management Unit (MMU) in an operating system.** **Answer:** The Memory Management Unit (MMU) is responsible for translating virtual addresses generated by a program into physical addresses in the computer's memory. It plays a crucial role in implementing virtual memory, ensuring efficient memory utilization, and enabling processes to run in an isolated address space. --- **Section D: Matching (2 marks each)** Match the memory management term with its description. 8. **A. Page Table** i. Translation of virtual to physical addresses
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9. **B. Segmentation** ii. Division of memory into fixed-sized blocks **Answers:** 8. i 9. ii --- **Section E: Essay (10 marks)** 10. **Discuss the challenges and solutions associated with memory management in modern operating systems. Consider the impact of increasing system complexity, the need for efficient utilization, and the role of virtual memory.** *Answer:* (Answers will vary; evaluate based on the depth of understanding and coverage of key points.) --- **Answer Key:** 1. c 2. a 3. b 4. True
5. True 6. (Accept well-explained responses) 7. (Accept well-explained responses) 8. A - i 9. B - ii 10. (Evaluate based on content, coherence, and coverage of key points)