I. Main objectives of modern OS:
The most important goals (1 and 2)
1. Effectiveness (improving system resource utilization and increasing system throughput)
2. Convenience
3. scalability
4. Openness
Ii. Functions of the Operating System
1. From the perspective of general users, OS can be seen as an interface between users and computer hardware systems: three computer methods (command method, system call method, graphics and window method)
2. From the perspective of resource management, OS can be regarded as the management of computer system resources (processor management, used to allocate and control processors; memory management, mainly responsible for memory allocation and recovery; i/O device management, allocating and operating I/O devices; file management, and file access, sharing, and protection)
3. OS abstracts computer resources, because, for example, a computer system without software (bare metal), it provides users with actual hardware interfaces (physical interfaces ), users must have a full understanding of the Implementation Details of physical interfaces and use machine commands for programming. Therefore, this physical machine must be difficult to use. For example, the I/O management software laid on bare metal hides detailed operation details on the I/O device and provides a set of abstract I/O devices; for example, file-based management software. As a result, OS is a multi-layer system software deployed on computer hardware. They not only enhance the functions of the system, but also hide the hardware operation details, these are used to abstract multiple layers of computer hardware operations.
Iii. Main Driving Force for OS Development
1. constantly improve the utilization of computer resources
2. Convenient for users
3. constantly update Devices
4. Continuous development of computer architecture
Iv. Time-Sharing System
Definition: a host is connected to multiple terminals with monitors and keyboards, and multiple users are allowed to use computers in interactive mode through their own terminals to share resources in the host.
Key issues in implementation of time-sharing systems:
1. receive messages in a timely manner (Multi-Channel cards and buffer zones store commands (or data) typed by Users ))
2. Timely processing (time slice solution)
Features of time-sharing systems
1. multiplexing-a host is connected to multiple online terminals at the same time
2. Independence-terminals do not interfere with each other
3. Timeliness
4. Interaction
V. Real-Time System
Definition: The system can respond to external requests in a timely manner, process the event within the specified time, and control all real-time tasks to run in a coordinated and consistent manner.
Application requirements: Real-time Control and real-time information processing
Hard real-time task: the task's deadline must be met; otherwise, unpredictable results may occur. Tasks in the aviation navigation Application System
Soft real-time task: exceeds the deadline, with little impact. Tasks in the Media Playback System
Differences between a time-based system and a real-time system:
Interactivity: although the real-time information processing system is also interactive, the interaction between people and the system is limited to accessing some specific specialized service programs in the system; the time-sharing system can provide end users with services such as data processing and resource sharing.
Reliability: real-time systems require high System Reliability
Vi. Basic Features of the Operating System
Concurrency:
1. parallelism and concurrency: parallelism means that two or more events occur at the same time. Concurrency. in a period of time, multiple programs run simultaneously (Multi-Channel processor system) and in a single processor system (time-based switching)
Process Introduction: A process is a basic unit for independent operation in the system and resource allocation. It consists of a group of machine commands, data, and stacks. It is an active entity that runs independently.
Introduction thread: A process contains several threads. as the basic unit of independent operation and scheduling, a thread basically does not have system resources.
Sharing
Definition: the resources in the system can be used by multiple concurrent processes (threads) in the memory. Correspondingly, resource sharing or resource reuse is used together.
1. Mutual Exclusion and sharing
2. concurrent access method 3. Virtual Technology
The so-called virtual in the operating system refers to the transformation of a physical entity into a pair of applications on several bare metal devices through a certain technology.
1. time-division multiplexing technology, using the idle time of the processor (including virtual processor technology and Virtual Device Technology)
2. The space division multiplexing technology utilizes the memory idle time (including the virtual disk technology (disk partition) and virtual memory technology (Nature: Memory time division multiplexing ))
Asynchronization
Due to resource restrictions, process execution is generally not "in one breath", but "Stop and stop, that is, the process is advancing at an unpredictable speed.
VII. Main Functions of the Operating System
1. Process Control-creating, allocating resources, and revoking
Process Synchronization-process mutex mode and process synchronization mode. The most common mechanism for implementing process synchronization is the semaphore mechanism.
Process Communication-communication between processes
Scheduling-Job Scheduling (resource allocation, first of all, memory allocation, process creation), process scheduling (distribution of processing machines, set the operation site, and put the process into execution)
2. memory management functions:
Memory Allocation: task-allocates memory space; improves memory utilization; allows running programs to apply for additional memory space
Allocation Method-static allocation mode (the memory space of each job is determined when the job is loaded, and cannot be added later); dynamic allocation mode (when the job is loaded, the memory is empty, however, you can continue to apply for new additional memory space during the running process)
Structure and functions of the memory allocation mechanism-memory allocation data structure; memory allocation function; memory recovery function
Memory protection: tasks-ensure that each user program runs only in its own memory space and does not interfere with each other; do not allow user programs to access the operating system programs and data; the program cannot be transferred to other non-shared user programs for execution.
Address ing: Logical Address-physical address
Memory expansion: with the help of virtual storage technology, the memory capacity can be expanded logically.
3. device management (managing peripheral devices)
Buffer Management-speed matching for CPU-I/O devices
Device allocation-allocates the required devices based on the user process's I/O requests, the existing resources of the system, and the allocation policies of certain devices.
Device processing-device processing program (Device Driver), used for communication between the CPU and the device controller.
4. File Management
File storage space management
Directory management
File read/write management and protection
5. interfaces between the operating system and users
User Interfaces: online user interfaces, offline user interfaces, and graphical user interfaces
Program Interface: this interface is set for user programs to access system resources during execution. It is the only way for user programs to obtain operating system services. A group of system calls. Each system call is a subroutine that can complete specific functions.
VIII. OS STRUCTURE DESIGN
Traditional Operating System Structure: non-structured operating system, modular operating system, hierarchical Operating System
Customer/Server mode
Composition: client, server, network system
Interaction: when a customer sends a request message, the server accepts the message, the server returns the message, and the client receives the message.
Advantages: data distribution, processing, and storage; Ease of centralized management; flexibility and scalability; easy to change Application Software
Deficiency: Reliability and bottlenecks
Microkernel OS STRUCTURE
Basic concepts:
Small enough kernel-the micro kernel is not a complete OS, but the most basic part of the OS: Implementation of hardware-related processing; implementation of some basic functions; responsible for communication between customers and servers
Customer/server-based mode
Apply the principle of "mechanism and policy separation"
Adopting Object-Oriented Technology
Basic functions
Process (thread) Management-basic features of the microkernel OS during communication between processes
Low-level memory management
Interruption and handling
OS advantages: improves system scalability, enhances system reliability (strict test and API) portability, provides support for Distributed Systems, and integrates the object-oriented thinking.
Insufficient: the running efficiency is reduced.