Соглашение | Публикация статей

Салон штор - салон.бел
Шторы - calon.by

The processes in the operating system UNIX
Категория: English version

At the last lecture, we began to talk about the processes in the operating system UNIX. We can clearly say that the processes and mechanisms for managing operating system - it is one of the principal features of the operating system UNIX, or those characteristics that distinguish a system to create and distinguish it until now. Moreover, despite the efforts of Mr. Gates, the situation is that he repeats the program interfaces that are used for interaction management processes, rather than the company developers UNIX-s repeat those interfaces, which appeared in Windows. Championship of the operating system UNIX obvious.
We talked about that process in UNIX-e - this is something that is registered in the process table. Accordingly, each record in the process table has room. Rooms go from zero to a certain limit, which is predetermined by installing the system. The number in the process table - it is called, the process ID, which is named in the PID. Accordingly, the vast majority of what you can do with the process being implemented with the assistance of guidance ID process. Each process is the context of the process. This block of data describing the state of the process, including in this block of data indicates information about open files on the rules of handling of events occurring in the process. This data set is stored information that is formed with the full «upryatyvanii» process when switching system with a process in the process. That is, when for one reason or another switch to perform the same process to another, in order to restore the work process, a set of data is placed in the context of the process. This data set embodies the contents of the register memory, some regimes, which established the program and who intervened processor (for example, the contents of the register result), returning from the point of interruption. Plus - the context contains much useful information, which we'll talk later.
We talked about that, in some ways defined the body process. The body of the process consists of two segments: a segment of text and data segment. Segment text - it is part of the data, which include code executable program. Segment data - these are the space of memory, which can contain static data. We said that in the system are able to have separate segments of text and data segments. In turn, the system allows one segment of the text link random group of segments of data. This, in particular, can be useful when both worked in several similar processes.
It is important thing concerning the organization of management processes - a mechanism fork / exec. When you access the functions fork happens creation of a new process that is a copy of the current process. Minor differences between these processes are in the process ID. There may be some differences in the context of the content.
Exec function allows the body to replace the process, ie when you access this feature, in the event of a successful execution, the body of the process of changing to the new content, which is listed as arguments to functions exec in the name of a file. We talked about that in itself function fork almost meaningless. Let's try to catch the meaning of the functions exec - can be performed in one of several tasks. The question arises: why the formation of the process fragmented into two functions fork and exec? What is it justified? In many systems, there is one feature that forming process with the specified content. The problem is that when the function fork, as has repeatedly been said, a copy of the process, including process-son inherits all the files that were opened in the father and many other rights and privileges. There are situations when not wish to see the heir has become especially his father. And there is an opportunity between the functions of fork and exec perform any action to close the files, opening new files to override anything, etc. In particular, with practical exercises, you should learn debugger system deb. What is the essence of his work?
Suppose there is a process debugger deb; starts a process that otlazhivaetsya, and transferring some information from the debugger to otlazhivaemomu process that can produce debugging. But you can only adjust the process, which has allowed itself to debug. As time there is a split fork / exec. First, I am doing a copy of its process deb ', then I trace the current permit process, and after that I run a function exec with Debug Programs. The result is a situation that in the process of formation is the program that need to fine-tune, and she, without realizing it already operates in debug mode.

Loading the operating system and primary education processes. Today we talk about booting the operating system and primary education processes. When you switch the computer system from ROM (permanent memory) runs a hardware loader. A reading of zero-block system device. Of the zero-block run bootloader UNIX. This program loader searches and launch the file named unix, which is the core operating system. In the initial moment of the nucleus occur on a system. This means that, in accordance with the parameters of the system settings, forming the table, initialized some hardware interfaces (initialize a memory manager, hours, etc.). Since then, the core of the system creates a process number 0. However, no process is degenerate process for the rest of the organization. Zero process does not have ID, it contains only the context of the process. It is believed that no process is active when running kernel and liabilities in all other cases.
By the time of zero educational process in the system has already formed a table, made necessary initialization and the system is close to ready to work. Then the nucleus of copies zero in the first trial process. However, under the first trial has already set aside the resources needed to complete the process, ie it reserved the context of the segment, and his memory is reserved for placing the body process. After that, in the first trial load the program init. In doing so, start manager processes. And the situation is this: there is only a process, really ready to do. Init process actually completing the launch of the system.
Run the system can happen in two modes. The first mode - this single user mode. In this case, the init process loads a command interpreter shell, and associate it with the console terminal, and also runs the starter batch file / etc / rc. This file contains arbitrary commands that can set the system administrator if it deems it necessary to implement them when you start the system. This may be the team, let's start the testing program file system or check the calendar and, depending on the calendar, launching a process that will archive the file system, etc. Ie in this batch file in the general case may be arbitrary commands set by the system administrator. However, if the system gets into single-mode, the console terminal supplied command interpreter shell, and it is believed that a console terminal is in line supervisor (root) with all the rights that you can give the system administrator.
The second mode - Multiplayer. If a single user mode is usually used in situations where in an emergency situation and necessary actions the system administrator or system programmers, the multi-mode - this is a full-mode, which operates in a normal situation. In multiplayer mode, the init process runs for each active terminal process getty. The list of terminals is taken from a text file, and their active or passive - it is the prerogative of the properties of a specific terminal hardware and drivers, which serves this terminal (when you include the terminal, a signal to the appropriate interface of a new device; system identification of the device under with the port attached to the terminal).
Getty process when you start immediately asks for login. A copy of the getty works for one session with the user, ie the user to confirm his name and password, performs any action, and when he performs a command completion of a copy of the getty completes its work. After the conclusion of the process getty, associated with a particular terminal, gets a new copy of the getty.
Here is such a scheme. This innovative methods of formation processes in UNIX-e. Non-traditional forms of zero process (and he is in itself non-traditional), an emerging non-traditional first trial (which is also non-traditional). All other processes are working on a fork / exec.

An effective and credible process ID. Every process involves three ID process. The first - the identifier of the process, which was received in the formation. Second - this is called effective identifier (EI). PT - is the identifier associated with the user running the process. Real ID (RI) - this is the identifier associated with running in a process file (if I run your file, the EI and RI will be the same if I run someone else's file and the file is s-bit, then RI ID will be the owner of the file, and this means that running processes will be delegated to the right of the holder).

The planning processes in OS UNIX. Planning is based on the notion of priority. The higher the numerical value of priority, the lower priority. Priority - this option, which is available in the process, and the value of this parameter is the selection process for the next continuation of the work or the selection process for his suspension. In calculating the priority has two components - P_NICE and P_CPU. P_NICE - this custom component priority. It is inherited from parents and may be changed at will by the process. It can only evolve upwards values (up to some limit). Ie the user can reduce the priority of their processes. P_CPU - is systemic component. She formed a system to read: timer through predetermined periods P_CPU increased by one for the process of working with processor (when the process otkachivaetsya on DDT, the P_CPU obnulyaetsya).
The processor is allocated to the process, which is the lowest priority. The simplified formula for calculating the priority is:
Constant P_USER different processes for operating systems and other custom processes. For processes operating system, it is zero, for the processes of users, it is some value (ie «girki hinged on its feet» processes user that they would not «zadavlivali» system processes). This allows a priori to raise the priority system processes.

Planning swap scheme. We talked about that in a certain way is allocated space for the swap area. There is a problem. There is a space of memory, which processes are being processed by the system in multiprogramming. There are areas in the OVC for pumping these processes. In OS UNIX (in model form) svopirovanie implemented the entire process, ie otkachivaetsya not part of the process, and all. This is true in the vast majority of UNIX-s, ie swap in UNIX-e generally not effective. A simplified scheme of planning swap based on a priority and called P_TIME also in the context of the process. This setting is accumulated, the host process in multiprogrammnoy processing, or for the swap.
If you move the process of memory in the area swap or return the system obnulyaet value of the P_TIME. To download process in memory from the swap process is chosen with a maximum value P_TIME. If this process does not download the free space of RAM, the system searches for processes in the memory process, awaiting input / output and has a maximum value P_TIME (ie, the one that was in RAM longest). If this process does not, then simply select the process with a maximum value of P_TIME.
This scheme is not very effective. The first inefficiency - is that the exchanges of RAM in the region occur swap the entire process. The second inefficiency (associated with the first) is that if the process is closed because of an order for the exchange, the exchange really does not happen with svopirovannym process, ie in order to exchange normally completed, the whole process should be returned to RAM. This is also bad because if the swap took place blocks of memory, it could be pumping process without the page, which must be changed, and after an exchange of dokachat from the swap the entire process back into RAM. Modern UNIX-s have the opportunity svopirovaniya not the whole process, as a part of it.

Статьи по теме:

"Trojan horse"
Basics With Virtualdub
Macromedia Dreamweaver against Microsoft placed on the first lane
Spyware battle; Use of firewall protection
The Office of visualization
Classification LAN (LCS)
The most demanded software!
Type Danyh in C + + I Unlike Java
Technology Platform 1C: Enterprise 8 - Areas Development
Hackers, as the subjects of computer crime
How to Choose a Printer?
Integration modules PADS in the enterprise software environment
The reverse side of the coin Spyware
Windows 7 - Window to the Future
Automation planning printing by Apple (Mac)
Windows Media Player
Soa-platform Ijanet Free
Erg-exercises to prevent PVPN
Backing up the blog on Blogspot. Blogger Backup utility
Components, Modules, mamboty in CMS Joomla
Areas which use computer systems based on CompactPCI
The possibility of CompactPCI have more than 8 slots
Mistakes Windows registry repair
Concentrators Fast Ethernet NetGear
Print Manager
The physical medium for LANs
Mikrokontrolleryne System
Linux: Gentoo Vs Ubuntu Functionality
Legal and technical documents
Hide your important documents, a computer in seconds
ATM technology
Linux set in motion devices: Now in the market
The development control information tools for PADS
Black Banner - or the threat of new technologies?
Technical approaches to increase the security of the computer
Tips software and programs connected branch
Graycatsoft - Server Software
Monitoring computer facts
What is the standard CompactPCI?
The company Janet Systems Provedet Roundtable «The future of Soa-Projects»
Developing databases, Inside View
Linear Magnetic Recording Dlt (Dlt-V/Sdlt/Dlt-S4)
What your child is doing online?
The story of software Escrow
Office automation
The world software
Best Antivirus
Hackers can control a PC without the knowledge of their owners
Optimal cache lifetime for Joomla CMS
Classification of computers
Mobile Trade Optimum - Office Business Representatives
Data protection. Luxury or means of survival?
The structure design and generation of computers