Tuesday, March 25, 2025

CST334 - Week 3

I learned several important concepts in memory management and address translation this week. I explored the idea of address space, which is how the operating system manages memory for each process. Each process gets its own isolated memory area, preventing one process from interfering with another. This abstraction allows the operating system to allocate memory more efficiently, helping programs run smoothly by ensuring each one has its own dedicated memory.

I also studied the C Memory API, which includes functions like malloc, free, and realloc. These functions allow programs to dynamically allocate and manage memory during runtime, especially on the heap. The ability to allocate, use, and release memory as needed is crucial for efficient memory management in programs. Through the programming assignment, I learned about memory allocation and management at a low level, focusing on how memory is divided into chunks and how memory is allocated, freed, and coalesced. I understood how to find the first available chunk of memory in the pool, how to split chunks to fit smaller allocations, and how to combine adjacent free chunks into a larger one. This ties into how memory is managed in C using functions like malloc and free. It was quite a challenging assignment but I enjoyed it.
 
I also went through address translation, which involves converting logical addresses, used by a program, into physical addresses in memory. This translation is done by the operating system through mechanisms like segmentation, ensuring that the program's address space maps correctly to the physical memory available on the system.

Tuesday, March 18, 2025

CST334 - Week 2

I learned about processes and how the operating system manages them. A process is a running program, and each process has its own memory, registers, and unique process ID (PID). The operating system creates processes using system calls like fork(), which makes a copy of a running process, and exec(), which replaces a process with a new program. Processes go through different states such as new, ready, running, blocked, and terminated depending on what they are doing.

I also learned about process scheduling, where the operating system decides which process gets to use the CPU. Scheduling can be preemptive, where a process can be interrupted, or non-preemptive, where a process runs until it finishes or waits for an input. Different scheduling algorithms exist, like First Come, First Served (FCFS), Shortest Job First (SJF), Round Robin (RR), and Multi-Level Feedback Queue (MLFQ). MLFQ is interesting because it adjusts a process's priority based on how it behaves, making it efficient for different types of workloads. After going through these topics, I now have a better understanding of how the operating system handles multiple processes and ensures efficient CPU usage.

Tuesday, March 11, 2025

CST334 - Week 1

I learned the fundamental concepts of operating systems, including their purpose, structure, and key functionalities. An operating system acts as both an abstraction layer (shielding hardware from users) and a resource manager (optimizing and protecting system resources). It operates in two modes: Kernel Mode, which has full access to hardware, and User Mode, which restricts direct hardware access for security reasons. I also explored system calls and traps, which allow user programs to request OS services by switching from user mode to kernel mode.

I also studied different operating system models, such as the Monolithic Model (where all OS functions are in a single kernel), the Client-Server Model (which separates OS services into smaller processes), and the Microkernel Model (which keeps the kernel minimal and moves most services to user space). Also, I reviewed the Von Neumann architecture, which describes how a CPU executes instructions using buses to communicate with memory. A key challenge in this design is the Von Neumann bottleneck, where the CPU is much faster than memory access, slowing down performance. Caching is a common solution to this problem. Lastly, we covered number base conversions (binary, decimal, hexadecimal) and practiced writing simple Bash scripts and C programs, reinforcing my understanding of how system software is developed and compiled.

CST 334 - Week 8

I spent most of my time reviewing the materials to get ready for the final exam. The final covers two big topics, concurrency and persistenc...