Posts

Showing posts from July, 2025

CST 334 - Week 3

Week 3 Summary: This week in CST 334 was a rollercoaster. We started working on PA3, which is all about building a memory allocator. Basically our own version of malloc() and free(). At first, I thought, “okay cool, pointers and structs again,” but this assignment humbled me quick. Managing memory manually, keeping track of chunks, splitting them, and then coalescing them back together sounds simple on paper but actually implementing it without causing segmentation faults or crashing everything was tough. One thing that stood out was just how fragile everything becomes when you're directly manipulating memory. A wrong pointer or forgetting to update a linked list will break the whole thing. A lot of my time was spent debugging and going through each line of my code just to figure out where things were going sideways. The split_node function specifically gave me a hard time. It took me a while to realize how important it is to keep the fwd and bwd pointers clean or everything falls ...

CST 334 - Week 2

Week 2 Summary:  This week in CST 334, we dug into how operating systems handle processes, and honestly, things are starting to make more sense now. I’ve heard the term “context switching” before, but I never really got what it meant until we broke it down. Learning the difference between voluntary and involuntary switches like when a process is just waiting for input vs. when the OS forces it to stop, helped a lot. It’s kind of wild to think about how much the OS is doing behind the scenes just to keep everything running without us even noticing.  We also got into how processes are created in C with fork(), exec(), and wait(). The fork() function really threw me off at first. I was like is the same program just running twice? But it made sense after printing out a bunch of values and looking at the return codes. It’s pretty cool how the parent and child processes end up doing different things, even though they start from the same place. Later in the week, we went over schedul...