"Linux kernel Design and implementation" chapter first to second study notes
Name: Wang Wei No.: 20135116
Chapter One introduction to the Linux kernel
First, about UNIX
--A modern operating system that supports preemptive multitasking, multi-threading, virtual memory, paging, dynamic linking, and TCP/IP networking
1, the main development process
in 1969, Bell Labs ' handlers designed a file system prototype that eventually evolved into Unix
1971, Unix was transplanted into the PDP-11 model.
In 1973, the entire UNIX system was rewritten using C language, paving the way for later extensive porting of UNIX systems
UNIX Sixth Edition (V6) is widely used outside of Bell Labs
In 1977, Bell Labs synthesized a variety of variants and launched the UNIX Systemⅲ, the most famous of which was the first UNIX evolutionary version--1bsd (Berkeley software distribution) system introduced in 1977 by the University of California, Berkeley
1977, UC Berkeley launches the first UNIX evolutionary version of--1BSD (Berkeley software distribution) system
1978, Berkeley launched 2BSD, including CSH, VI and other software
In 1979, Berkeley launched its independently developed 3BSD system
1983, T launches Systemⅴ
20th century 80, 90, many workstations and server vendors, combined with the T and Berkeley Distributions, have launched their own UNIX systems, including digital Tru64, HP-UX, IBM AIX, Sequentdynix, on the basis of their own needs. /PTX, etc.
2. Main Features
(1) Simple
(2) Many things are represented as files, and this abstraction enables the use of a set of identical system invocation interfaces for data and devices for open (), read (), write (), Lseek (), Close ()
(3) Unix kernel and related system Tools software is written in C language, easy to transplant
(4) The process is created very quickly and has a unique fork () system call
Second, about the operating system and the kernel
1. Operating system
The entire system is responsible for the most basic functions and system management, including the kernel, device drivers, boot loader, command line shell or other kinds of user interface basic file management tools and System tools.
2. Kernel
The kernel is sometimes called hanging you this or is the operating system core, usually by the Interrupt Service program responsible for the response interruption, responsible for managing multiple processes to share the processor Time Scheduler, responsible for managing the process address space of the memory management program and network, Inter-process communication and other system service programs together. The kernel is isolated from normal applications, is generally system-state, has a protected memory space, and has all the permissions to access hardware devices. This memory state and the protected memory space are collectively referred to as kernel space.
3. Application, kernel, and hardware relationships
Applications running in the system communicate with the kernel through system calls.
Interactions: Applications fall into the kernel through the system call interface
Applications are known to run through system calls in kernel space;
The kernel is called running in the context of the process.
The activities of each processor at any point in time can be summarized as one of the following three:
4, single core and micro-core comparison
(1) Single core
Implemented as a single large process in general, and also run on a separate address space, the kernel can call functions directly
Advantages: simple, high performance
Cons: A feature corruption may cause the entire kernel to not work properly
(2) Micro-core
functionality is divided into separate processes, each of which is called a server. All servers remain independent and run in their respective address spaces, cannot call functions directly, process micro-kernel communication through message passing, and the system adopts interprocess communication (IPC) mechanism.
Advantages: Independently avoid one server failure harmful another, the modular system allows one server to swap out for another server
Cons: Inter-server calls involve inter-process communication, high time overhead, and low efficiency
Third, about Linux
1, the main development process
In 1991, Linus Torvalds developed a new operating system for a new computer using the Intel 80386 microprocessor, and Linux was born.
2. Kernel
Linux is based on a single core
(1) Synthesis of micro-kernel essence-modular design, preemptive kernel, support kernel thread and dynamic load kernel module ability
(2) Avoid the drawbacks of micro-kernel-all things run in the kernel state, directly call the function, no message delivery
*linux kernel advances compared to traditional UNIX kernels:
(1) Support dynamic load kernel module
(2) Support for symmetric multi-processing (SMP)
(3) The kernel can be preempted, allowing the kernel to run tasks with the ability to prioritize execution
(4) Do not differentiate between threads and processes
3. Version
Linux is a Unix-like system, but it is not UNIX and does not use UNIX source code directly as other UNIX variants do. Linux is a collaborative development project on the Internet, and anyone can develop the kernel.
Linux kernel design and implementation chapter first to second study notes