CST334 - Week 2
Weekly Reflection, Week 2
I feel a lot more confident in my understanding of C now!
From what we've covered in class:
- CPU scheduling is important to optimizing processing times. Scheduling makes use of two metrics: turnaround time and response time. Turnaround time is how long it takes for a process to complete from when it first entered the schedule. Response time is how long it takes for a process to begin its first run from when it first entered the schedule.
- The main schedule patterns we've seen are First In, First Out (FIFO and its related schedule Last in First Out or LIFO), Shortest Job First (SJF), Shortest Time-to-Completion First (STCF), and Round Robin (RR).
- FIFO chooses the first process entered and completes it, then to the second-most process entered, etc.
- LIFO chooses the last entered process (the tail end) and completes it, then to the second-last process entered, etc.
- SJF prioritizes jobs with the shortest duration and completes them first.
- STCF prioritizes jobs with the shortest time to completion, and will preempt any ongoing processes to start a priority job.
- RR makes use of time-slicing to allocate work between jobs. Each job is given an amount of CPU time dictated by how long a time slice is, and runs until this time runs out. Then, the next job is given CPU time, etc. All time slices are the same length, and are always a common multiple of all jobs in the schedule.
- Context switching is swapping which process is currently being worked on by the CPU. This is relevant to round robin scheduling, which makes the most out of context switching.
- Address spaces are an abstraction of physical memory. The program code is entered first, then the heap (grows downward), free memory, then the stack is at the bottom of the address space (the stack grows upward).
Comments
Post a Comment