Posts

Showing posts from March, 2025

CST 334 Week 4

This week I learned about Paging. Paging is a strategy for allocating memory of a virtual address to memory. To accomplish this a virtual page number obtained from the virtual address is used to index a page table. Entries in the page table contain page frame number, which provides information on where the page is stored in physical memory. I learned that while paging provides an efficient strategy to memory management, references to the page table are expensive. To resolve this issue a cache called the translation lookaside buffer (TLB) is used to track previous translation made by the page table. If a hit occurs, the OS does not have to perform the costly operation of accessing the page table for address translations. I also learned about the various approaches to storing translations in the TLB such as the optimal policy, least recently used, first in first out, and random. Upon each context switch, the TLB is cleared and a new page table is created for each new process. The ...

CST 334 Week 3

The first topic covered in this week's material was address spaces.  An address space is the running program's view of the system memory. It is the operating system’s responsibility to provide virtual memory to the running program, in an efficient and safe manner. This virtual memory contains code, heap memory, and stack memory. Stack memory consists of local variables and function calls and memory allocations and deallocations are done implicitly. Heap memory on the other hand must be allocated and deallocated explicitly by the programmer. The memory API provides functions such as malloc() and free() to do this. The programming assignment this week provided us an in depth look into the logic of these functions, and the potential errors that can occur if they are improperly used. To understand how virtual addresses work within the scope of limited direct execution, we also learned about address translation. This is the process of converting virtual addresses to physical...

CST 334 Week 2

  This week I learned about processes and how they switch between running states. When processes switch seamlessly between one another, it creates the illusion that the cpu is running many processes at once. I also learned about how various scheduling algorithms impact the average response time and turn around time of the operating system. Factors such as duration, and how much a process will need to do I/O will impact the performance metrics of these scheduling configurations. For example, a round robin scheduler will benefit turn response time but degrade turn around time.But I learned that today many schedulers implement a multi-level feedback queue (MLFQ). Jobs are assigned priority levels and are assigned to a queue based on this designation. Jobs are initially given the highest priority, but their priority will decrease if it uses the time it is allotted. It will maintain its priority if it relinquishes control of the CPU (like when performing an I/O operation). I also learne...

CST 334 Week 1

This week I spent much of my time learning about the C programming language. I found that C and Java share similar syntax for control statements (for loops and while loops). Other than that, one of the big differences with C is pointers. C is pass by value so functions work on copies of data unless given a pointer to the data. The programming assignment this week exposed me to problems dealing with pointers and also arrays in C.  The reading material this week introduced me to operating systems and what they do. Operating systems manage a computer’s hardware resources and abstract complex processes for user programs. This ensures that programs use the operating system’s libraries to accomplish tasks without directly accessing hardware. Additionally, this week's material also retaught me how to convert numeric values between different bases.