Weekly Note 7 - Week 12
16 March 2019
Lecture - Tuesday, March 19th.
16-19 in U82
We will cover chapter 9 on main memory, and study how to detect and handle them. This chapter will be the primary material for exam topic 6: "Main Memory".
We will have a small review of the previous lecture, so this time it will be chapters 8, and we probably sneak in a Kahoot.
Tutorial session
Thursday March 21th. 8-10 in U166 or Friday March 22th. 8-10 in U82
Preparation:
Make a list of 10-15 keywords for a 10 min. presentation with the topic: "Main Memory"
Prepare at home to discuss:
-
Explain the difference between internal and external fragmentation.
-
Consider the following process for generating binaries. A compiler is used to generate the object code for individual modules, and a linkage editor is used to combine multiple object modules into a single program binary.
-
How does the linkage editor change the binding of instructions and data to memory addresses?
-
What information needs to be passed from the compiler to the linkage editor to facilitate the memory binding tasks of the linkage editor?
-
-
Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes the most efficient use of memory?
-
Most systems allow programs to allocate more memory to its address space during execution. Data allocated in the heap segments of programs are an example of such allocated memory. What is required to support dynamic memory allocation in the following schemes:
-
contiguous-memory allocation
-
paging
-
-
Compare the main memory organization schemes of contiguous memory allocation, and paging with respect to the following issues:
-
external fragmentation
-
internal fragmentation
-
ability to share code across processes
-
-
On a system with paging, a process cannot access memory that it does not own; why? How could the operating system allow access to other memory? Why should it or should it not?
-
Assuming a 1 KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers):
-
2375
-
19366
-
30000
-
256
-
16385
-
-
Consider a logical address space of 32 pages with 1024 words per page; mapped onto a physical memory of 16 frames.
-
How many bits are required in the logical address?
-
How many bits are required in the physical address?
-
In class:
Use the first 30 minutes to work on those exercises:
-
Consider a paging system with the page table stored in memory.
-
If a memory reference takes 200 nanoseconds, how long does a paged memory reference take?
-
If we add TLBs, and 75 percent of all page-table references are found in the TLBs, what is the effective memory reference time? (Assume that finding a page-table entry in the TLBs takes zero time, if the entry is there.)
-
-
What is the purpose of paging the page tables?
-
Consider a computer system with a 32-bit logical address and 4-KB page size. The system supports up to 512 MB of physical memory. How many entries are there in each of the following?
-
A conventional single-level page table?
-
An inverted page table?
-
-
Program binaries in many systems are typically structured as follows. Code is stored starting with a small fixed virtual address such as 0. The code segment is followed by the data segment that is used for storing the program variables. When the program starts executing, the stack is allocated at the other end of the virtual address space and is allowed to grow towards lower virtual addresses. What is the significance of the above structure for the following schemes:
-
contiguous-memory allocation
-
paging
-
Then spend the remaining time discussing your list of keywords, and the excercises prepared at home and in class.
Recommended Reading
-
Chapter 9 in Operating System Concepts, Enhanced eText, 10th Edition
Material (Slides, etc.)
-
Slides for lecture 6 and as HTML