Operating System - Notes - Chapter 2 - Process

Table of contents

2. Chapter 2 - [Process]

1. The concept of process

(1) PID & PCD process control block

(2) Program segment & data segment

(3) Features (features) property

(4) Summary

2. The state of the process

(1) Process - five-state model

(2) Basic state

(3) Process organization method - link method (linked list)

(4) Process organization method - index method

(5) Summary (green part - high-frequency test sites)

3. State transition (in one go)

(1) Atomicity of operations (primitives) - computer composition principles also have

4. Process communication

(1) Shared storage

(2) Message passing

(3) Pipeline communication

(4) Summary

(5) Resource preemption issues (mutual exclusion, deadlock, starvation, shared area)


2. Chapter 2 - [Process]

The Chrome browser generally uses a multi-process architecture. Whenever you open a new tab or window in Chrome and load a webpage, it creates a new separate process to handle that webpage.

This multi-process architecture design has several advantages:

  1. Security: Each webpage runs in a separate process, which can isolate codes between different webpages and prevent malicious webpages from attacking or interfering with the system.
  2. Stability: If one webpage crashes or has a problem, other webpages and browsers will still work without crashing the entire browser.
  3. Performance: By assigning tasks such as webpage rendering and script execution to different processes, multiple tasks can be performed at the same time, improving the response speed and efficiency of the browser.

However, it is important to note that not every tab creates a new process. Some related pages, such as multiple tabs on the same site, may run in the same process to save system resources.

In short, Chrome 's multi-process design can provide better security, stability and performance, but it will also consume more system resources.

1. The concept of process

PCB & program segment & data segment

(1) PID & PCD process control block

Process ID - PID  - process identifier

PCD - Process Control Block

UID —— user ID

(2) Program segment & data segment

Program segment - binary instruction sequence (you open multiple QQs, they all run the same program segment~)

Data segment - the data generated and obtained when the process is running (each QQ has its own data segment~)

(3) Features (features) property

Static & dynamic

Concurrency & Independence

Structural ( constitutive property )

(4) Summary

2. The state of the process

The picture of the soft test:

(1) Process - five-state model

1. Create

2. Ready - (still)

3. Run

4. Blocking - (waiting)

5. Termination state - (end)

A picture of Peking University:

(2) Basic state

(3) Process organization method - link method (linked list)

Most operating systems - use a chained approach

Note: Matryoshka can be used here, and multiple linked lists can be created (specific situations, specific analysis!) 

(4) Process organization method - index method

(5) Summary (green part - high-frequency test sites)

3. State transition (in one go)

(1) Atomicity of operations (primitives) - computer composition principles also have

 

External intervention - artificial stop (for example, we use [task manager] to actively kill a process)

4. Process communication

(1) Shared storage

Data Structures - Slow

storage area - fast

(2) Message passing

direct communication

indirect communication

(3) Pipeline communication

Pipeline - the process of writing and reading - specific situation, specific analysis (there can be more than one)

but! ! ! For the exam, use the answers from the Higher Education Society

Multiple writes, one read (this is about the reader & writer problem)

(4) Summary

(5) Resource preemption issues (mutual exclusion, deadlock, starvation, shared area)


Today is the middle of August!

time flies!

Remember to review every day! Study for knowledge! Arm yourself with knowledge. This knowledge is for better learning in the field you are interested in in the future. You must guard against arrogance and impetuosity, step by step, and endure loneliness. You can definitely do it! come on!

Time: August 15, 2023 13:02:46 

Guess you like

Origin blog.csdn.net/Pan_peter/article/details/132296308