Operating System Concepts Learning Note 5 Operating System Management brief process management
A program that is in execution is called a process.
The process requires a certain amount of resources (including CPU time, memory, files, I/O devices) to complete the task. These resources can be assigned to a process when the process is created, or it can be assigned to a process at execution time. In addition to the various physical and logical resources that are created, processes can accept various initialization data that is transmitted.
The program itself is not a process, and the program is a passive entity. And the process is the entity of the activity. A process is a unit of system work.
A single-threaded process has a program counter that explicitly executes the next instruction until the process terminates.
At any time, at most one instruction is executed on behalf of the process. Therefore, although two processes may be associated with the same program, both processes have their own order of execution.
A multithreaded process has multiple program counters, each pointing to the next instruction to be executed by a given thread.
A process is a unit of system work. The system consists of several processes, some of which are operating system processes (executing system code), and the rest are user processes (executing user code). All of these processes can potentially be executed concurrently, such as by using CPU multiplexing on a single CPU.
The operating system is responsible for a variety of activities related to process management:
Create and delete user processes and system processes
Suspend and restart processes
Provides a process synchronization mechanism
Provide process communication mechanisms
Provides a deadlock handling mechanism
Memory management
Memory is typically the only large-capacity memory that the CPU can directly address and access.
If the CPU needs to process the data in the disk, the data must first be transferred to memory through the CPU-generated I/O calls.
Similarly, if the CPU needs to execute instructions, then these instructions must be in memory.
If a program is to be executed, it must first be transformed into an absolute address and loaded into memory. As the program executes, the process can access the in-memory program directives and data by generating an absolute address, finally, the program terminates, its memory space is freed, and the next program executes.
To improve CPU utilization and the responsiveness of the computer to users, a general-purpose machine must keep multiple programs in memory. Thus generating the need for memory management. Memory management is made up of many different scenarios.
The operating system is responsible for a variety of activities related to memory management:
Record which part of memory is being used and who is using it
Determines which processes can load memory when there is memory space
Allocate and free memory space as needed
Storage Management
Each storage medium is controlled by one device, such as a disk drive and a tape drive.
Most computers use hard disks as level two memory (secondary storage). Sometimes, however, three-level storage, such as a tape disc, is used to store infrequently used data and long-term files.
Information is usually stored in a storage system that, when used, is temporarily copied to a faster storage system-high-speed storage. Most systems have one or more caches at their storage level.
The operating system is responsible for a variety of file management related activities:
Creating and deleting files
Create and delete directories to organize files
Provides primitive language for manipulating files and directories
mapping files to level two storage
Backing up files on stable storage media
and activities related to hard Disk Management:
Free space Management
Storage space allocation
Hard disk Scheduling
Protection and safety
Protection is a mechanism for controlling process or user access to a computer system resource class.
The main task of security is to protect the system from external or internal attacks.
Protection and security requires the system to differentiate all of his users.
Operating System Concepts Learning Note 5 Operating System Management brief