CST334 - Week 1
This Week's Reflection
In this class, we discussed about the basics of operating systems - how they work, why they exist, and what they do differently depending on the task at hand. We discuss memory, hardware and software integrations, user mode vs. kernel mode, and what an operating system abstracts to the user.
The main operation that the OS handles is abstracting multiple processes at once to do work for the user. The OS performs this by virtualizing the CPU via time sharing. The rules that govern how the OS handles time sharing are called policies.
I had trouble remembering what the * and & operators do in C. I get confused where they are used and what differentiates them from each other, like a struct* var, a struct var, and struct *var. Using * before a variable (like *var) is a dereference. When initializing a pointer, use struct *var. This creates a variable of type struct *. The & operator refers to an address of a variable, rather than the data it points to (like &var gives the address of a struct var). I am still confused when to use them effectively.
It was easiest for me to write about converting binary to hexadecimal - that I was surprised that I remembered from my previous class about Linux and assembly.
The biggest connections were from the previous class, which was about database systems. Operating systems borrow some ideas from databases, namely journaling (aka write-ahead logging). This ensures that if a crash occurs while writing to disk, a saved note of the write is retained and makes retrying the write much faster than if the note did not exist. This is similar to ACID practices (durability specifically) in database management systems.
Comments
Post a Comment