COMP 2432 Operating Systems Tutorial 8
1. Contiguous Memory Allocation.
Consider a memory of total size of 5000K that is managed using IBM MVS MVT approach. After a sequence of memory requests, there is a list of 4 holes of size 200, 400, 600, and 300K, available in that order. Indicate how the requests of 280, 180, 320, 400, 120, and 160K arriving in that order are served using (a) first-fit, (b) best-fit, and (c) worst-fit memory allocation algorithms. Are there any unsatisfied requests using the three algorithms? What is the utilization of each of the three allocation algorithms? Utilization is defined to be amount of memory used divided by total amount of memory. Which is the best and which is the worst?
Using compaction, could you satisfy all the requests in the three algorithms?
Copyright By PowCoder代写 加微信 powcoder
2. More Contiguous Memory Allocation.
Consider a memory of total size of 1000K managed using IBM MVS MVT approach. After a sequence of memory requests, there is a list of 3 holes of size 100, 180, and 120K. You are given these 10 requests: 31, 79, 24, 75, 34, 65, 46, 11, 27, and 18K, arriving in that order. Indicate how the requests are satisfied with (a) first-fit algorithm, (b) best-fit algorithm, and (c) worst-fit algorithm. What are the utilizations for the three algorithms respectively? Which is the best and which is the worst?
Using compaction, could you satisfy all the requests in the three algorithms?
3. Paging.
Consider logical address translation in a paged system, based on byte-addressable memory. The size of the logical address space is 32MB and the size of a page is 512 bytes. The data is stored in a physical main memory of size 256KB.
(a) Whatisthelengthofthelogicalorvirtualaddress?
(b) Whatisthelengthofthephysicaladdress?
(c) What is the length of the displacement or offset field?
(d) Whatisthelengthofthepagenumberfield?
(e) How many frames are there in the main memory?
4. Page Table and Memory Frame.
Consider a process P that occupies 5 pages (page 0 to page 4), storing contents A, B, C, D and E respectively. There are 7 free frames available in the memory, maintained by the operating system in the frame number order 42, 11, 35, 10, 24, 16 and 40. Draw a diagram to indicate the content of the frames and the page table after all the 5 pages of P are loaded into the physical memory. Assuming that each page is of size 1KB and 6 bits are used to indicate frame number, determine the physical address that the logical address 0010011000011 is mapped to. What would be the size of the main memory in this case?
5. Segmentation.
Consider the segment table for process P1. The segment table contains the following entries.
P1 Segment 0
(a) (0, 430) (b) (1, 200) (c) (2, 30) (d) (3, 400) (e) (4, 112)
6. Segmentation with Sharing.
Suppose that segment 2 of P1 in Question 5 is an array for grade information to be shared to another process P2, which has a first segment of size 781 for its program, a second segment of size 483 for its global variables and a final fourth segment of size 425 for its stack. Assume that the computer has a small memory of 4KB, with physical address from 0 to 4095 and that the segment tables are stored at the high memory from 3800 to 4095. Segments for P2 are to be allocated from the free memory using (a) first-fit algorithm, (b) best-fit algorithm, and (c) worst-fit algorithm. Show the three different segment tables as produced by the three algorithms for P2. Determine the physical addresses by performing the five logical address translations as in Question 5 for the three algorithms, assuming that they are now generated by P2.
Base Length 219 600
2300 14 90 100 1327 580
1952 96 Determine the physical addresses for the following logical addresses of P1.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com