Journal 25

July 9 - July 15

Wow, week 3 already. This class is really flying by. To be honest, I am finding that this is the class I have had to spend the most time working on so far in this program. While I have a background in C programming and assembly language (only from one of the required prerequisites), I still am finding that I have a LOT of information to learn to grasp some of these concepts. I nearly ripped my hair out trying to get the numbers just right on the second question of the lab quiz, and even then I only managed to get it correct once. I am feeling a bit of information overload at times, but my current method of reading the text and taking notes, followed by truly sitting down an watching the lecture videos (uninterrupted) has helped me tremendously. I take supplemental notes during the videos, but having the notes already mostly done from the reading helps me to focus on the actual content of the video lectures. 

To summarize what I learned this week, chapter 13 went over how an OS fabricates an abstraction of memory for each process (address space) in order to make it seem as though individual programs have their own individual, private memory. Address space is essentially code plus stack plus heap. Such virtual memory allows for isolation of memory between processes and makes it so that one process does not affect another's memory and vice-versa. In chapter 14, the reading delves further into heap and stack memory. Stack is managed by the compiler itself and is automatic, whereas heap requires dynamic allocation through the use of malloc() and is manual. The text goes over some common errors that may occur, such as uninitialized memory, unallocated memory, and buffer overflows. Chapter 15 explores address translation through base and bounds in order to map virtual addresses to physical ones. The base register relocates memory references and makes sure a process isn't accessing memory outside of its scope. In chapter 16, the segmentation of the address space into code, heap, and stack is discussed. Each of these segments have their own bounds, with stack growing down and heap growing up. Segmentation helps to preserve memory space by minimizing unused gaps between heap and stack, but faults may happen when trying to access memory outside of the bounds. Finally, chapter 17 delves further into malloc() and how memory managers such as this one keep track of free space and handle variable-sized memory requests. External fragmentation occurs when memory is scattered around in tiny pieces. Free lists keep track of all of the available chunks and can be embedded directly into the free space. Methods such as splitting large chunks into smaller ones and coalescing adjacent free chunks when using free() assist in free-space management.

Comments

Popular Posts