Operating system book report

Hyungsuk Choi
4 min readNov 21, 2020

This article is my book report about operating system. There is no special knowledge in this article. This is written to organize the contents of the book for myself.

Operating system

What is the operating system?

It is the software that provide a convenient interface environment for users and efficiently manages resources in computer systems.

Composition of operating system.

  1. Interface: delivers commands to the kernel and returns execution results to users and applications.
  2. System call: is an interface created by the kernel to protect itself. To exploit resources, you must use system calls.
  3. Kernel: is a collection of core functions such as process management, memory management and storage management.
  4. Driver: is Kernel-Hardware interface.

What is Interrupt?

It is a way to efficiently manage various I/O work. It is a signal sent by the I/O manager to the CPU after completing the I/O command. The process is as follows.

  1. CPU sends I/O command to I/O manager.
  2. The I/O manager places the ordered data into memory or move the data in memory to the storage device.
  3. When the data transfer is complete, the I/O manager sends a complete signal to the CPU.

Process

The process by which a program becomes a process in time sharing system.

  1. Bring the program to the suitable location in memory.
  2. Make PCB(Process Control Block).

Becoming a process means to get PCB. And the termination of the process means that the control block is discarded.

Life cycle of process

  1. Create status: The process is created and allocated PCB.
  2. Ready status: The process is awaiting its turn.
  3. Running status: The process get a time slice and is running.
  4. Blocking status: The process is wait for I/O to be completed.
  5. Terminate status: The process terminated.
  6. Suspend status: The process is briefly thrown out of memory.

Thread

is a unit of execution that make an action request to the CPU according to the procedure defined in the process code.

  • Multi thread: Reducing the burden of work by dividing work in a process into multiple threads.
  • Multi tasking: Dividing time into smaller pieces when the operating system gives work to the CPU.
  • Multi processing: Using multiple CPU to process multiple threads.

CPU scheduling

Adjusting all state changes after the process is created and until it is terminated. The high priority task should be executed first, but the low priority task should not be deferred indefinitely.

Algorithms of CPU scheduling

  • FCFS: First Come First Served
  • SJF: Shortest Job First
  • HRN: Highest Response Ratio Next. Resolved the die of starvation but fairness is violated.
  • RR: Round Robin. Preemptive approach to go to the back of the queue and wait for its turn if a process fails to complete the task while working for allotted time.
  • SRT: Shortest Remaining Time.
  • Multilevel queue: Non-emptive approach with multiple queues based on priority. Round Robin is applied to each queues.
  • Multilevel feedback queue: After running a task, downgrade priority of the task. With this feedback, resolve the starvation problem of low-priority tasks in Multilevel queue.

Critical section

The critical section is the section of the program whose execution result varies according to the order of accessing shared resources. Such as, the part to save the deposit after confirming the deposit and making the deposit. To resolve this problem, the follow three conditions should be satisfied.

  1. mutual exclusion
  2. bounded waiting
  3. progress flexibility

Dead lock

A state in which two or more processes wait for the other process’s work to be finished and can’t process any further.

To resolve this problem, detecting and recovering is the best solution. Monitor the resource allocation graph to see if a deadlock occurs. And if a deadlock occurs, if proceeds to the recovery phase.

Memory

Virtual Memory

A technology that provides a large memory space to a process regardless of the size of physical memory. The size of virtual memory is sum of physical memory and swap space.

There are two virtual memory managing technology.

  1. Paging: Divide the memory into the same size pieces using a fixed partition.
  2. Segmentation: Divide the memory into some pieces according to the size of the process.

I/O & Storage devices

I/O Bus

Modern computers use a main bus connecting the CPU and memory, a graphic bus connecting the CPU and a graphics card, a high-speed I/O bus and a low-speed I/O bus.

Disk device management

To use disk devices, management techniques such as partitioning, formatting, and defragmentation are required. Partitioning is dividing disk logically. Formatting is clearing the surface of disk. Defragmentation is collecting the empty space.

File system

It is a system that manages the entire storage device by having a file manager to store and manage files. In the file system, the file manager saves or reads the contents of a file according to the user’s request.

Discrete disk file allocation method

This is a method in which data is distributed and stored in empty blocks, and information about this is managed by the file system. Use linked lists or indexes.

--

--

Hyungsuk Choi

Hello. I am a programmer and familiar with Web FE and Node.js.