Posts

Computer Science BS Journal (CST334) : Week 8

 This was the final week for CST334. I just finished my final exam a little while ago and I can't tell you how happy I was that the time we were given to finish the final was two hours rather than one. My midterm suffered because I could not finish my exam in time, I had to "YOLO" a few questions for partial credit and ended up misreading two questions and putting answers not even related to those questions haha.  CST334 has been an amazing class. My biggest takeaways from CST334 had to of been Address Spaces, Files and Directories, and File Systems(Access and Data). These were honestly some of the things that were easier for me to understand so I feel like I learned the most from these topics. I think the biggest challenge for me in this class was learning to convert hex to decimal and vice versa. I know that seems ridiculous but only at the very end of the class did I get the hang of it and realize how simple it was. Another challenge for me was trying to remember all o...

Computer Science BS Journal (CST334) : Week 7

  This week in CST334 our lectures covered: IO Devices, Hard Drives, Files and Directories, File Systems(Data), and File Systems(Access). In this learning journal I'll write and explanation/what I think to be the most important bits of each subject.  1. I/O Devices I/O (Input/Output) devices are hardware that allow a computer to communicate with the outside world — keyboards, displays, printers, network cards, sensors, etc. They operate via controllers that communicate with the CPU and memory. Key Takeaways: Two main types: block devices (e.g., disks) and character devices (e.g., keyboards). Managed through device drivers . Performance depends on throughput (data per second) and latency (time per operation). Communication methods: polling , interrupts , DMA (Direct Memory Access). 2. Hard Drives Hard Disk Drives (HDDs) store data magnetically on spinning platters. Data is read/written by a moving read/write head. Key Takeaways: Performance factors...

Computer Science BS Journal (CST334) : Week 6

 This week in CST334 our lectures covered: Bounded Buffer Coding, Semaphores, Synchronization Barriers. In this learning journal I'll write and explanation/what I think to be the most important bits of each subject.  Bounded Buffer Coding (Producer-Consumer Problem) A bounded buffer is a fixed-size storage used in the classic Producer-Consumer problem. Producers add items to the buffer, and consumers remove them. Coordination is required to avoid overfilling or emptying the buffer. Key Takeaways: Solves coordination between multiple producers and consumers. Needs synchronization to prevent buffer overflows (producer) and underflows (consumer). Typically implemented using mutexes (for mutual exclusion) and semaphores (to count available slots/items). Ensures safe access to shared resources in concurrent environments. Semaphores A semaphore is a synchronization primitive used to control access to a shared resource. It uses a counter and two atomic operatio...

Computer Science BS Journal (CST334) : Week 5

    This week in CST334 our lectures covered: Concurrency and Threads, Threads API, Locks, and Lock-based data structure. In this learning journal I'll write and explanation/what I think to be the most important bits of each subject. We also had our midterm this week and I didn't do as good as I wanted to, I definitely need to focus some more on my studies. Concurrency and Threads Concurrency is the ability of a system to handle multiple tasks at the same time. Threads are the smallest units of execution within a process. Concurrency allows threads to run independently, improving efficiency, especially on multi-core processors. Key Takeaways: Concurrency enables better CPU utilization. Threads share the same memory space within a process. Context switching allows threads to appear to run in parallel. Can lead to race conditions if not properly synchronized. Threads API Threads APIs provide the functions and mechanisms to create, manage, and synchronize threads....

Computer Science BS Journal (CST334) : Week 4

   This week in CST334 our lectures covered: Paging, Translation Lookaside Buffers, Multi-Level Paging, and Swapping. In this learning journal I'll write and explanation/what I think to be the most important bits of each subject. Paging Paging is a memory management scheme that eliminates the need for contiguous memory allocation. It divides physical memory into fixed-size blocks called frames and logical memory (processes) into blocks of the same size called pages . Key Takeaways : Avoids external fragmentation. Simplifies memory allocation. Requires a page table to map virtual pages to physical frames. Introduces a level of indirection, so address translation is needed. Translation Lookaside Buffers (TLBs) A TLB is a small, fast, cache used to store recent translations of virtual addresses to physical addresses. Since page table lookups can be slow, the TLB helps speed up the translation process. Key Takeaways : TLB reduces memory access time by caching...

Computer Science BS Journal (CST334) : Week 3

  This week in CST334 our lectures covered: Address Spaces, C Memory API, Address Translation & Base-and-bounds, Segmentation, Free Space Management. We also started working on our first group project this week. In this learning journal I'll write and explanation/what I think to be the most important bits of each subject. 1. Address Spaces An address space is the range of memory addresses that a process can use. Each process has its own virtual address space, isolated from others, managed by the operating system. Key Takeaways: Provides process isolation . Helps with security and stability . Enables virtual memory and memory protection. 2. C Memory API The C memory API includes functions for dynamic memory allocation and deallocation: malloc() , calloc() , realloc() , and free() . Key Takeaways: malloc(size) allocates a block of memory. calloc(n, size) allocates and zero-initializes memory. realloc(ptr, new_size) resizes previously allocated memory. ...

Computer Science BS Journal (CST334) : Week 2

    This week in CST334 our lectures covered: Processes, C Process API, Limited Direct Execution, CPU Scheduling, and MLFQ. In this learning journal I'll write and explanation/what I think to be the most important bits of each subject. Processes A process is a running instance of a program. It includes: Code (instructions) Data (variables, heap) Execution context (registers, stack, program counter) Operating systems manage processes to provide isolation, resource control, and scheduling. C Process API The C Process API refers to system calls and library functions in C for process management. Key functions include: fork() – Creates a new process by duplicating the current one. exec() – Replaces the current process image with a new one. wait() – Waits for a child process to finish. exit() – Terminates the current process. Limited Direct Execution (LDE) Limited Direct Execution is a technique where the OS allows a user program to run directly ...