[Computer PubMed 408 Professional Course] Operating System Chapter 1 - Section 1: Concepts, Functions and Goals of Operating Systems

operating system

operating system concept

Airborne King

Understanding the Hierarchy of Computer Systems with Live Experience: The Birth of a Computer

  1. Step1: Buy a bare metal (pure hardware CPU hard disk memory);
  2. Step2: Install the operating system (Windows, MacOs, Linux and other operating systems);
  3. Step3: Install the application software program (QQ, browser, game, etc.);
  4. Step4: Use the application software program

The role of the operating system in this:

  • Understand from the bare metal hardware layer and software application layer to the operating system: the operating system is responsible for managing and coordinating computer resources such as hardware and software;
  • Understanding from the operating system to the software application layer: the operating system provides simple and easy-to-use services for directing computer hardware work for upper-layer applications and users;
  • The operating system is system software, a piece of computer software that is closest to the system hardware, not computer hardware.

image-20220302221840461

In summary:

The operating system (Operating System, OS) refers to the control and management of the hardware and software resources of the entire computer system, and the reasonable organization and scheduling of computer work and resource allocation, as well as the convenient interface and environment provided to users and other software. The most basic system software in a computer system.

How to reflect the management and scheduling of the operating system for system hardware and software?

The most intuitive example is to open the task manager of the window operating system: (shortcut key: CTRL + ALT + DEL or right-click the bottom task bar -> task manager)

image-20220302222518227

Operating system functions and goals

Airborne King

According to the concept of the above operating system, the following questions are raised:

image-20220302222637657

Operating system as manager of system resources

For the safe and efficient operation of computer software and hardware, the operating system will provide the following four functions:

Airborne King

  1. Processor (CPU) management;
  2. memory management;
  3. document management;
  4. equipment management;

The purpose is for the safe and efficient operation of computer software and hardware;

image-20220302223927743

Using the process of video chatting with friends on QQ as an example, how to understand the operating system as the manager of system resources:

  1. Step1: File management —by double-clicking the shortcut of QQ, the operating system will open the folder layer by layer to find the storage location of the executable program of QQ.
  2. Step2: Memory management - use it as a process to load the relevant data required by the program into the memory.
  3. Step3: Processor management - the process corresponding to the QQ program can be run normally only after the process corresponding to the QQ program is allocated and processed by the processor (CPU) system resources;
  4. Step4: Device management—— When starting a video chat, the system needs to assign the process of the camera device to the QQ process, and it needs to be recycled after the operation is completed.

The operating system acts as the interface between the user and the computer hardware

For the convenience of users, the operating system will provide the following 3 functions:

Airborne King

  1. Command interface: allows users to use directly ;
  2. Program interface: allows users to call indirectly through the program ;
  3. GUI: The most popular graphical user interface in modern operating systems.

Among them, the command interface and the program interface are collectively referred to as the user interface , and the postgraduate entrance examination also examines these two interfaces, and the GUI interface is enough to understand.

image-20220302225654732

Detailed command and program interface

Airborne King

image-20220303000530717

command interface

  • Command interface: It is an interface that allows users to use it directly. At the same time, there are online command interface and offline command interface.

    Online command interface : also known as interactive command interface, the user says a sentence, and the system does a sentence;

    • Practical example:

      Step1: Press the win+R key to call out the "Run" window;

      Step2: Enter cmd and press Enter to open the system command line interpreter;

      Step3: Try to use the time command

      image-20220303000903841

    Offline command interface : also known as batch command interface, the user says a lot, and the system does a lot.

    • Practical application example (take Windows operating system as an example):

      The system running script written through the .bat system batch file is an example of a batch command. The following figure is a batch command to search for files in the .bat format in the C drive. By writing a .bat system batch command file, the content inside is the operation that the system needs to perform when running this file. When you double-click this batch file, the system will explain and execute step by step from the first line to the last line. . In summary, batch processing means that the user says a bunch, and the system also makes a bunch of running results for its content.

      image-20220303001226152

program interface

  • Program interface : It is an interface that allows users to use it indirectly through a program. Consists of a set of system calls (program interface = system calls, nouns have the same meaning)

    Confusing concepts: generalized instructions are often used instead of expressing system calls in the title, system calls = system call instructions = generalized instructions

    • Practical application example (take Windows operating system as an example):

      The DLL dynamic link library under the Windows operating system is the best example. DLL dynamic link library (Dynamic Link Library), DLL contains shared code that different programs can link and call, just like a library, multiple programs can At the same time, a DLL link library is called, and a DLL only needs to be loaded into the memory once. One of the most simple and easy-to-understand examples is this DLL file - C:\Windows\System32\user32.dll. The program can call user32.dll to realize functions such as creating windows (the calling process is a system call). Remember, this method can only be used indirectly through user programs, and cannot be directly loaded and run into system processes.

      image-20220303004021488

GUI interface

GUI : Graphical User Interface (Graphical User Interface)

Users can operate through the graphic graphical interface, no longer need to memorize complicated commands and parameters;

  • Practical application example (take Windows operating system as an example):

    In the Windows operating system, to delete a file, you only need to "drag" the file icon to the recycle bin. And this operation is actually an instruction to delete the operation in the background of the system. When using these GUIs to operate the system, the user only needs to use these vivid icons to operate, and there is no need to memorize complicated commands and parameters.

summary

image-20220303004636648

The operating system as the closest layer to the hardware

Airborne King

As the system level closest to the hardware, the operating system realizes the expansion of the hardware machine .

A computer without any software support is called bare metal . Installing an operating system in the bare metal can provide resource management functions and user-friendly service functions , transforming the bare metal into a stronger and more convenient machine.

A machine covered with software is usually called an extended machine , also called a virtual machine .

Examples of operating systems and hardware

  • Hardware: hammer, saw, wood, nails...

  • Operating system: an excellent craftsman

    The operating system realizes the expansion of hardware machines: through excellent craftsmen, these simple raw materials can be organized into houses, sailboats, and Pinocchio. . .

    Ordinary users can directly use the house, sailboat, and Pinocchio provided by the craftsman without caring about how these things are organized and work at the bottom.

    At the same time, the combination of operating system and hardware is also in our program: encapsulation idea

Summary of this section

Airborne King

First, we introduce the concept and definition of the operating system, and then we introduce the functions that the operating system needs to realize when it serves as three roles according to the computer hierarchy—resource manager, providing service interface to users, and controlling hardware and its components. extension.

image-20220303011157932

Guess you like

Origin blog.csdn.net/weixin_43654363/article/details/123861405
Recommended