CMU 15213
Premise
After enrolling to CMU's Masters Program, I have decided to take 15213 - Introduction to Computer Systems before my semester starts remotely. Coincidentally, I have taken an equivalent course in my undergraduate course at UCL, with the same textbook and slides. However, now that I have some real world exposure to software engineering, I understand much more the importance of the inner workings of a computer system.
The Famous Malloc Lab
According to online sources, 15213's malloc lab is famous for its difficulty and depth. THe biggest challenge is to minimize fragmentation (wasted memory) and minimize runtime, which is the ubiquitous tradeoff in everyday programming task. I actually did not find this assignment to be too difficult as everything is straightforward once the algorithm and the data structure are figured out. It will probably remain as one of my favorite coursework, though!
The Other Labs
The other programming labs - Cache Lab, Shell Lab, and Proxy Lab - are fun, but not as rewarding. These labs really force students to understand how our day-to-day tools work on a low level. Who would have thought our beloved Express Restful tools look like a bunch of listeners! Shell Lab introduces how signals and child processes work, in a hard way!
Optimisation
Knowing how the compilers work deep down, I am more aware of how to write optimized code to reduce runtime. A very simple example would be iterating the characteres of a string. If we call the strlen function in the loop conditional check, it actually runs in O(2^n) because the compiler cannot determine if there is any changes made to the string. Another example would be the assembly code of switch (jump table), and knowing when to use switch and when to use if-else.