Posts

Showing posts from April, 2024

Intro to Computer Networks Week 1

      The first week of CST311 has been very informative. I've been interested in computer networking for a while now and I already feel like I have a better understanding of network architecture. Something that I found really fascinating was the lectures about the Network Edge and Core. I liked learning about all of the various physical medias such as twisted pair, coaxial, and fiber cables as well as radio links. While I have experience using and installing twisted pair cable, I've recently been researching fiber optic cabling and how it is implemented in a network.      An additional thing that I learned this week which I have always wondered about but for some reason never researched is the internet structure. While it makes sense that the internet is made up of various connected networks, I never quite appreciated what it meant to connect all of those networks together. I've understood the existence of ISPs, which has become one of the more essential s...

Operating Systems Week 7

      This week we learned about persistence and filesystems. A specific concept I learned this week which I found particularly interesting was the architecture and functionality of a hard disk. Hard disk drives consist of disks with platters, tracks, and sectors which are attached to a spindle. The spindle rotates the disks to support seeking to a desired track on the disk. Once seeking is complete, the arm assembly containing arms and read-write heads for each disk surface can be used. Data can be written to the platter using the read-write heads to induce magnetic changes on the platter representing the data to be stored. The seeking process can then be repeated at a later time where the read-write heads can access the data which was stored. Though this form of persistent data storage isn't very fast compared to the solid state or non-volatile memory drives we have today, their use of caching and RAID allows for improvements in their performance.     ...

Operating Systems Week 6

 This week we continued discussing concurrency, including topics such as semaphores as well as some common bugs found in concurrency and how to counter them. Semaphores are objects with a counter that can be used for synchronization in applications implementing concurrency. Two important functions that can be used to manipulate the semaphore counter are "sem_wait" which decreases the counter, and "sem_post" which increases the counter. Semaphores can also be initialized with a value of one to act like a mutex. Later in our lectures we learned about some common bugs that I've unfortunately had to encounter and debug on a few occasions. Some of these bugs in include deadlock bugs, atomicity-violation bugs, and order-violation bugs. Deadlocks can occur when a thread is waiting forever on a thread that has acquired a lock, compared to atomicity violations where a thread may access and corrupt the resources needed by another thread, or order violations where threads ...

Operating Systems Week 5

 This week we delved into the topic of threading, touching on concepts such as locks, parallelism versus concurrency, criteria that makes a good lock, as well as different types of spin locks. With the introduction of threading, we are able implement greater efficiency into our programs by using multiple threads across different CPU cores in parallel. However, we are still able to run threads concurrently by switching between them. Though I have already experienced the need for locks in multithreaded programming, I would learn more about locks and how to rate their effectiveness later in our lectures. Implementing parallelism into our programs leads to multiple threads wanting to access a shared variable. To prevent threads from competing for this critical section we must implement locks, which should ensure mutual exclusion. In our class discussion and in the lecture, I explored the different types of spin locks and identified their criteria. Where a simple spin lock may waste tim...