CST:334 Week 3

 What I learned during week 3:

This week, we focused on how the OS manages memory and handles process scheduling. The main topics included virtual memory, base and bounds, segmentation, fragmentation, and the MLFQ scheduling algorithm.

We began by learning about virtual memory, which allows each process to operate as if it has access to a full range of memory addresses. These virtual addresses are then translated to physical addresses using mechanisms managed by the OS. One method we studied is base and bounds, where the base register defines the starting location of a process in memory, and the bounds register sets the limit of accessible memory. This provides memory protection and simplifies allocation.

We also explored fragmentation, which occurs when memory becomes inefficiently used due to uneven allocations. This can lead to wasted space that is too small to be useful. To address this, the concept of segmentation divides a process into segments such as code, heap, and stack. Each segment has its own base and bounds, allowing the OS to manage memory more precisely.

A major part of this week was learning how to translate virtual addresses into physical addresses using segment and offset values. This helped clarify how the OS ensures processes can only access the memory assigned to them.

Finally, we studied Multi-Level Feedback Queue (MLFQ) scheduling. MLFQ allows the OS to prioritize short and interactive tasks while still handling long-running processes. Processes that use more CPU time are moved to lower priority queues, which helps balance responsiveness and fairness.

Comments

Popular Posts