The analysis of an operating system is a very huge project, and the operating system is like a human
People, every module wants to make full use of its functions, it is very likely that many modules are supported to achieve. Institute
In order to analyze minix3, I think it is good to understand multiple modules at the same time.
It is not because minix3 adopts a micro-kernel structure, which causes a large obstacle to reading the source code.
In my guidance, I will describe the contents of minix3 and PM to provide readers with an overall
Guidance framework:
1. minix3 adopts a micro-kernel structure. What is a micro-kernel? The minix3 designer believes that
It is often important to implement the interrupt mechanism, message mechanism, and protection mode mechanism, which must be executed in the kernel,
Other modules are placed in the User Module for execution. This design idea may be different from Linux/Unix.
Big difference: Linux is used as an example. liunx will drive, process management, memory management, interrupt, and message
Mechanism and so on are put in the kernel, which causes the Linux kernel to be very huge. The minix3 designer
I believe that the larger the kernel, the higher the possibility of being insecure. I am not sure about this, but I believe it.
The larger the kernel, the larger the maintenance. As the kernel continues to expand, it brings great difficulties to the kernel maintainer.
How does minix3 implement this microkernel mechanism? Minix3 uses a very clever method: ------ message
Transfer mechanism. The message transmission mechanism is used to realize the communication between the kernel and the external core.
The message transmission mechanism can also be implemented through a very complex layout. For details about the message transmission mechanism, refer to the process
Inter-communication module analysis chapter.
2. How does minix3 implement the interrupt mechanism? In order to be compatible with 8259, minix3 has set up a lot of Editing
Process skills to complete the entire interrupt mechanism, for the interruption into, interrupted execution, and the end of the interrupted work,
All reflect the excellent design ideas of minix3 ------- concise and skillful. For details about the kernel, refer to minix3.
Interrupt Processing Analysis
3 if minix3 can run on the 386 platform, the 386 historical burden must be tolerated. Minix3 cleverly saves some complicated work. 386 is controlled in a simple mode. For details, refer to the minix3 protection mode analysis.
4 clock is a core component of the entire minix3. In fact, the clock is used for all time-sharing operations.
At the heart of system operation, how does minix3 enable efficient and secure clock operation? Why
To handle multiple kernel alarms? For details, refer to the minix3 kernel clock Analysis
Chapter
5. Process Scheduling plays the most important role in responding to the entire system. Minix3 is simple and compact in process scheduling, and the scheduling algorithm takes a very small amount of time, but it can be efficiently executed. How does minix3 implement it?
For details, refer to the process scheduling analysis chapter of minix3.
6. You want the operating system to help you complete a task. For example, if you want the operating system to tell me how long it will take, or I want to request the operating system kernel to apply for a piece of memory, which involves system calls. In fact, the system calls of minix3 are different from those of Linux, this is mainly because of the micro-kernel. What is the difference? How can we understand this difference and how can we implement system calls for minix3? For details, refer to the chapter on System Call Analysis of minix3.
7. The user wants the operating system to provide a semaphore mechanism to Implement Asynchronous process.
PM and kernel work together to skillfully implement the minix3 semaphore mechanism. Here we mainly refer to the minix3 semaphore mechanism.
8. Who handles the user's alarm call? Is it the previous minix3 kernel clock? Possible
You have noticed that the kernel is added before the clock, so there should also be an external core clock! Yes, you can guess. There is indeed an external kernel clock, but there is only one hardware clock. What kind of machine is used by minix3?
To implement the kernel and external core clock? For details, refer to minix3pm clock analysis and minix3
Core clock analysis.
9 through the steps 1 to 8 above, you may think that the entire minix3 was broken up by me. We should not integrate minix3, using quantitative or qualitative techniques to analyze the performance of minix3, of course, this analysis is just an attempt to make a precise analysis, which is completely beyond the scope of my capabilities. I just provide my ideas. For details, refer to the overall performance analysis of minix3.
Minix3 guidance Analysis