Operating system Daquan

Source: Internet
Author: User
Tags abstract mixed posix range knowledge base linux mint advantage

Operating system

An operating system is a collection of system software that manages the hardware resources of a computer, controls the operation of other programs, and provides the user with an interactive interface. The operating system is a key part of computer system, which is responsible for managing and configuring memory, prioritizing system resource supply and demand, controlling input and output devices, operating network and managing file system and other basic tasks. There are many types of operating systems, and various devices can be installed from simple to complex operating systems, from the embedded operating system of the phone to the supercomputer's large operating system. Today's popular modern operating systems mainly include Android, BSD, IOS, Linux, Mac OS X, Windows, Windows Phone and z/OS, in addition to a few operating systems such as Windows and z/OS, most operating systems are UNIX-like operating systems.

System Introduction

The operating system (English: Operating system, or OS) is a computer program that manages and controls computer hardware and software resources, is the most basic system software that runs directly on "bare metal", and any other software must be run with the support of the operating system. The operating system is the interface between the user and the computer, but also the computer hardware and other software. The functions of the operating system include the management of computer system hardware, software and data resources, control program operation, improve human-machine interface, and other application software to provide support, so that the computer system to maximize the role of all resources to provide a variety of forms of user interface, so that users have a good working environment, Provide the necessary services and interfaces for the development of other software.

There are quite a few operating systems that can be installed from simple to complex operating systems, such as smart card operating systems, RTOS, sensor node operating systems, embedded operating systems, personal computer operating systems, multi-processor operating systems, network operating systems, and mainframe operating systems. [1] The current popular modern operating system by application domain is divided into three kinds: desktop operating system, server operating system and embedded operating system.

Desktop operating system

Desktop operating systems are primarily used on personal computers. The personal computer market from the hardware architecture is divided into two major camps, PC and Mac machine, from the software can be divided into two major categories, such as UNIX-like operating systems and Windows operating system:

1. Unix and Unix-like operating systems: Mac OS x,linux release (e.g. Debian,ubuntu,linux mint,suse linux,fedora, etc.);

2, Microsoft company Windows operating system [2]:windows xp,windows vista,windows 7,windows 8 and so on.

Server operating System

A server operating system generally refers to an operating system installed on a mainframe computer, such as a Web server, application server, and database server. Server operating systems are now concentrated in three main categories:

1, UNIX series: SUN Solaris,ibm-aix,hp-ux,freebsd, etc.;

2, Linux series: Red Hat linux,centos,debian,ubuntu, etc.;

3. Windows series: Windows Server 2003,windows Server 2008,windows server R2, etc.

Embedded operating system

Embedded operating system is applied in the operating system of embedded system. Embedded systems are widely used in all aspects of life, ranging from portable devices to large fixed facilities such as digital cameras, mobile phones, tablets, household appliances, medical devices, traffic lights, avionics and plant control equipment. There are a wide range of embedded operating systems, including: Embedded Linux, Windows CE and other embedded operating systems that can be easily trimmed and ported, and Android, IOS, Symbian, windows that are widely used in smartphones and tablets Operating systems such as phone and BlackBerry OS.

Linux operating system

Mas OS X Desktop operating system

WIN8 Operating System

Windows Vista operating system

Windows7 operating System Win7 original system

Windows XP operating system

Apple OS

1980 ago

The first computer does not have an operating system. This is due to the early establishment of personal computers (as with the construction of mechanical abacus) and inefficiency to perform such procedures.

But in 1947, the invention of transistors, and Maurice V. Wilkes (Maurice Vincent Wilkes) invented the micro-program method, so that the computer is no longer mechanical equipment, but electronic products. System management tools and procedures to streamline hardware operations quickly emerge and become the foundation of the operating system.

In the early 1960 's, commercial computer manufacturers built batch processing systems that could serialize work, schedule, and execute. At this point, the manufacturer for each different model of the computer to create a different operating system, so the program for a computer can not be ported to other computers to perform, even the same model of the computer does not work.

By the year 1964, IBM has introduced a series of large-scale computer IBM SYSTEM/360, which use different price points, and the classic of Mainframe. And they all share the operating system codenamed OS/360 (not the operating system used for each product). Having a single operating system for the entire range of products is key to System/360 's success, and in fact IBM's current large system is descended from this system, and the applications written for system/360 can still be executed on modern IBM machines!

Os/360 also contains another advantage: permanent storage devices-the advent of hard disk drives (IBM is called DASD (Direct Access storage device)). Another key is the creation of the concept of time-sharing: allocating the precious temporal resources of large computers to all users appropriately. Time-sharing also gives the user the feeling of monopolizing the whole machine, while Multics's timeshare system is the most successful practice of this concept in many new operating systems.

In 1963, the singular company partnered with Bell Labs to build Multics in pl/i language, a source of inspiration for many of the 1970 's operating systems, especially the UNIX system established by Dennis Ritchie and Ken Thompson at T-Bell Labs, in order to practice platform porting capabilities , this operating system was rewritten by the C language in 1969; another widely used small computer operating system is VMS.

The 1980s

The first-generation microcomputers are not like large computers or small computers and do not have the required or capability to install the operating system; they only require the most basic operating systems, which are usually read from ROM, which is known as the Monitor program.

In the 1980 's, home computers began to spread. Usually at this time the computer has a 8-bit processor plus 64KB of memory, screen, keyboard and low-quality speakers. In the early 80 's, the best-known set of computers was the Commodore C64, which uses the microprocessor 6510 (6502 Chip special Edition). Instead of the operating system, the computer initializes the color screen, keyboard, and floppy drive and printer in a 8KB read-only memory BIOS. It can use the 8KB read-only memory basic language to directly manipulate the BIOS and write programs, most of which are games. This basic language interpreter is barely the operating system of this computer, of course there is no kernel or hardware and software protection mechanism. Most games on this computer skip the BIOS level and directly control the hardware.

The earliest and most famous disk-booting operating system was cp/m, which supported many early microcomputers and was massively plagiarized by MS-DOS.

The earliest IBM PC has its architecture similar to C64. Of course they also use the BIOS to initialize the operation with the abstract hardware, even with a BASIC interpreter! But its basic is superior to other company products because he is portable and compatible with any machine that complies with the IBM PC architecture. Such a PC can be addressed with a Intel-8088 processor (16-bit register) and can have up to 1MB of memory, but initially only 640KB. The floppy disk machine replaces the tape drive in the past, becomes a new generation of storage devices, and can read and write in his 512KB space. To support further file read and write concepts, disk Operating System,dos is thus born. This operating system can combine any number of magnetic regions, so you can place any number and size of files on a single disk slice. Files are distinguished by file name. IBM does not care much about DOS on its own, so it obtains the operating system in a way that is purchased from an external company.

In 1980, Microsoft used the scam to obtain a contract with IBM and acquired a company-produced operating system, which was produced in the name of MS-DOS after modification, which allows the program to operate the BIOS and file system directly. In the era of the Intel-80286 processor, the basic storage equipment protection measures began to be implemented. MS-DOS's architecture is not enough to meet all requirements because it can execute at most one program at the same time (if you want to execute the program at the same time, you can only use TSR to skip the OS and the program handles multitasking parts by itself) without any memory protection. Support for the driver is not complete enough, so the situation where the sound device must be set by the program is not sufficient, resulting in many incompatibilities. The performance of some operations is also horribly bad. Many applications skip MS-DOS's services and directly access hardware devices to achieve better performance. Nonetheless, MS-DOS has become the most commonly used operating system on IBM PCs (IBM itself has introduced DOS, called Ibm-dos or Pc-dos). MS-DOS's success has made Microsoft one of the most lucrative companies on the planet.

And the 1980 's another rising operating system is Mac OS, which is tightly bundled with Macintosh computers. At this time a Xerox Parooto Research center employee Dominik Hagen visited Apple's Steve Jobs and showed him the graphical user interface for Xerox's development at the moment. The Apple Computer was a surprise and intended to buy this technology from Xerox, but because the Parooto Research Center was not a business unit but a research unit, Xerox rebuffed the deal. After that, Apple agreed that the future of the PC must belong to the graphical user interface, and therefore began to develop its own graphical operating system. Today, many of the graphical interface technologies and rules that we consider to be essential elements are the foundation of Apple computers (such as drop-down menus, desktop icons, drag-and-click, and Double-tap). But it's true that the graphical user interface is actually Xerox's founding.

The 1990s

Apple I computer, the first generation of Apple Computer products. In the 80 's, there were many operating systems that affected the future of the PC market in the 1990. With the increasingly complex graphical user interface and the complexity and sophistication of the operating system, the strong and resilient operating system becomes an urgent requirement. This era is a time when many sets of personal computer operating systems compete with each other.

Apple's computer decided to redesign its operating system after the market's rise in the last decade, as the old system was poorly designed, making its successor poorly developed. After many failed projects, Apple released a beta version of the new operating system--macos in 1997, and the release of the official version made a huge success. Steve Jobs, who had been frustrated leaving Apple, reappeared.

In addition to the business mainstream operating system, from the 1980 's in the Open source world, the BSD system has developed for a very long time, but in the 1990 's due to the legal dispute with the T, so far away from the University of Helsinki, Finland, another open source operating system--linux rise. The Linux kernel is a standard POSIX kernel that can be counted as a UNIX family. The Linux and BSD families are paired with applications developed by the GNU program, but with the license and historical factors in use, Linux has achieved a sizeable market share of open source operating systems, while BSD is much smaller.

Compared to MS-DOS architecture, Linux, in addition to its proud portability (which can only run on Intel CPUs compared to Linux,ms-dos), is a time-sharing multi-process kernel and good memory space management (normal processes cannot access memory in the kernel area). A process that wants to access any non-own memory space can only be achieved through a system transfer. The general process is under User mode, while executing the system call is switched to kernel mode (Kernel mode), all special instructions can only be executed in kernel mode, which allows the kernel to perfectly manage the internal and external devices of the system, and rejects requests from the non-privileged process. Therefore, in theory any application execution error, it is impossible to let the system Crash (Crash).

On the other hand, Microsoft's response to more powerful operating system calls was the advent of Windows NT in 1993.

Starting in 1983 Microsoft wanted to build a graphical operating system application for MS-DOS, called Windows (some say Bill Gates was spurred on by Apple's Lisa computer).

At first, Windows was not an operating system, but an application, with a background of a purely MS-DOS system, because the BIOS design and MS-DOS architecture were not very good at the time.

At the beginning of the 1990 's, Microsoft's collaboration with IBM broke down, and Microsoft pulled out of the OS/2 (early command-line model and later became a successful but highbrow graphical operating system) and launched Windows NT 3.1 on July 27, 1993, a os/ 2-based graphical operating system.

and launched Windows 95 on August 15, 1995.

Until then, the Windows system was built on MS-DOS, so consumers looked to Microsoft for Windows 2000, which was launched in 2000, because it was the first graphical operating system to break out of MS-DOS foundation.

The architecture of the Windows NT system is: On top of the hardware hierarchy, there is a hardware abstraction layer (HAL) that is directly in contact with the microkernel, and the different drivers are mounted on the kernel as modules. So the microkernel can use functions such as input and output, file system, network, information security mechanism and virtual memory. and the system service layer provides all the unified specifications of the function call library, you can unify all the sub-system implementation methods. For example, although POSIX and OS/2 differ greatly in the name and invocation method of the same service, they can be implemented on the system service layer without any hindrance. The sub-system on top of the system service layer is all user-mode, so the user program can be avoided to perform illegal actions.

The DOS sub-system treats each DOS program as a process and carries out its operating environment as an individual independent MS-DOS virtual machine. The other is the Windows 3.1 NT simulation system, which is actually executing the WIN16 program under the WIN32 sub-system. As a result, the ability to control legacy programs written by MS-DOS and earlier Windows systems has been achieved. However, this architecture is only implemented on Intel 80386 processors and successor models. And some programs that directly read the hardware, such as most Win16 games, cannot apply the system, so many early games cannot be executed on Windows NT.

Windows NT has 3.1.3.5.3.51 with version 4.0.

Windows 2000 is an improved family of Windows NT (in fact Windows NT 5.0), Windows XP (Windows NT 5.1), and Windows Server 2003 (Windows NT 5.2), Windows V ISTA (Windows NT 6.0), Windows 7 (Windows NT 6.1) are also built on Windows NT-based architectures.

The growing and increasingly complex embedded devices market in this era has also led to the growth of embedded operating systems.

Modern operating systems typically have a graphical user interface for a drawing device that is used, and attach input devices such as a mouse or touch panel that are different from the keyboard. Older OS or performance-oriented servers typically do not have such a friendly interface, but instead use the command line interface (CLI) plus the keyboard as the input device. Both of these interfaces are actually called shells, and their functions are to accept and process the user's instructions (such as pressing a button, or typing an instruction on the command prompt column).

Choosing the operating system to install is usually very much related to its hardware architecture, and only Linux and BSD can be executed on almost all hardware architectures, while Windows NT is ported only to DEC Alpha and MIPS Magnum.

In the early 1990, the choice of personal computers had been confined to the Windows family, the Unix-like family and Linux, and Linux and Mac OS X were the main alternative to today.

Mainframe and embedded systems use a wide variety of operating systems. Large hosts have recently had many resources to start supporting Java and Linux to share other platforms. Embedded systems recently, from the Berkeley Tiny OS for Sensor networks to Windows CE, which can operate Microsoft Office.

Part

Operating system theory researchers sometimes divide the operating system into four parts:

Drivers: The bottom-level, direct control and monitoring of all types of hardware, their responsibility is to hide the details of the hardware, and provide an abstract, common interface to other parts.

Kernel: The kernel part of the operating system, typically running at the highest privileged level, is responsible for providing basic, structural functionality.

Interface Library: A special library of libraries that is responsible for wrapping the basic services provided by the system into the programming interfaces (APIs) that the application can use, which is the closest part of the application. For example, the GNU C run-time library belongs to this class, which wraps the internal programming interfaces of various operating systems into the form of ANSI C and POSIX programming interfaces.

Perimeter: Refers to all the other parts of the operating system except for the above three classes, which are often used to provide specific advanced services. For example, in a microkernel structure, most of the system services, as well as the various daemons in Unix/linux, are typically classified as this column.

Not all operating systems strictly include these four parts. For example, in the early Microsoft Windows operating system, the various parts of the coupling degree is very deep, it is difficult to distinguish each other. In an operating system with an external core structure, there is no concept of a driver at all.

The different layouts of the four parts of the operating system also form the dividing of several integral structures. Common structures include: simple structure, layer structure, microkernel structure, vertical structure, and virtual machine structure.

Kernel structure

Kernel is the most basic component of the kernel of the operating system, so the kernel structure often has some influence on the external features and application domain of the operating system. Although with the continuous evolution of theory and practice, the coupling between the high-level and kernel structure of the operating system is becoming more and more narrow, but in practice, the kernel structure is still the common standard of operating system classification.

The structure of the kernel can be divided into single kernel, micro kernel, mixed kernel, external kernel and so on.

Single-core (Monolithic kernel), also known as the macro kernel. Single-core architecture is the shape of the miscellaneous mixed-mix of the kernel components in the operating system, which was in the 1960 's (also in the beginning of the 1950 century), the longest history, is the operating system core and the external separation of the original form.

Micro-Cores (microkernel), also known as micro-cores. The microkernel structure is a new kernel structure generated in the 1980 's, emphasizing the separation of structural components from functional components. At the end of 20th century, based on micro-kernel structure, many structures such as ultra-micro kernel and outer core were developed in the theory field. Although most of the theoretical research since the 1980 has been focused on the "emerging" structure led by micro-kernels, in the application domain, the single-core architecture-based operating system has dominated.

The hybrid kernel (Hybrid kernel) is like a microkernel structure, except that its components run more in the kernel mentality to get faster execution times. The outer core (Exokernel) is designed to reduce the abstraction of the software as much as possible, which allows developers to focus on the abstraction of the hardware. The design of the outer core is very simplified, and its goal is to simplify the message passing mechanism of the traditional microkernel as well as the software abstraction layer of the whole core.

Among the many common operating systems, in addition to individual systems such as QNX and Mach-based UNIX, almost all use single-core architectures, such as most Unix, Linux, and Windows (Microsoft claims that Windows NT is based on improved microkernel architectures, Although the theorists have objected to it). Microkernel and hyper-core structures are mainly used for research-operating systems, and some embedded systems use external cores.

A single-core-based operating system usually has a long historical origin. For example, the vast majority of Unix family history can be traced back to the 1960 's. Most of these types of operating systems have relatively old designs and implementations (for example, in some Unix, there is a lot of code for the 1970 's and 1980 years). In addition, performance is often slightly better than operating systems with other kernel architectures in the same application area (but it is generally considered that this performance advantage cannot be attributed entirely to single-core architectures).

Key Features

The main functions of the operating system are resource management, program control and human-computer interaction. The resources of computer system can be divided into two categories: equipment resources and information resources. Device resources refer to the hardware devices that comprise the computer, such as the CPU, main memory, disk memory, printer, tape memory, monitor, keyboard input device and mouse. Information resources refers to the various data stored in the computer, such as files, libraries, knowledge base, System software and application software.

The operating system is located between the underlying hardware and the user, and is the bridge between the two. The user can enter commands through the user interface of the operating system. The operating system interprets commands, drives hardware devices, and implements user requirements. In modern terms, the OS of a standard PC should provide the following features:

Process management (processing management)

Memory Management (Management)

FileSystem (File System)

Network communication (Networking)

Security mechanism (safety)

UI (User interface)

Driver (Device drivers)

Resource Management

The system's equipment resources and information resources are the operating system according to the user needs according to a certain strategy to allocate and dispatch. The storage management of the operating system is responsible for allocating the memory unit to the program that requires memory for it to execute, and to retract the memory units it occupies for reuse after the execution of the program. For the computer system that provides virtual storage, the operating system also needs to coordinate with the hardware to do the paging work, assign the page according to the requirements of the executing program, transfer the page into and out of memory, and recycle the page.

Processor management or processor scheduling is another important aspect of the operating system resource management function. In a system that allows multi-channel execution, the operating system alternately assigns the processor to a program waiting to run within the system according to certain policies. A program that waits to run will not run until the processor is acquired. When a program encounters an event in operation, such as starting an external device and temporarily unable to continue running, or an external event occurs, the operating system will handle the corresponding event and then reassign the processor.

The device management function of the operating system is mainly to allocate and recycle the external equipment and control the external equipment to operate according to the requirements of the user program. For non-storage external devices, such as printers, monitors, etc., they can be assigned directly as a device to a user program, which is recycled for use by users of another requirement. For storage-type external devices, such as disks, tapes, etc., the storage space is provided to the user for storing files and data. The management of storage external devices is closely integrated with information management.

Information management is an important function of the operating system, mainly to provide users with a file system. Generally speaking, a file system provides users with the ability to create files, revoke files, read and write files, open and close files, and so on. With the file system, users can access data by file name without knowing where the data resides. This approach is not only user-friendly, but also facilitates sharing of common data with users. In addition, the security of the data can be ensured by allowing the creator to specify permissions when the file is established.

Program

The execution of a user program is performed throughout the operating system control. A user writes a program that he wants to solve in a programming language and then enters the program along with the requirements it executes, and the operating system controls the execution of the user program as required until the end. Operating system control user's execution mainly has the following content: the corresponding compiler program, the source program written in a programming language to the computer executable target program, allocation of storage and other resources to transfer the program into memory and start, According to user-specified requirements to deal with the various events in the execution and contact with the operator for the handling of the incident.

Interactive

The human-Computer interaction function of the operating system is an important factor to determine the "friendliness" of the computer system. The human-computer interaction function mainly depends on the input and output of external devices and the corresponding software to complete. The main devices for human-computer interaction are keyboard display, mouse, various pattern recognition devices and so on. The software that corresponds to these devices is the part of the operating system that provides human-computer interaction. The main function of the human-computer interaction is to control the operation of the equipment and understand and carry out the various commands and requirements through the human-computer interaction equipment.

Process Management

Regardless of whether they are resident programs or applications, they are executed in a process-standard execution unit. When using the Vonneumann architecture to build a computer, each CPU can execute at most one process at a time. The early OS (such as DOS) also does not allow any programs to break this limit, and DOS only executes a process at the same time (although DOS itself claims that they have the ability to terminate and wait to reside (TSR), which can be partially and painstakingly resolved). Modern operating systems can also take advantage of multi-process (multitask) functions to execute complex processes at the same time, even if they have only one CPU. Process management refers to the ability of the operating system to adjust the complex process.

Since most computers contain only one central processing unit, in the case of a single core (core), multiple processes simply and quickly switch processes, allowing each process to execute, in the case of multi-core or multi-processor, all processes are transformed on each processor or core through many collaborative techniques. The more processes execute concurrently, the smaller the time ratio each process can allocate. Many OS encounter this problem, such as the sound effects of intermittent or mouse jump (thrashing), an OS can only run its own hypervisor and run out of system resources, other users or hardware programs can not be executed. Process management typically implements the concept of time-sharing, and most OS can change the percentage of ticks for each process by specifying different privilege levels (priority). The higher the privileged process, the higher the execution priority, and the higher the percentage per unit time. The interactive OS also provides some level of feedback mechanism, allowing processes that directly interact with users to have higher privileged values.

Memory management

According to Parkinson's Law: "You give the program more memory, the program will try to consume light", so the program designer usually wants the system to give him unlimited and unlimited memory. Most modern computer memory architectures are hierarchical, with the fastest and least number of registers headed, followed by caches, memory, and the slowest disk storage devices. The OS memory management provides the ability to find available memory space, configure and release memory space, and swap memory and low-speed storage device inclusions ... and other functions. This type of function, known as virtual memory management, greatly increases the amount of memory available to each process (typically 4GB, even if the number of RAM is substantially less than that). However, this also brings a micro-amplitude to reduce the performance of the shortcomings, and even in severe cases can cause the process to collapse.

Another key activity of memory management is to manage virtual locations with the help of the CPU. If there are many processes stored on the memory device at the same time, the operating system must prevent them from interfering with each other's memory content (unless they operate under a controlled scope through certain protocols and limit the range of accessible memory). Dividing the memory space can achieve the goal. Each process will only see the entire memory space (from 0 to the maximum of the memory space) being configured to itself (of course, some locations are reserved by the OS and are forbidden to access). The CPU saves several tables in advance to match the virtual location to the actual memory location, which is called a paging (paging) configuration.

By creating separate, separate locations for each process, the OS can easily release all the memory occupied by a process at a time. If the process does not release memory, the OS can exit the process and automatically release the memory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.