My own notes based on the first chapter of the textbook "The Essentials of Operating System Concepts"

Computer systems can be roughly divided into:
①hardware
②operating system
③user
④application program

Computer hardware:
①central processing unit (CPU)
②memory
③input/output device

The purpose of operating system design:
①Easy to use
②Performance

Think of the operating system as a resource allocator.

The control program is used to manage the execution of the user program.

The operating system is a program that runs on the computer all the time (also called the kernel). In addition to the kernel, there are two kinds of programs:
① System program: A program related to the operation of the system. At startup, it is added to the memory to become a system process or system background program, and its life cycle is the same as that of the kernel.
②Application program: all other programs that have nothing to do with program operation.

The operation of the computer system: It
is necessary to run the boot program or the initial program in the read-only memory (ROM) or the electrically erasable programmable read-only memory (EEPROM) as soon as it is turned on.

The occurrence of an event is usually notified by email or software interruption.

The way to trigger the interrupt:
①The hardware can send a signal to the CPU via the system bus to trigger the interrupt at any time.
②The software can trigger interrupts through special operations, namely system calls (also called supervisory system calls).

When the CPU is interrupted, it stops what it is doing, and immediately goes to the start address of the interrupt service routine to execute the program. After the execution is completed, the CPU re-executes the interrupted calculation.

The CPU can only load instructions from the memory, so the execution program must be located in the memory. Most programs are located in memory, and memory is usually designed to dynamically access memory (DRAM). Because the ROM cannot be modified, it can only store static programs. EEPROM can be modified, but cannot be modified frequently, so most static programs can be saved.

When executed on the Von Neumann architecture, the typical instruction execution cycle:
①Get
the instruction from the memory and store it in the instruction register ②The instruction is decoded, or the operation data may be retrieved from the memory and stored in the internal register
③In After the instruction completes the execution of the operation data, the result may be stored in the memory.

The memory unit can only see the stream of addresses. Memory is a fast-access data warehouse and is shared by CPU and I/O devices. The central processing unit reads instructions from the memory during the instruction cycle, and reads and writes data in the memory during the data acquisition cycle (on the von Neumann architecture). Memory is generally the only large-capacity memory that can be directly addressed and accessed by the CPU.

Under ideal conditions, programs and data should stay in the memory forever, but due to
① the memory is too small
② the volatile nature of the memory can not be achieved,
so the program and data are stored in the external memory, and only loaded into the memory when it is used.

Multi-processor programs are also called parallel systems or multi-core systems.
There are two types of multi-processor programs:
① Asymmetric processing: each completes its own special task.
②Symmetric multiprocessing: Participate in all tasks of the operating system together

The difference between asymmetric processing and symmetric multiprocessing may come from hardware and software.

The advantages of multi-processor programs:
①Increase throughput (to complete more work in a short time)
②Economy of scale (price is lower than a single processor of the same specification)
③Increase reliability (if a single failure does not terminate the entire task)

Multiprocessing increases the computing power by increasing the CPU. Multiprocessing can change the memory access model of the system from uniform memory access to non-uniform memory access.

Moderate degradation refers to the ability to continue to provide services in proportion to the level of remaining effective hardware.

The program itself is not a process, the program is a passive entity, and the process is an active entity. The execution of a process is sequential, and the CPU executes the process instructions one after another until the process is completed. Furthermore, each process can only execute at most one instruction.

The operating system is responsible for the following activities of process management:
①Scheduling processes and threads on the CPU
②Creating and outputting user processes and threads
③Suspending and restarting processes
④Providing process synchronization mechanism
⑤Providing process communication mechanism

The operating system is responsible for the following activities of memory management:
①Record which part of the memory is being used and by whom ②Decide
which processes will call in or out of the memory
③Allocate and release memory space as needed

The operating system is responsible for the following activities of file management:
①Create and delete files
②Create and delete directories to organize files
③Provide operation primitives for files and directories
④Mapping files to memory
⑤Backing up files to stable (non-volatile) storage medium

The operating system is responsible for the following activities related to hard disk management:
① Free space management
② Storage space allocation
③ Hard disk scheduling

Since external memory is frequently used, it should be used efficiently. Although some storages are slower and cheaper than external storages, hard disks have functions such as backing up disk data, storing rarely used data, and keeping long-term files.

**Tier-level storage devices: **Tape drives and their tapes, CD/DVD drives and optical discs, etc. Divided into one write multiple read and read-write.

The cache is also called the cache. Information is usually stored in the memory and copied to the cache when it is used; when specific information is needed, it will be found in the cache first, and if it is not found, it will be retrieved from the external storage and copied to the cache for use and save. The memory can be regarded as a high-speed cache of the external memory, because the external memory data is first copied to the internal memory for use, and the data should be stored in the internal memory before it can be saved to the external memory.

The movement of information between storage levels can be displayed or implicit, depending on the hardware design and the control software of the operating system. In the hierarchical storage structure, the same data may appear at different levels of the storage system.

The I/O subsystem includes the following main components:
①Universal interface of device driver
②Memory management components for buffering, cache and spooling
③Drivers of specific hardware devices

Protection is a mechanism for controlling processes or users to access the resources of a computer system. By checking the hidden dangers of errors in the interface between component subsystems, protection can improve reliability. Preventing the system from internal or internal attacks is a safe job, not a protection job.

Protection and security require the system to be able to distinguish all users. Most operating systems utilize a list. In order to maintain the user name machine associated user representation (UID), UID is unique to each user.

The bitmap is a string of n binary, used to represent the status of n items, 0 means available, 1 means unavailable (or vice versa).

The portal website is used to provide web access to internal servers.

Network computers are used to implement Web computing. When higher security and more portable maintenance are required, they can be used to replace traditional workstations.

The firewall protects the internal environment in order to avoid damage.

A network is a communication path between two or more systems. Distributed systems provide functions through the network. Transmission Control Protocol/Internet Protocol (TCP/IP) is the most commonly used network protocol, which provides the infrastructure for the Internet.

The network can be divided according to the distance between nodes: a
local area network (LAN) is located in a room, a building, or a campus.
Wide area networks (WAN) are used to connect buildings, cities or countries.
Metropolitan Area Network (MAN) can connect buildings in a city.
Personal Area Network (PAN) is used to connect phones and headsets or connect mobile phones and computers.

The network operating system provides functions such as file sharing across the network and message exchange between different computer processes.

The client-server system is a dedicated distributed system.

Server system classification:
①Compute server system: Provide interfaces for customers to send requests to perform operations. Correspondingly, the server performs the operation and sends the result to the client. For example, if a server runs a database, it can respond to client data requests.
②File server system: provide file system interface so that clients can create, update, output and access files. For example, a Web server can send files to a client running a Web browser.

Cloud computing can provide services such as computing and storage setting applications through the network. It is an extension of virtualized computing because it implements functions based on virtualization technology.

Embedded computers are currently the most common computers. Embedded systems almost always use real-time operating systems. When processor execution or data flow has strict time requirements, a real-time system is used, which is usually used as a control device for a specific application. For example, a home appliance controller is a real-time system. Real-time systems have clear and fixed time constraints. The processing must return correct results within fixed constraints, and the operation of the real-time system produces correct results.

Open source operating systems have source code, not just compiled binary code. Binary code can be generated from the source code to run on the system. From the binary code to the source code is called reverse engineering, and some useful information, such as comments, cannot be recovered.

Guess you like

Origin blog.csdn.net/weixin_45715461/article/details/114412334