Process Management, memory management, and storage management

Source: Internet
Author: User

Process Management, memory management, and storage management
Process Management

A process requires resources (including CPU time, memory, files, and I/O devices) to complete its tasks. These resources can be allocated to the process when the process is created, or to the process when the process is executed. In addition to obtaining various physical and logical resources during creation, the process can also accept various transmitted initialization data (inputs ).

Note: programs are not processes in this province. Programs are passive entities, while processes are active entities.

Definition of processes and threads:

Relationship between processes and threads:

Differences between processes and threads:

A process has an independent address space. After a process crashes, it will not affect other processes in protection mode, but the thread is only a different execution path in the process. The thread has its own stack and local variables, but the thread does not have a separate address space. The death of a thread equals to the death of the entire process. Therefore, multi-process programs are more robust than multi-threaded programs, however, during process switching, resources are consumed and the efficiency is lower. But for some concurrent operations that require simultaneous and shared variables, you can only use threads, not processes.

Advantages and disadvantages of processes and threads:

The thread execution overhead is small, but it is not conducive to resource management and protection, while the process is opposite. At the same time, threads are suitable for running on Dual-CPU Systems, while processes can run across machines.

The operating system is responsible for the following memory management activities:

File System Management:Is the most common component of the operating system. Tapes, disks, and discs are common storage media. Each type of media needs to be controlled by one device, such as disk drives and tape drives. Its attributes include access speed, capacity, data transmission efficiency, and access methods (sequential or random)

A file is a collection of related information defined by its creator. Generally, files represent programs (source programs and target programs) and data. Data Files can contain numeric, character, character, or binary values. The file can have no format or a strict format.

The operating system manages large-capacity storage to implement the abstract concept of files. Files are usually composed of directories for ease of use. Finally, when multiple users can access a file, they need to control who can access the file and how to access the file.

The operating system is responsible for the following file management activities:

Large-capacity Storage Management:Because the memory is too small to accommodate all data and programs, coupled with power loss, all data will be lost, the computer system must provide secondary storage to back up the memory. Most modern computer systems use hard disks as the primary online storage medium to store programs and data.

The operating system is responsible for the following hard disk management activities:

Cache:Information is usually stored in a storage system (such as memory ). When it is used, it will be temporarily copied to a faster storage system-high-speed cache. When you need specific information, first check whether it is in the cache. If yes, you can directly use the information in the cache; otherwise, use the information in the memory and copy it to the cache for future use.

I/O system:One of the purposes of the operating system is to hide the characteristics of specific hardware devices. For example, in UNIX systems, the I/O subsystem hides the characteristics of the I/O device from the operating system itself. The I/O subsystem consists of the following parts:

A memory management section that includes cache, high-speed cache, and counterfeit hosts.

Generic Device Driver Interface

The driver of a specific hardware device.

Related Article

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.