Self-Study CS — Week 4 Study Group Homework

 ・ 3 min

photo by The Cleveland Museum of Art on Unsplash

Week 4#

After submitting this week, the next week is the Hongong Study Group vacation, so I get to rest for a week without submitting. Reading the assigned amount within the given timeframe actually helps me keep reading bit by bit, which is nice. The book length probably varies by title, but since I chose this one, I should see it through to the end!

C09#

An operating system is a special program that allocates the resources needed for running programs and helps programs execute correctly. Through communication with the operating system, we can better understand hardware and programs and find clues for problem-solving.

The kernel handles the core functions of the operating system.
Dual mode is a system where the CPU separates instruction execution into kernel mode and user mode.
A system call is a method of switching to kernel mode to receive operating system services.
Key operating system services include process management, resource access and allocation, and file system management.

C10#

A process is a program in execution. Types of processes include foreground processes and background processes.
The operating system manages multiple processes through Process Control Blocks.
Switching execution between processes is called context switching.
The process user area is broadly divided into code, data, stack, and heap regions.

Process states include new, ready, running, waiting, and terminated.
When a process creates another process, the creator is called the parent process and the created one is called the child process.
Many operating systems manage processes in a process hierarchy where processes spawn other processes.

A thread is a unit of execution flow within a process.
Running multiple processes simultaneously is called multiprocessing, and running a process with multiple threads simultaneously is called multithreading.

C11#

CPU scheduling refers to methods for distributing CPU resources fairly and rationally.
Processes have priority levels, which are specified in the PCB.
The operating system uses scheduling queues for efficient scheduling.
The ready queue is a queue for processes waiting for CPU allocation.
The waiting queue is a queue for processes waiting for I/O devices.
Preemptive scheduling can take away resources a process is currently using.
Non-preemptive scheduling cannot take away resources a process is currently using.

First Come First Served scheduling allocates the CPU in the order processes are inserted into the ready queue.
Shortest Job First scheduling allocates the CPU to the process with the shortest CPU usage time among those in the ready queue.
Round Robin scheduling takes turns allocating the CPU for a fixed time slice.
Priority scheduling allocates the CPU to the process with the highest priority.
Multilevel Feedback Queue scheduling is a multilevel queue scheduling where processes can move between queues.

Homework#

p. 304 Review Question 1 (Required)#

image

Answers:

  1. New
  2. Ready
  3. Running
  4. Terminated
  5. Waiting

Additional Homework (Optional)#

Problem: Assuming processes A, B, C, D are inserted into the ready queue in that order, determine the order in which processes receive CPU allocation using the First Come First Served scheduling algorithm from Ch.11(11-2).

Answer:

Since this scheduling method allocates the CPU to the process that requested first, the order is A, B, C, D.

A arrived first in the ready queue, so the CPU is allocated to A.
After A finishes execution, the CPU is allocated to B.
After B finishes execution, the CPU is allocated to C.
After C finishes execution, the CPU is allocated to D.


All fixed set patterns are incapable of adaptability or pliability. The truth is outside of all fixed patterns.

— Bruce Lee


Other posts
Self-Study CS — Week 3 Study Group Homework 커버 이미지
 ・ 4 min

Self-Study CS — Week 3 Study Group Homework

Cancer 커버 이미지
 ・ 16 min

Cancer

Self-Study CS — Week 2 Study Group Homework 커버 이미지
 ・ 3 min

Self-Study CS — Week 2 Study Group Homework