CST334 Week 3 Journal Entry

This week in CST 334 was more new information to me. We learned about memory management systems and all about memory allocation. All of which is confusing to me. Segmentation divides address space into code stack and heap. Stack memory is automatically compiled by the compiler for local variables and function calls and heap memory needs the programmer to manage it. malloc() and free() are methods in heap memory. malloc() allocates memory on the heap and returns a pointer to the block, while free() deallocates memory. Being careful with our heap memory is vital to programs running properly. We learned about different ways memory is stored, best fit, first fit, next fit. Each of which has its pros and cons like most methods. We also read about Linux utilities like awk, sed, grep, and regex. We also learned about address translation and how virtual addresses are given a physical address in hardware. We also reviewed again processes which is a program that has been copied into memory to the kernel to run or to wait to be run. A process fork()’s itself and copies itself into a new process called a child. It is a duplicate but has a different PID. Registers, cache, main memory, electronic disk, and memory disk, optical disks, and magnetic tapes is the order of memory hierarchy. 


All in all we learned a lot about memory management systems this week and in PA3 created our own program that allocates memory. PA3 was quite challenging to me and I still have questions to ask as I do not like not being able to finish my code.


Comments

Popular posts from this blog

Week 2 Journal Post

CST 334 Week 7

Week 1: About CSUMB and Online Learning Strategies