CST334.2 Module Two

CST334.2 Module One

What I learned this week:
This week we dealt with some key components of the virtualization of a CPU, as it needs both low-level machinery(methods/protocols associated with processes) and high-level intelligence (integrated with policies associated with the scheduling of processes) in order to run efficiently. A process contains an: id, parent id and have several methods like: fork(), wait(), exec(), and exit() which all aid in determining their current state, which could be: either running, ready or blocked. The state of a process is up to the OS, as there are certain restrictions that are bound to each process. for example, an I/O request requires a switch aka trap which switches from user mode to kernel mode, as we don't want the user direct access to hardware control. Other forms of control by the OS include timer interrupts and context switching where the state is saved, while the OS resumes execution of another process.

When thinking about the policies associated with scheduling, we first had to make some general assumptions as to the workload that would be undergone, as the more you know about it's workload, the more fine-tuned a policy can be. Another component to building our policies, we also learned about different scheduling metrics, such as turnaround time; how long a process takes to complete starting at it's arrival time to the scheduler, and also response time; how long a process takes to be scheduled starting at arrival time. Both metrics, do not get along, as most policies that look to decrease turnaround time, end up compromising response time and vice versa. With that being said, formulating policies depends on your goal as system engineer, say if you wanted to decrease response time as the workload requires a lot of I/O requests, Round Robin might be a logical approach to your policy decision. Or your system relies heavily on computation, where you want to decrease turnaround time, where algos like SJF and STCF shine.

We also learned about the Multi-Level Feedback Queue, as with a workload where you want to optimize turnaround time and decrease response time is essential. The MLFQ uses a combination of the algorithms described prior in order to generate a more balanced and fair policy.

Comments

Popular Posts