CSE 435- Final Exam Prep

CSE 435 Final Exam Prep

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f the resulting allocation table. (1) A fourth process arrives, with a maximum memory need of 60 and an inital need of 25 units. Yes, Sequence: 2-51-0-54 (2) A fourth process arrives, with a maximum memory need of 60 and an initial need of 35 units. No Max Hold Need Process 1 70 25 45 20 2 60 40 3 60 15 45 25 60 35 4 There are only 15 memory units available (150— 45 — 40 — 15 —35 = 15) which puts the system in an unsafe state. W14 P5 What is the difference among deadlock prevention, avoidance, and detection? Prevention- Gaurantees that deadlock will not occur Detection - OS checks for deadlock and takes action Avoidance - Analyzes each new resource request W15 P1 (a) In a fixed-partitioning scheme, what are the advantages of using unequal-size partitions? Programs up to 16mb can be accomodated without overlays. partitions smaller than 8mb allow smaller programs to be accomidated with less internal space. (b) What is the difference between internal and external fragmentation? Internal fragmentation - Wasted space due to the block of data loaded being smaller than the partition. External fragmentation - Small holes between allocated memory in dynamic partitioning • W15 P2 Suppose a fixed partitioning memory system with partitions of 100K, 500K, 200K, 300K, and 600K (in memory order) exists. All five partitions are currently avaliable. a. Using the best fit algorithm, show the state of memory after processes of 212K, 417K, 112K, and 350K (in request order) arrive. b. Using the best avaliable algorithm, show the state of memory after processes of 212K, 417K, 112K, and 350K (in request order) arrive. c. At the end of part (a), how much internal fragmentation exists in this system? d. At the end of part (b), how much internal fragmentation exists in this system? 8) best available a) best fit partition 100K 417K 417K, 358K 500K 112K 200K 212X 300K 600K c) 83+88+88 = 259K d) 259+250 = 509K W15 PS A memory manager for a segmented system has a free list with blocks of size 600 bytes, 400 bytes, 1000 bytes, 2200 bytes, 1600 bytes, and 1050 bytes. a. What block will be selected to serve a request for 1603 bytes under a best-fit policy? 2200 b. What block will be selected to serve a request for 949 bytes under a best-fit policy? 1000 c. Assume the free list is ordered as listed in the problem statement. What block will be selected to serve a request for 1603 bytes under a first-fit policy? 2200 d. Assume the free list is ordered as listed in the problem statement. What block will be selected to serve a request for 1049 bytes under a first-fit policy? 2200 W15 P4 A dynamic partitioning scheme is being used, and the following is the memory configuration at a given point in time, The shaded areas are allocated blocks; the white areas are free blocks. the next three memory requests are for 40M, 20M, and 10M. Indicate the starting address for each of the three blocks using the indicated placement algorithms: (1) First-fit 40:80 20:20 10:160 (2) Best-fit 40:230 20:...
View Full Document

This note was uploaded on 09/26/2013 for the course CSE 435 taught by Professor Cheng during the Fall '07 term at Michigan State University.

Ask a homework question - tutors are online