Posts

Showing posts from July, 2025

CST334 Week 5

     This week I focused on concurrency and how it allows processes to run multiple threads in parallel, allowing tasks to be handled in the background while the main application continues. While I’ve previously worked with multithreading in Java, learning how the operating system manages concurrency gave me a better understanding of how multithreading works in the CPU. I learned that threads can share certain resources, such as virtual address space which makes communication between them efficient, but also introduces its own challenges.      One of the key concepts I learned was nondeterminism in multithreaded programs. Even if two threads call the same function, the order in which memory is accessed and modified can change which can lead to different outcomes every time the program runs. This unpredictability can cause bugs that are hard to reproduce and debug.      To address this, we use thread synchronization APIs like locks, or mutexes...

CST334 Week 4

     This week was all about diving deeper into how operating systems manage memory via paging, swapping, and caching.      Paging is a method the OS uses to divide memory into evenly size blocks. I learned how the system uses a Virtual Page Number (VPN) to keep track of which pages are being used, and how the offset helps determine the exact location within that page. One of the key points was how the virtual address gets translated into a physical address using a Page Table Entry (PTE), which acts like a map for locating memory.     I learned how  Translation Lookaside Buffers (TLBs) are used to improve performance during frequent memory lookups. These are special caches that store recently used memory translations, making memory access much faster when there's a 'hit'. I also learned how to calculate average memory access time by using the hit and miss rates of a TLB and factoring in the number of cycles each operation takes.    ...

CST334 Week 3

     This week I learned how memory is organized and managed within a computer system. One of the key concepts I learned about was the address space, which is divided into sections for the code, stack, and heap with each of these sections is designed for a specific purpose. the code section stores the executable instructions, the stack manages function calls and local variables, and the heap is used for dynamically allocated memory at runtime. I found it interesting to see how these areas are laid out in memory and how their addresses are manipulated so programs can run efficiently.      An important reason to structure memory this way is to virtualize it, which helps protect different parts of the program and ensures that memory is used effectively. Virtualization makes sure each process believes it has access to a continuous block of memory, even though the actual physical memory might be shared with other processes. This design both improves security and...

CST334 Week 2

    This week has been a great introduction to how CPU process selection works in operating systems. We covered a range of scheduling algorithms, including FIFO (First In, First Out), LIFO (Last In, First Out), Shortest Job First (SJF), and Round Robin (RR). I learned how each algorithm has its own strategy for picking which process should run next, and how these choices affect system performance and metrics like response times.      I also learned to calculating those performance metrics such as response time, turnaround time, average arrival time, and average turnaround time. For Round Robin scheduling in particular, I learned how to calculate how long a process will stay in the system based on the time slice and the number of other processes in the queue. These exercises helped me understand the mechanics of how schedulers work and why the design choices made are so important.      One of the most interesting parts was comparing the pros and ...

CST334 Week 1

First week of operating systems. I am very excited for this course as I really enjoy taking a look under the hood and figuring out how and why things work the way they do. This first week we learned a brief history over the development of the first operating systems, which were initially created to manage resources efficiently. Additionally, we learned about the roots of the most popular modern day operating systems and how the development of the unix family tree of OS's developed from a belief in open source freedom. After the lesson in OS history was the opportunity to be reintroduced to C. While I've worked with it before, this lecture was great for brushing up on how C differs from many higher level languages were use to using. Additionally, we went over the basics of command line/power shell and while I am use to navigating a computer using power shell I was introduced to a few flags and commands I have not used before. After which, I also brushed up on binary and hexadeci...