What is the operating system?

Source: Internet
Author: User
Tags virtual environment
What is the operating system? Translated from an operating systems vade mecum

Translated by Raphael A. Finkel Liu Jianwen (http://blog.csdn.net/keminlau

)

Key: Operating System

Intro

What is the operating system? What is its nature? The operating system is a highly complex mix of policies and mechanisms, rules, and concurrencies (algorithm and heuristic), and thoughts, theories, and practical experience (mixtures ). This manual (vade mecum) attempts to combine different views on the operating system and step by step guides beginners to master the most complex topic of computer science.

The operating system has a wide range of subject content and a large number of independent content, so that students and teachers often only pay attention to the part and ignore the idea of overall view. I hope to correct this situation through the dual thought proposed in this book-resource management and beauication ication.

(Kemin: the so-called combination of various ideas is actually an abstract of the most general theory of the operating system, pointing out the essence of the operating system)

Unified terminology: Principles, storage, and transmission

To unify disparate threads of discussion, I have taken the liberty (random, rash, take the liberty, rude) Introducing names for recurrent themes and glorifying (praise, praise, beautify) them with the title "principles", I hope that this Organization and nomenclature (name method, term, specialized language) will help the reader to understand the subject better and to integrate new ideas into the same framework.

I have striven to use a consistent nomenclature throughout the book. at times this nomenclature is at odds (possible opportunity; advantage; possibility of success or failure) with accepted American practice. for example, I prefer to call computer memory ''store. ''this name allows me to unify the varous levels of the storage hierarchy, including registers, main store, swap space, files on disk, and files on magnetic tape. I also prefer the single word''transput'' to the clumsier (clumsy, crude, unsightly) but more common term ''input/output. ''although I found this term jarring (harsh; rolling; not harmonious) at first, I have grown to like it.

Course practice

Operating System courses without practical projects are incomplete. However, this exercise must have substantial investments in software, such as implementing some features of the operating system. In the classroom, you can provide a complete functional structure of the operating system through well-defined modules and interfaces, and then set up assignments for students. The content is designed to implement these modules. A less ambitious project is to first let students write a simple Scheduler for virtual machines. You can optimize it as needed, such as adding virtual memory, input and output, and other functions.

Mechanisms and policies

In this book, I carefully and carefully distinguish between mechanisms and policies. The mechanism is the technology used to execute transactions, and the policy is the rule used to determine which transactions to execute. The mechanism is the operating system's screws and nuts (nuts and bolts), is the basic part, the basic part. The type and quantity of these mechanisms depend on the operating system's hardware system.

Kemin: Please use "mechanism is a man-made nature" to understand the above section and refer to it here

.

The resource Principle

What is the essence of an operating system's complicated structure and behavior? By providing two different operating system definitions, we hope to give readers some tips on the nature of the operating system. The first definition is "resource principle.", and the second is "beautification principle ). In addition, we will introduce a very structured idea of the operating system-level principle ).

The following are resource principles:

The operating system is an algorithm that allocates resources to processes.

Resources

What is a resource? A resource is a commodity required to complete a job or a transaction ). Computer hardware provides a lot of basic (Fundamental) resources to complete computing transactions. We know that the program must be stored in the primary storage, executed by the CPU, and input/output operations. The basic resources provided by computer hardware can be understood as space, time, and data transmission (transput) three types.

In addition to basic raw resources, the operating system also introduces some new resources and some resources processed for basic resources. For example, file resources, MPs queue resources, and email resources.

Process

The concept of a process is the core of the operating system and is hard to be defined by notoriously. A rough understanding is that a process is a dynamic execution of a program and a carrier of resources required for the program to complete a task. We can compare the process to an actor performing a movie in a theater. For an actor, stage props are his resources. When an actor needs a prop, he applies to the prop Management Office (equivalent to the resource allocation program of the operating system. Because resources are shared with all actors, the job of the management office is to meet two conflicting goals in order to solve the resource competition problem when multiple actors apply for props:

  • Let every actor get the item they want (what is the mechanism problem)
  • Fair distribution of items (How about policies)

Kemin: because of the different nature of various resources (including encapsulated high-level resources), their [management] methods are different. We can see this from the name of management means, the processor is [scheduled] And the master memory is [allocated. However, from the perspective of the management function, they all have the part for implementing management and how to manage it. Implementing management is a mechanism problem, and how to manage it is a policy problem. For example, the scheduling mechanism of the processor (which must be supported by system functions such as timer and process switching commands) and scheduling policy.

In addition, the management office is also responsible for the host of the opera theatre. Its responsibilities include:

  • Ensures high utilization of items (resources)
  • Increase the number of performances (processes) as much as possible
The Beautification Principle

We have read the definition of the operating system's resource principles. Now let's take a look at another equally important definition of the operating system-the beautification principle ).

The operating system is a set of algorithms that hide hardware details and provide a more friendly and comfortable environment.

Hardware details are hidden to achieve two goals.

Security)

Although the operating system and general processes run in the primary memory in a similar form, as a resource distributor and virtual environment supporter, the kernel process has obvious security boundaries with general application processes. The operating system is compatible with the hardware. You can see the CPU control and status register when the operating system runs in the CPU core state. If the layer is strictly logical, the application process and the kernel process are at different logical layers. However, due to the cost, efficiency, and flexibility, the operating system is not completely hardware-based, and the software-based CPU is also designed. In addition, because the application process must use hardware resources to complete transactions (such as input and output), the two logical layers must have interfaces.

Abstract action)

The operating system is not only a resource distributor, but also a resource package. It packs low-level raw resources into high-level virtual resources. This packaging is called abstraction. Like other abstract supporting software (such as compilers), the operating system is responsible for abstract implementation. This abstraction aims to provide a virtual operating environment for upper layers (such as processes. The virtual environment has different understandings in different contexts. It refers to resources in process scheduling and advanced commands and library function calls in programming (C language virtual machine; when talking about the system structure, it is called services )......

Kemin: From the Perspective of the system (elements, attributes, and relationships), abstraction always shows the boundaries of two different levels of systems, the deduction of high-level systems (work, activity, or transaction) it is always dependent on the abstraction provided by low-level systems. This dependency is not completely rigid, so as to compromise the efficiency (for example, a company has different levels of positions, performs their respective duties, subordinates obey the command, and coordinates and cooperates to exert the effectiveness of the Group)

Kemin: I personally think it is inappropriate to divide the beautification principles into security and abstraction, which will lead to conceptual confusion. The purpose of this Division is to emphasize the special relationship between OS and hardware, and emphasize that OS is a software running at the privileged level. But what is security? Security is to ensure the correct implementation of abstraction. It is a part of abstraction. It is wrong to coordinate security with abstraction, which will lead to confusion in classification.

Some Operating System related brainstorming

B. I almost forgot that developing a driver is actually an operating system. Therefore, it is unclear to divide the computer system into the assembly language layer and the operating system layer. However, it is not sufficient to structured hierarchical computer systems in programming languages (that is, instructions, or commands) because there are many implementation mechanisms (such as interrupt mechanisms) it is not a programming language concept, but developers must understand this mechanism before getting started.

B. currently, many books on computer composition and architecture divide the Operating System (system software and code library) into independent layers when dividing the computer hierarchy, between the Assembly Language layer and the ISA layer, I think this method is inappropriate. In my opinion, only the levels of language abstraction can clearly grasp the computer hierarchy. However, the role of the operating system cannot be ignored. OS is very special. There is also a special thing, that is, the compiler. When layering computers, the OS and compiler should be independent for further qualitative analysis ......

B. processes, threads, fibers, and distributed tasks are all "computing tasks". In the vertical view, they only have different granularities. In the horizontal view, tasks are different in nature (such as management tasks and managed tasks ), these understandings are not very difficult. However, with a processor implementation and operating system implementation, the complexity of the problem seems to have increased by an order of magnitude. What is this phenomenon? An abstract "computing task" requires a specific physical carrier. If we layer the computer system, the operating mode of the hardware is an obvious separation line, which separates tasks and implementations. However, the operating system as a software is at the implementation level. It can be seen that the operating system is closely related to the CPU.

O B. The biggest achievement today is to figure out the relationship between the operating system, application software, and programming language. In the vertical view, operating systems and application software are both software products, and programming languages are tools for constructing them. The operating system is lower than the abstract level of application software and uses a lower-level language structure closer to the hardware. horizontally, the three are information products developed and designed according to engineering requirements, but the programming language is more abstract, belongs to the "methodology" level.

B. There is an illusion that many different programs run on the computer screen, including operating systems and independent programs. In fact, this difference only exists between different applications, and the operating system is logically part of the application. If this assumption is true, it is hard to understand the concept of running? 2009-4-9 20:04

B. The reason why I understand that the application and the operating system are "running" is that the operating system has two roles. The operating system is "running" together with the application in terms of hardware expansion; the application is managed as a resource management, and its own "running "......

B. the same operating system and application are "running" and can be seen from the DLL provided by the operating system. These DLL are the specific code of the service provided by the operating system. When the application is running, it must be mapped to the address space and "run" together ". Computer systems that can be run are modularized into many parts. Hardware, system software, and application software are the three most important parts.

A. What is the purpose of religion? What is the purpose of philosophy? They all belong to the "regulatory" category. These two days of research into operating systems found that the computer world is full of regulatory concepts. Parallel thinking of various fields as long as there is an additional management mechanism involved in management. For example, in politics, Justice, and religion in life, the CPU, memory, and device management of the operating system all have an additional execution program responsible for management.

B. Summarize the two-day study on the operating system. The main function of an operating system in a computer system is to manage hardware resources. These management functions are designed to run multiple programs. Operating system management the three main hardware of the computer system: processor, memory, and external settings. The management module is called processor management (also called process management) and memory management (also called virtual memory management) and device management. In addition to device management (hard disk storage device, as opposed to other input/output devices), the hard disk is subject to additional computing requirements-data file persistence and file management complexity, the fourth item is file management.

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.