blob: fb665a986c91e0e05eac2ebcfe9a49b0c9c9e441 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Architecture of Linux Kernel | garhve's gibberish</title>
<link rel="shortcut icon" type="image/png" href="/images/favicon.png">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link id="stylesheet" rel="stylesheet" type="text/css" href="/dark.css">
<script type="text/javascript" src="/js/theme.js"></script>
</head>
<div class="header">
<div class="site_title">
<p><a href="/"><img src="https://blog.garhve.com/images/logo.ico" alt="garhve's gibberish"
width="70" height=auto></a></p>
<p><a href="/"> garhve's gibberish</a></p>
</div>
<div class="menu">
<!-- <a href="/tags">tags</a>
--><a href="/categories">categories</a>
</div>
</div>
<body onload="getTheme()">
<section class="section">
<div class="container">
<p>
<div class="title_postpage">Architecture of Linux Kernel</div>
</p>
<p>
<div class="date_postpage">2022-09-03</div>
<div class="taxonomies_postpage">
<a href="https://blog.garhve.com/categories/cs/">/cs</a>
 <a href="https://blog.garhve.com/tags/linux/">#linux</a>
</div>
</p>
<p>
<h2 id="description">Description</h2>
<p>Modern microcontrollers nowadays support at least two privilege levels. Intel/AMD x86-64 family supports 4 levels, whilst ARM (32bit) microcontrollers support up to 7 levels (6 privileged, 1 non-privileged).</p>
<p>Modern operating systems support at least 2 levels:</p>
<ul>
<li><strong>User space</strong>: For applications to run in unprivileged user mode</li>
<li><strong>Kernel space</strong>: For the kernel (and all its components) to run in privileged mode – kernel mode</li>
</ul>
<p>Address of these 2 spaces are separate.</p>
<p>Applications in user mode will auto-linked to glibc(the GNU standard C library). Libraries only available in user mode, kernel mode doesn't have this conception. An application only can through <strong>System call</strong> to access kernel. On the other hand, system calls are the only legal entry point into the kernel space.</p>
<blockquote>
<p>Libraries APIs: man section 3
System calls APIs: man section 2</p>
</blockquote>
<p>to be continue...</p>
</p>
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
</script>
<script type="text/javascript" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
</div>
</section>
</body>
<div class="footer">
 © garhve
</div>
</html>
|