Home >Common Problem >Is Unix Linux?
Is Unix Linux?
Unix is not Linux. Unix is an operating system that appeared in the early 1970s. In addition to being a network operating system, it can also be used as a stand-alone operating system. Linux is a free and A freely disseminated UNIX-like operating system, which is mainly inspired by Minix and Unix ideas.
Unix Function Module
The operating system must manage the hardware and software resources of the computer system so that they can be used by users. Hardware resources generally refer to CPU (central processing unit), memory (memory and external memory), external devices, etc. Software resources refer to system programs and data, that is, the operating system, system utilities and application software, as well as user programs and data, which are all stored in the memory in the form of files. The operating system consists of several functional modules that are organically linked together and work in a coordinated manner. These modules are: processor and process management module, storage management module, device management module, file system and user interface.
Processor and process management module
Since the processor (CPU) is a key resource in the computer, the execution of the process is closely related to the CPU, so the processor and process management module can be referred to as a process Management module. We call the work of determining which jobs will be transferred into the memory to run and removed from the memory after completing the operation called job scheduling. How to control the transition between the three states of a job in the running phase is called process scheduling. Therefore, how to fully utilize resources, shorten the response time, and minimize the time each user's job waits for execution is the principle for formulating corresponding job scheduling algorithms and process scheduling algorithms. It's just that in different operating systems, there are different focuses on the above goals, so the scheduling algorithms are also different.
Storage management module
Storage management is to manage the storage (including memory and external storage) used by the job from entering the ready state to the end of the run. The tasks of the storage management module can be divided into three parts: storage allocation, address mapping and storage protection.
Storage allocation
After a program is compiled and linked, it gets a file called a memory image. This file describes the memory size required by this program when running, including the addresses of code and data areas. These addresses are called logical addresses, and the first address 0 is used as the reference address. Whenever a job is loaded into the memory and enters the ready state, the storage management module will calculate based on the available memory space and the memory required by the job, and allocate the corresponding memory space to the job.
Address mapping
Loading a job into memory means that a process will be created. The storage management module will align the first address of the job's image file (which is zero) with the first address of the process in the memory. The first address or starting address of this process is the physical address in memory, called an offset. The logical address of the image file is added to the offset, and the address values in the memory are all physical addresses. Calculating the conversion of logical addresses to physical addresses is called address mapping. All logical addresses in the image can be translated into physical addresses. [2]
Memory Protection
Memory space is always shared by several processes, including the part of the operating system itself that is resident in memory. The task of memory protection is to know the divided areas in the memory space, know which processes they belong to, and know the areas that each process has access to. Whenever a process needs to access an address during execution, the storage management module checks whether the process has the right to access the physical address. Typically, the area in memory for each process is the legal address that the process can access. If the accessed address falls outside the area of the process, illegal access occurs. Once illegal access is encountered, memory protection will deny access and perform error handling.
Device Management Module
External devices include file storage media, such as disks, tapes, optical disks and other input and output devices, such as character terminals, graphic terminals, various printers, plotters, monitors, etc.; And special input and output equipment, such as data collectors, image capture devices, audio input and output equipment, etc.
The task of the device management module is to provide users with a convenient and unified interface, rationally allocate these resources according to the job's application for the device, classify the device according to its performance and function, and then use different drivers Programs drive these devices to work to improve the efficiency of the devices.
File system
The file system can also be called the information management module or the file management module, which is mainly responsible for the management of software resources. All software resources are stored in storage media in the form of files, and information is transferred in the computer in units of files. Therefore, a document is defined as a collection of related information elements. All files form a file system in the computer. Although they have the same name as a management module of the operating system, they can usually be distinguished due to the different occasions and contexts in which they appear.
user interface
User interface (user interface) is also called user interface. Users use the operating system through the user interface. A good user interface will make users feel that the operating system is friendly and convenient. User interfaces typically include job control languages, operating languages, and system calls.
Recommended tutorials: "PHP Tutorial" "Linux Operation and Maintenance"
The above is the detailed content of Is Unix Linux?. For more information, please follow other related articles on the PHP Chinese website!