unix

operating system
Collection
zero Useful+1
zero
This entry is made by China Science and Technology Information Magazine Participate in editing and review Science Popularization China · Science Encyclopedia authentication.
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. Unix is widely used as a development platform and desktop operating system, mainly for engineering applications and scientific computing. [1]
Chinese name
Yunex
Foreign name
UNIX
Discipline
computer science
Type
Multi user and multi task operating system
Design principles
Simplicity first, providing mechanism rather than strategy

Development history

Announce
edit
UNIX system is a time-sharing system. The first UNIX system came out in 1970. Previously, there were only batch job oriented operating systems, which were too slow for users who needed an immediate response. In the late 1960s, Kenneth Thompson and Dennis Ritchie both participated in the interactive mode Time-sharing system Multics, and the tools used to develop the system are CTSS These two systems have had a significant impact in the development of operating systems. On this basis, in the process of refining and developing the existing technology at that time, K. Thompson developed UNIX system on a small computer in 1969, and then put it into operation in 1970. [2]
In 1972, Dennis Ritchie developed C language , used to overwrite the original assembly language The UNIX version V is generated from UNIX. In 1974, "The UNIX Time Sharing System" jointly written by Kenneth Thompson and Dennis Ritchie was published on Communication of ACM, officially disclosing the UNIX system to the outside world. [2]
At that time, PDP-11 series minicomputers had been widely used all over the world. UNIX system was widely equipped on PDP-11 series computers in American universities after development, which created material conditions for the wide application of UNIX. [2]
In 1978, UNIX Version VI was published and then used in VAX-11 minicomputer in 1979. Since then, various new versions have emerged. AT&T UNIX System II and UNIX System V were published by AT&T in 1981 and 1983 respectively. The University of California, Berkeley, has also published UNIX versions BSD4.1, BSD4.2 and BSD4.3. [2]
The number of users of UNIX system is increasing day by day, and the application scope is also expanding day by day. Whether in various types of microcomputers, minicomputers, medium and large computers, and computer workstation even to the extent that personal computer Many are already equipped with UNIX systems. Not only the newly launched models are equipped with UNIX systems, but also some manufacturers with a long history are competing to equip the original models with UNIX systems in order to open up sales and win the market. [2]
In 2020, Apple released an upgraded version of its operating system, which combines the powerful functions of UNIX operating system with the ease of use of Apple computers, improving the running speed and battery life of computers. [7]

characteristic

Announce
edit
UNIX system plays an important role in the history of computer operating system. It is true that it has continuously inherited and transformed the existing technology in a meticulous, cautious and selective manner, and has developed in the overall design concept of the operating system, which makes it so successful. The main features of UNIX system are as follows: [2]
1. UNIX system is structurally divided into core program and shell program, and they are organically combined into a whole. The core part is responsible for the functions of various modules within the system, namely processor and process management, storage management, device management and file system. The core program is characterized by careful design, concise and capable, and only needs a small space to reside in memory to ensure the efficient operation of the system. The peripheral part includes the user interface of the system, the system utility program and the application program. The user uses the computer through the peripheral program. [2]
UNIX system architecture
The UNIX kernel is the hub of the operating system. It allocates time and memory for programs, handles file storage, and responds to system calls. The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the user name and password, and then starts another program called shell. The shell is a command line interpreter. It interprets the commands entered by the user and schedules them to be executed. These commands are programs in themselves: when they terminate, the shell will give the user another prompt. [9]
2. UNIX system provides a good user interface, which is easy to use, full of functions, clear and flexible, easy to expand and modify. UNIX systems are used in two forms: one is operating commands, that is shell Language is the interface that users can interact with the system through the terminal; The other is user oriented interface, which provides services to users not only in assembly language, but also in C language. [2]
3. The file system of UNIX system is tree structure It is composed of basic file system and several removable sub file systems, which can not only expand the file storage space, but also be conducive to security and confidentiality. [2]
4. UNIX system processes files, file directories and devices in a unified way. It takes files as a character stream without any records for sequential or random access, and makes files, file directories and devices have the same syntax semantics and the same protection mechanism, which not only simplifies the system design, but also facilitates user use. [2]
5. UNIX system contains very rich language processing programs, utility programs and tool software for developing software, providing users with quite complete Software development environment [2]
6. Most programs of UNIX system are programmed in C language, and only about 5% of programs are programmed in assembly language. C language is a high-level programming language, which makes UNIX system easy to understand, modify and expand, and has very good portability. [2]
7. UNIX system also provides simple communication function between processes. [2]
Everything in UNIX is either a file or a process. A process is a program in execution, which is identified by a unique PID (process identifier); A file is a collection of data. They are created by users using text editors, running compilers, and so on. [9]

functional module

Announce
edit
The operating system should manage the hardware resources 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 (internal and external memory), external devices, etc. Software resources refer to system programs and data, namely operating system, system utilities and application software, as well as user programs and data, which are stored in the memory in the form of files. The operating system is organically linked by several functional modules and works in coordination. These modules are processor and process management module, storage management module, device management module, file system and user interface. [2]

Processor and process management module

Since the processor (CPU) is a key resource in the computer, and the execution of processes is closely related to the CPU, the processor and process management module can be referred to as the process management module for short. The work of determining which jobs will be transferred into memory for running and withdrawn from memory after running is called job scheduling. How to control the transition between three states of a job in the running phase is called process scheduling. Therefore, how to give full play to the utilization of resources, make the response time short, and make the waiting time of each user's job shortest is to formulate the corresponding Job scheduling algorithm And processes scheduling algorithm Principle of. Only in different operating systems, there are different priorities for the above goals, so the scheduling algorithm is different. [2]

Storage management module

Storage management is to manage the storage (including memory and external storage) used by the job from the time it enters 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. [2]
Storage allocation
After a program is compiled and linked, a program called memory-mapped File. This file describes the memory size required by this program at runtime, including the address of code and data area. These addresses are called Logical address , and the first address 0 is the reference address. Whenever a job is called into memory and enters the ready state, the storage management module will calculate according to the available memory space and the memory required by the job, and allocate the corresponding memory space to the job. [2]
Address mapping
Loading a job into memory means that a process Will be created. The storage management module will align the first address (zero) of the image file of the job with the first address of the process in memory. The first address or starting address of this process is the physical address in memory, which is called offset. Add the offset to the logical address of the image file, and the address values in the memory are all Physical address Calculating the transformation from logical address to physical address is called address mapping. All logical addresses in the image can be converted to physical addresses. [2]
Memory protection
Memory space is always shared by several processes, including the part of the operating system that must reside in memory. The task of memory protection is to know the divided areas in the memory space, which processes they belong to, and which areas each process has access to. Whenever a process needs to access an address during its execution, the storage management module checks whether the process has access to the physical address. Usually, the memory area of each process is the legal address that the process can access. If the access address falls outside the process area, an illegal access is generated. Once illegal access is encountered, memory protection will deny access and handle errors. [2]

Device management module

External devices include file storage media, such as disk , tape CD , hard disk, etc Input/output device , such as character terminal, graphic terminal, various printers, plotters monitor Etc; And dedicated input and output devices, such as Data acquisition instrument , image intake device, audio input and output device, etc. [2]
The task of the device management module is to provide users with a convenient and unified interface, allocate these resources reasonably according to the application of the job to the equipment, classify the equipment according to the performance and role of the equipment, and then use different drivers to drive these equipment to work, so as to improve the efficiency of the equipment. [2]

file system

File system can also be called information management module, or file management module, which is mainly responsible for the management of software resources. All software resources are stored in the storage medium in the form of files, and information is transferred in the computer in the unit of files. Therefore, a file is defined as a collection of related information elements. All files form a file system in the computer, although operating system A management module with the same name is usually distinguishable because of their different occasions and contexts. [2]

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 the friendliness and convenience of the operating system. User interface usually includes job control language, operation language and system call. [2]

UNIX standardization

Announce
edit

ISO C

In the second half of 1989, the ANSI standard X3.159-1989 of C programming language was approved. This standard has also been adopted as the international standard ISO/IEC9899:1990. ANSI is American National Standards Institute (American National Standards Institute), a member of the International Organization for Standardization (ISO) representing the United States. IEC It is the abbreviation of International Electrotechnical Commission. [3]
The ISO C standard is maintained and developed by the ISO/IEC Working Group on International Standards for C Programming Languages. The purpose of ISO C standard is to provide the portability of C programs so that they can be suitable for a large number of different operating systems, not just UNIX systems. This standard not only defines the syntax and semantics of C programming language, but also defines its standard library. [3]
In 1999, the ISO C standard was updated and approved as ISO/IEC 9899:1999, which significantly improved the support of application software for numerical processing. In addition to adding the keyword restrict to some function prototypes, this change does not affect the POSIX interface described in this book. The restrict keyword tells the compiler which pointer references can be optimized by pointing out that the object referenced by the pointer is only accessed through the pointer in the function. [3]
Since 1999, three technical corrigenda have been published to correct errors in the ISO C standard, respectively in 2001, 2004 and 2007. As with most standards, there is a delay between the approval of the standard and the modification of the software to bring it into compliance. With the continuous evolution of vendor compilation systems, support for the latest ISO C standards is increasing. [3]

IEEE POSIX

POSIX is a IEEE (Institute of Electrical and Electronics Engineers, Institute of Electrical and Electronics Engineers )Standard families formulated. POSIX means Portable operating system interface (Portable Operating System Interfacc)。 It originally referred only to IEEE standard 1003.1-1988( Operating system interface )Later, it was expanded to include many standards and draft standards marked 1003. [3]

SUS

The Single UNIX Specification (SUS) is a superset of the POSIX. 1 standard. It defines some additional interfaces that extend the functions provided by the POSIX. 1 specification. POSIX.1 is equivalent to the basic specification in the Single UNIX Specification. [3]
The X/Open System Interface (XSI) option in POSIX. 1 describes the optional interfaces, and also defines which optional parts of POSIX. 1 must be supported by an implementation that follows XSI (XSI conforming). These must support: file synchronization, thread stack address and length attributes, thread process sharing synchronization, and XOPEN__UNIX symbolic constants. Only an implementation that follows XSI can be called a UNIX system. [3]

FIPS

FIPS It represents Federal Information Processing Standards Federal Information Processing Standard, which is issued by the U.S. government and used by the U.S. government for computer system procurement. FIPS151-1 (April 1989) is based on IEEE standard 1003.1-1988 and draft ANSI C standard. Then came FIPS151-2 (May 1993), which is based on IEEE standard 1003.1-1990. Some functions listed as optional in POSIX. 1 are required in FIPS151-2. All these optional functions have become mandatory requirements in POSIX.1-2001. [3]

UNIX version

Announce
edit
Open Solaris
Among UNIX distributions, Open Solaris is the only one Open Source An example of. [4]
Oracle Solaris
In UNIX Business Edition, Solaris is a very excellent operating system. [4]
IBM AIX
AIX (Advanced Interactivee Xecutive) is a UNIX operating system owned by IBM. AIX originates from System V Release 3 and runs on IBM's Power PC hardware architecture. [4]
HP-UX
HP-UX (Hewlett Packard UNIX, HPUX) is the U.S HP UNIX operating system developed on the basis of System v. [4]
UNIX V6
The UNIX V6 released in 1975 is a mature version, Bell Laboratories This version was provided to American universities for free and began to be widely equipped on the PDP-11 series computers of various universities. In 1977, UNIX was first migrated to non PDP type computers. [5]
BSD UNIX
In addition to Bell Labs, another widely used UNIX version is BSD UNIX developed by the University of California, Berkeley, which is widely installed in SUN On the workstation. In 1993, version 4.4BSD was launched. BSD is the main platform of the network and provides support for DARPA's TCP/IP. The Network File System (NFS) provides connectivity to many computer models. NFS and Remote File Sharing (RFS) developed by AT&T keep UNIX system ahead in network support. [5]
Solaris
Solaris was the most widely used and successful commercial UNIX implementation. Sun's operating system was originally called Sun OS, which was mainly based on the BSD UNIX version. [5]
SCO UNIX(x86)
SVR3.2, PC UNIX with great influence.
Ultrix(DEC)
According to 4.2 BSD and many 4.3 BSD things.
Xenix(x86)
UNIX on Intel hardware platform, based on SVR2. [8]

Unix like operating system

Announce
edit
Unix like operating system has the advantages of high reliability, strong security and powerful database support function. It has become the most secure, reliable and popular large-scale server operating system and is widely used in various industries Industrial server Equipment. However, such systems have problems such as complex operation, low universality, lack of effective monitoring and maintenance means, and risk of important data loss and system collapse, which greatly shortens the service life of hardware equipment. [6]
Common Unix like system server hardware detection methods include those based on Linux Live technology, those based on Windows togo technology, and those based on Unix like system hardware detection software. Although using Linux Live technology can extract the source code of open source software, flexibly customize the hardware automatic detection software and generate the required reduced version detection report. However, due to the old and incomplete version of the software driver library that comes with the Linux Live system, the detection between machines with different hardware configurations requires a lot of time from the system ISO The driver (>30min) is found and installed in the driver file library, and the system cannot be started due to the lack of driver files matching the latest server hardware. Although the detection method based on Windows togo technology has a complete system, compared with the detection method based on Linux Live technology USB drive The space is large (more than 16GB), and the reading speed of the USB flash disk is too high. However, the method based on Unix like system hardware detection software has the problems of single detection function, insufficient compatibility and difficult operation. [6]

Comparison with Linux

Announce
edit
UNIX and Linux are authorized in different ways
Fundamentally, UNIX and Linux The biggest difference is that the former is traditional commercial software that implements intellectual property protection for source code. In the early days of UNIX development, the copyright of UNIX at that time belonged to AT&T Company. In order to promote the development of UNIX, AT&T Company authorized the UNIX source code to academic institutions for research or teaching with a cheap or even free license. Many institutions expanded and improved on this source code to form the so-called UNIX derivatives, which in turn promoted the development of UNIX. [4]
Later, AT&T realized the commercial value of UNIX, no longer authorized the UNIX source code to academic institutions, and declared the copyright rights of UNIX and its variants. This has had a great impact on the development of UNIX. In the following decades, the development of UNIX was often accompanied by property rights disputes. For UNIX, most of the widely used distributions are maintained by commercial companies, such as Oracle Solaris, IBM AIX, and HPUX. [4]
Linux has been following GNU General Public License (GNU GPL or GPL for short), GPL Grant the program recipient the freedom to run this program for any purpose, the freedom to reissue copies, and the freedom to improve the program and publicly publish the improvements. Therefore, any individual or company can modify and redistribute the Linux code within the scope of GPL. In addition, Linux can be used in any field, including commercial applications. [4]
UNIX and Linux have no technical inheritance relationship
Although the design idea of Linux has been greatly influenced by MINIX, the influence is not technical, but more conceptual. Linux does not use a line of UNIX code. It is an operating system built entirely from scratch. Therefore, Linux is not a derivative of UNIX, but a brand new operating system. [4]
UNIX and Linux have different requirements for hardware
For a long time, UNIX has been maintained by some large companies, so UNIX usually matches the hardware produced by these companies. For example, Oracle Solaris only has SPARC platform version for a long time. HP-UX can PA-RISC processor Intel IBM AlX runs on IBM Power PC architecture. Because of this, the wide application of UNIX is largely limited. [4]
UNIX is a very comprehensive operating system, surpassing Linux in some aspects
After more than 30 years of continuous development, some basic technologies of UNIX have become very mature, and some have become common technologies of various operating systems. Numerous practices have shown that UNIX is one of the few operating systems that can meet the reliability requirements of mainframe computers. Many UNIX mainframes: hosts and The server It runs 24 hours a day in large enterprises at home and abroad. For example, many large enterprises or government departments set up and run their entire enterprise/department information systems on UNIX based servers Client /Server architecture. [4]
Linux successfully imitates UNIX systems and functions, and it can PC All UNIX features are realized on the computer, which has the ability of multitasking and multi-user. More importantly, Linux is an open source product. Any individual or company can modify the source code of the Linux kernel to achieve or enhance the functions they want. [4]
In fact, there are many differences between UNIX and Linux. For example, UNIX has powerful network functions. As the cornerstone of the Internet TCP/IP protocol It is developed and developed on UNIX system. UNIX is mostly used for supercomputers, minicomputers or workstations. The growth of these technologies is inseparable from UNIX. UNIX is the most influential and successful operating system in history. [4]
contact
The origin of Linux can be traced back to the ancient UNIX system. It is because of the influence of UNIX that Linux was born. Linux inherits many good traditions of UNIX, such as powerful network functions, perfect commands, and good robustness and stability. UNIX and Linux are very similar in appearance and function. For example, most common UNIX commands can be found in Linux. [4]
In addition, Linux is also an operating system that follows the POSIX standard. Therefore, many UNIX applications can be easily ported to Linux. Similarly, applications on Linux can be easily transferred to UNIX. [4]