Segment# Base Limit 0 219 600 1 2300 14 2 90 100 3 1327 580 4 1952 96 Map to physical addresses: <0,430> ==> 219 + 430 = 649 <1,10> ==> 2300 + 10 = 2310 <2,500> ==> 90 + 500 !ERROR! <3,400> ==> 1327 + 400 = 1727 <4,112> ==> !ERROR! ------------------------------------------------ Using a non-contiguous memory allocation scheme and paging, consider a physical memory of size 2GB. (a) How many bits are required to represent an address? (b) Of the number of required bits, the high-order 14 bits represent the page number. (c) How many pages are there? (d) What is the page size? (e) Given the average process size is 32MB, how many pages will the average process require? (f) What is the degree of multiprogramming (i.e. the average number of processes running at any given time)? (g) What happens if additional processes arrive in the ready queue? (h) Using a virtual memory of 4GB, what is the maximum process memory allowed? How many bits are required? (i) What is the maximum degree of multiprogramming? 31 (a) 2 = 2,147,483,648 14 (c) 2 = 16,384 pages 17 (d) 2 = 131,072 bytes (e) Avg process size is 32MB = 25 2 = 33,554,432 33,554,432 / 131,072 = 256 pages (f) 16,384 / 256 = 64 processes in memory 32 (h) 2 = 4,294,967,296 (i) Theoretically, 1 process per frame: 31 17 14 2 / 2 = 2 = 16,384 FIFO 1 2 3 4 1 2 5 1 2 3 4 5 1 1 1 2 3 4 1 1 1 2 5 5 2 2 3 4 1 2 2 2 5 3 3 3 4 1 2 5 5 5 3 4 4 * * * * * * * * * ==> 9 faults 1 2 3 4 1 2 5 1 2 3 4 5 1 1 1 1 1 1 2 3 4 5 1 2 2 2 2 2 2 3 4 5 1 2 3 3 3 3 3 4 5 1 2 3 4 4 4 4 5 1 2 3 4 5 * * * * * * * * * * ==> 10 faults Underlying GOAL: minimize the number of page faults