[Original] Operating system related concepts

Source: Internet
Author: User

I. Processes and Threads

(1) Dispatch: The thread acts as the basic unit of dispatch and allocation, and the process as the basic unit of resources

(2) Concurrency: Not only can concurrent execution between processes, but also concurrent execution between multiple threads of the same process

(3) Owning a resource: a process is an independent unit that owns resources, and threads do not own system resources, but they can access resources that belong to the process.

(4) Overhead: When you create or revoke a process, the overhead of the system is significantly greater than the cost of creating or revoking a thread, because the system allocates and reclaims resources for it.

Second, CPU scheduling

Process execution consists of CPU execution and I/O wait cycles. The process switches between the two states

Algorithm:A. First come first served (FCFS) B. Shortest Job priority (SJF C. Priority scheduling (hunger and aging) D. maximum response ratio E. Rotation method

Third, deadlock

1. four necessary conditions for deadlock generation: (4 conditions can cause a deadlock) A. Mutex, B. Possession and wait, c. Non-preemption, D. Cyclic wait

2. If the allocation diagram is non-ring, then the system will have no process deadlock, if there is a ring, then there may be deadlock

3. Deadlock Prevention:

(1) For non-shared resources, there must be mutually exclusive conditions

(2) When a process requests a resource, it cannot be contaminated with other resources

(3) If a resource is occupied and another resource cannot be allocated immediately, then its allocated resources can be preempted

(4) All resource types are fully sorted and require each process to request resources in ascending order, and when a process requests a resource, he must release all the lower ordinal resources.

Banker algorithm.

Iv. page Replacement algorithm

1 first in, first Out method (FIFO)

2 optimal permutation algorithm (OPT)

3 Longest unused algorithm (LRU)

[Original] Operating system related concepts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.