CST 334 - Module 3

 Week 3

There was a lot of things to learn this week. A large portion being about memory virtualization, how memory is managed (allocated/deallocated), and the algorithms used to allocate memory. To keep this short, I will talk about a few of the things I learned. When a user process wants to run, the CPU generates a logical address (virtual address). Here, the logical address gets mapped to distinct regions of physical memory, which prevents each program from reading/writing each other's data. The address space contains the instructions, the heap to dynamically allocate memory, and a stack to return address/values and contains local variables and arguments. To allocate the memory, there are three common allocation algorithms that are mentioned in the readings. First fit finds the first chunk of free space that the program will fit in, which is fast but leaves smaller chunks of free space if the chosen chunk is bigger than the program. Best fit, which finds a free chunk that best fits a program, but ironically isn't good because it leaves a lot of smaller and useless free chunks (fragmentation). Then there is worst fit which finds the biggest free chunk that a program can fit in, leaving the largest chunk of free space it can, which is useful for other processes to fit in instead of wasted space. 

Comments

Popular posts from this blog

CST 300 - Module 4

CST 300 - Module 2

CST 300 - Module 3