Journal 24

 July 2 - July 8

This week of CST334 has been very informative and educational. The readings covered many topics that I was previously unaware of, and, I must admit, I felt a bit of information overload when doing notes for the lectures. Aside from the sheer amount of new information, I actually found genuine interest in the topics, and was intrigued throughout the reading.

In the Abstraction Process reading, it is revealed that the OS abstracts the CPU to create the illusion that many processes are running concurrently, even if the system itself contains only a few CPUs. Each process is a running program with delegated address space, stack, heap, registers, and program counter. The OS utilizes context switching to save a process's state (running, ready, and blocked) and begins loading another in order to enable multitasking. The multi-level feedback queue gives priority to jobs based on observed behavior (such an CPU-bound or interactive) and multiple queues exist with varying priority levels. Jobs begin at the highest priority, and if it utilizes its entire time slice, it will move down in the priority ladder, and should the job finish early, the priority will be upheld. Such organization helps prioritize interactive jobs whilst also giving CPU-bound jobs a chance through priority boosting. Multi-level feedback queues protect against starvation by yielding just prior to time slices ending. The OS must efficiently allow programs to run directly on the CPU whilst also retaining control and security. Direct execution of programs allow them to run natively for performance reasons, but the OS must maintain control through user/ kernel modes and system calls triggered by trap instructions to request privileged operations such as memory access. The OS creates a trap table upon boot, and defines how to handle system calls and expectations. The return-from-trap relinquishes control from kernel mode back to the user, and context switching and timed interrupts allow for the OS to regain CPU control. In the Scheduling Intro reading, key metrics such as turnaround and response time, basic policies such as first-in-first-out and shortest job first, and preemptive policies such as shortest time to completion first allow for higher responsiveness of systems. UNIX systems create and manage processes through system calls such as fork(), exec(), and wait(). Fork() creates a copy of the current processes, and a parent and child return from fork() gets child's PID and 0 respectively. Exex() replaces the current process image with a new program. Wait() sees parents waiting for child to finish.

Comments

Popular Posts