Week 2 – CST– 334 Operating Systems
Module 2 – Process Management
This week’s subject was Processes Manage. A process is a running program.
In chapter 4 of OSTEP, we learned
how the operating system creates the illusion of multiple processes running at
the same time by virtualizing the CPU using a technique called time-sharing. We
also learned about the APIs available in modern systems such as Create,
Destroy, wait, miscellaneous controls, and status. This chapter also taught us
about the different process states. A process can be in one of three states:
running, ready, or blocked. A process that has control of the CPU is considered
to be running. A process that is ready, is standing by ready to run but has not
been chosen by the OS to run yet. Lastly, a process is blocked when it has
performed a procedure that does not make it ready to run such as initiating an
I/O request to a disk.
Chapter 5 introduced us to the
fork(), exec(), and wait() system calls which deal with UNIX process creation.
Fork() is used to create a new process, the creator process is called the parent,
and the new process is called the child. Wait() allows the parent to wait for
the child to complete execution. The exec() system call allows the child to
break away from the parent and create a new program.
Chapter 6 is about limited direct execution. It is a technique used to make programs run fast by making sure to set up the hardware in a way which limits what a process can do without OS assistance. During boot time, the OS sets up trap handlers and starts an interrupt timer. This allows processes to run in restricted mode and require the OS only to perform privileged operations.
Chapter 7 was an introduction to scheduling. We learned about scheduling metrics such as turnaround time and response time. Turnaround time is the time it takes a process to complete. We calculate this by taking the time at which the process is completed and subtracting the time at which it arrived. Response time is the time it takes a process to start. We calculate this metric by taking the time the process starts and subtracting the time at which it arrived. We also learned about the different scheduling algorithms like First In First Out (FIFO), Shortest Job First (SJF), Shortest Time-to-Completion Firsts (STCF), and Round Robin.
Chapter 8 is all about the Multi-Level
Feedback Queue. This is a scheduling approach that uses different levels of
queues and uses feedback to determine the priority of a process. This process
uses 5 rules to manage processes.
Rule 1: If priority (A) > Priority (B), A runs (B doesn’t).
Rule 2: If priority(A) = Priority (B), A&B run in round-robin fashion.
Rule 3: When a job enters the system, it is placed at the highest
priority.
Rule 4: Once a job uses up its time allotment at a given level
(regardless of how many times it has given up the CPU), its priority is reduced
(i.e., it moves down one queue).
Rule 5: After some time period S, move all the jobs in the system
to the topmost queue.
Comments
Post a Comment