Processes
All modern computers of the program - processes can perform simultaneously and several at once. Thus, simultaneously with the process program running by the user, the program can read from the disk and display the text on the screen monitor or printer. In the multi-tasking system processor switches between the process programs, providing each from tens to hundreds of milliseconds. At the same time, the processor is busy with only one process program at any given time, but in a second it manages to work with several program-processes, creating users the illusion of parallel work with all processes. Sometimes in this case they speak of pseudo-parallelism, in contrast to the present parallelism in multiprocessor systems containing several processors sharing common memory among themselves. Manufacturers operating systems have developed a conceptual model of sequential processes , simplifying the observation of the work of parallel processes.
Consider the content and use of this models. In the process model, all the software running on the computer is organized as a set of sequential processes, or simply processes. Processes are executable programs along with the current values of the command counters, registers, and variables. From the perspective of this abstract model, each process has its own central virtual processor. In fact, the central processor switches from process to process, but for a better understanding of the system it's easier to consider a set of processes going in parallel than to represent a processor switching from process to process. This switching is called multitasking or multiprogramming.
The operating system needs a way to create and terminate processes as needed. Usually, when you start the OS, several processes are created. Some of them provide interaction with the user and perform the specified work. The rest of the processes are background. They are not associated with specific users, but perform special functions. For example, one background process can provide print output, the other can handle requests to web pages.
Processes can be created not only when the system is booted. So, the current process can create one or several new processes, while the current process executes a system request to create a new process. The creation of new processes is especially useful when the task is most easily created as a set of related but independently interacting processes. If you need to sample a large amount of data from the network for further processing, it is convenient to create one process for retrieving data and placing it in a buffer, the other for reading and processing data from the buffer. Such a scheme will even speed up the processing of data if each process is run on a separate processor in the case of a multiprocessor system.
As a rule, the processes are completed as they perform their work. So, after the compilation of the program, the compiler executes a system request to inform the OS about the end of the work. In text editors, browsers and other programs of this type there is a button or menu item with which you can end the process.
Processes simplify the idea of the internal behavior of the system. Some processes run programs that run commands entered from keyboards user. Other processes are part of the system and handle tasks such as executing file service requests, managing the start of a disk or a magnetic drive.
