mirror of
https://github.com/0xAX/linux-insides.git
synced 2024-12-22 06:38:07 +00:00
...and the last images fixed
Patch 7: SysCall/, Theory/ and Timers/
This commit is contained in:
parent
fd8281da5c
commit
e67179a2f6
BIN
SysCall/images/ls_shell.png
Normal file
BIN
SysCall/images/ls_shell.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 469 KiB |
@ -20,7 +20,7 @@ There are many different ways to launch an application from a user perspective.
|
||||
|
||||
In this part we will consider the way when we just launch an application from the shell. As you know, the standard way to launch an application from shell is the following: We just launch a [terminal emulator](https://en.wikipedia.org/wiki/Terminal_emulator) application and just write the name of the program and pass or not arguments to our program, for example:
|
||||
|
||||
![ls shell](http://i66.tinypic.com/214w6so.jpg)
|
||||
![ls shell](images/ls_shell.png)
|
||||
|
||||
Let's consider what does occur when we launch an application from the shell, what does shell do when we write program name, what does Linux kernel do etc. But before we will start to consider these interesting things, I want to warn that this book is about the Linux kernel. That's why we will see Linux kernel insides related stuff mostly in this part. We will not consider in details what does shell do, we will not consider complex cases, for example subshells etc.
|
||||
|
||||
|
BIN
Theory/images/4_level_paging.png
Normal file
BIN
Theory/images/4_level_paging.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
@ -93,7 +93,7 @@ The linear address translation is following:
|
||||
|
||||
schematically, we can imagine it like this:
|
||||
|
||||
![4-level paging](http://oi58.tinypic.com/207mb0x.jpg)
|
||||
![4-level paging](images/4_level_paging.png)
|
||||
|
||||
Every access to a linear address is either a supervisor-mode access or a user-mode access. This access is determined by the `CPL` (current privilege level). If `CPL < 3` it is a supervisor mode access level, otherwise it is a user mode access level. For example, the top level page table entry contains access bits and has the following structure (See [arch/x86/include/asm/pgtable_types.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/arch/x86/include/asm/pgtable_types.h) for the bit offset definitions):
|
||||
|
||||
|
BIN
Timers/images/HZ.png
Normal file
BIN
Timers/images/HZ.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 444 KiB |
BIN
Timers/images/base_small.png
Normal file
BIN
Timers/images/base_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 808 KiB |
@ -259,7 +259,7 @@ The `jiffies` clock source uses the `NSEC_PER_JIFFY` multiplier conversion to sp
|
||||
|
||||
Where `CONFIG_HZ` can be one of the following values:
|
||||
|
||||
![HZ](http://i63.tinypic.com/v8d6ph.png)
|
||||
![HZ](images/HZ.png)
|
||||
|
||||
This means that in our case the timer interrupt frequency is `250 HZ` or occurs `250` times per second or one timer interrupt each `4ms`.
|
||||
|
||||
|
@ -117,7 +117,7 @@ struct tvec_root {
|
||||
|
||||
type. Note that the value of the `TVR_SIZE` depends on the `CONFIG_BASE_SMALL` kernel configuration option:
|
||||
|
||||
![base small](http://i68.tinypic.com/aylkt2.png)
|
||||
![base small](images/base_small.png)
|
||||
|
||||
that reduces size of the kernel data structures if disabled. The `v1` is array that may contain `64` or `256` elements where an each element represents a dynamic timer that will decay within the next `255` system timer interrupts. Next three fields: `tv2`, `tv3` and `tv4` are lists with dynamic timers too, but they store dynamic timers which will decay the next `2^14 - 1`, `2^20 - 1` and `2^26` respectively. The last `tv5` field represents list which stores dynamic timers with a large expiring period.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user