Subversion Repositories HelenOS-doc

Rev

Rev 27 | Rev 38 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27 Rev 37
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
 
2
 
3
<chapter id="architecture"><?dbhtml filename="arch.html"?>
3
<chapter id="architecture"><?dbhtml filename="arch.html"?>
4
    <title>Architecture overview</title>
4
    <title>Architecture overview</title>
5
    <section>
5
    <section>
6
        <title>Scheme</title>
6
        <title>Scheme</title>
7
        <para>
7
        <para>
8
            <mediaobject id="arch1">
8
            <mediaobject id="arch1">
9
                <imageobject role="html">
9
                <imageobject role="html">
10
                    <imagedata format="PNG" fileref="images/arch1.png"/>
10
                    <imagedata format="PNG" fileref="images/arch1.png"/>
11
                </imageobject>
11
                </imageobject>
12
               
12
               
13
                <imageobject role="fop">
13
                <imageobject role="fop">
14
                    <imagedata format="SVG" fileref="images.vector/arch1.svg" />
14
                    <imagedata format="SVG" fileref="images.vector/arch1.svg" />
15
                </imageobject>
15
                </imageobject>
16
            </mediaobject>
16
            </mediaobject>
17
        </para>
17
        </para>
18
    </section>
18
    </section>
-
 
19
 
-
 
20
    <section>
-
 
21
        <title>Monolithic microkernel</title>
-
 
22
        <para>
-
 
23
            Though HelenOS was initially planned as a microkernel, we where trying to avoid several issues, connected
-
 
24
            with microkernels, such as much higher overhead during memory management and hardware operations. For this reason
-
 
25
            some of the subsytems, that are to be implmented as servers in classic microkernel design, where implemented
-
 
26
            as a part of kernel, thus minimizing this overhead.
-
 
27
        </para>
-
 
28
 
-
 
29
        <formalpara>
-
 
30
        <title>Memory management</title>
-
 
31
        <para>
-
 
32
            Unlike the classic microkernel, HelenOS has all its memory management functionality in the kernel, available to the memory
-
 
33
            management server via the set of syscalls.
-
 
34
        </para>
-
 
35
        </formalpara>
-
 
36
 
-
 
37
        <formalpara>
-
 
38
        <title>Kernel device drivers</title>
-
 
39
        <para>
-
 
40
            HelenOS kernel has some of the very basic device drivers
-
 
41
            <itemizedlist>
-
 
42
            <listitem>ACPI</listitem>
-
 
43
            <listitem>APIC</listitem>
-
 
44
            <listitem>SMP configuration</listitem>
-
 
45
            <listitem>System clock</listitem>
-
 
46
            <listitem>Interrupt controllers</listitem>
-
 
47
            <listitem>Console</listitem>
-
 
48
            <listitem>VESA &amp; frame buffer</listitem>
-
 
49
            </itemizedlist>
-
 
50
 
-
 
51
        </para>
-
 
52
        </formalpara>
-
 
53
 
-
 
54
    </section>
-
 
55
 
-
 
56
    <section>
-
 
57
        <title>Kernel primitives</title>
-
 
58
        <para>
-
 
59
        <termdef><glossterm>Thread</glossterm> is the basic execution primitive.</termdef>
-
 
60
        </para>
-
 
61
 
-
 
62
        <para>
-
 
63
        <termdef><glossterm>Thread context</glossterm> represents state of the <emphasis>thread</emphasis>. Contains registers state, FPU state, stack(s).</termdef>
-
 
64
        </para>
-
 
65
 
-
 
66
        <para>
-
 
67
        <termdef><glossterm>Task</glossterm> </termdef>
-
 
68
        </para>
-
 
69
 
-
 
70
           
-
 
71
        <para>
-
 
72
        <termdef>
-
 
73
            <glossterm>Address space area</glossterm> is a mutually disjunctive range of memory with the code, stack and data.
-
 
74
        </termdef>
-
 
75
        </para>
-
 
76
 
-
 
77
        <para>
-
 
78
        <termdef>
-
 
79
            <glossterm>Address space</glossterm> is a aggregating entity for address space areas, connecting them to the task.
-
 
80
        </termdef>
-
 
81
        </para>             1
-
 
82
    </section>
-
 
83
 
-
 
84
 
-
 
85
 
-
 
86
    <section>
-
 
87
        <title>IPC</title>
-
 
88
 
-
 
89
        <para>
-
 
90
            Due to the high intertask communication traffic, IPC becomes critical subsystem for microkernels, putting high demands on the
-
 
91
            speed, latency and reliability of IPC model and implementation. HelenOS IPC is designed in analogy with telephone communication.
-
 
92
            Each task has an <emphasis>answerbox</emphasis> and a set of <emphasis>phones</emphasis> to call another tasks' answerboxes. Communication
-
 
93
            is possible after the link establishment, and can be either <emphasis>asynchronious</emphasis> or <emphasis>synchronious</emphasis>.
-
 
94
         </para>
-
 
95
 
-
 
96
    </section>
-
 
97
 
-
 
98
 
19
    <section>
99
    <section>
20
        <title>Task</title>
-
 
21
        <para>Task ID - unique 64 bit number. Used for syscalls.</para>
100
        <para>Task ID - unique 64 bit number. Used for syscalls.</para>
22
        <para>Contains threads</para>
101
        <para>Contains threads</para>
23
        <para>Address space is created per task</para>
102
        <para>Address space is created per task</para>
24
        <para>Memory mapping is per task</para>
103
        <para>Memory mapping is per task</para>
25
        <para>Context per thread. (Note 2 stacks on IA64).</para>
104
        <para>Context per thread. (Note 2 stacks on IA64).</para>
26
        <para>IPC answer box associated per task</para>
105
        <para>IPC answer box associated per task</para>
27
    </section>
106
 
28
    <section>
107
 
29
        <title>Memory management</title>
108
        <title>Memory management</title>
30
        <para>
109
        <para>
31
        Zones - linked list (not many zones, so we can afford it. Can be replaced with B-tree in the future)
110
        Zones - linked list (not many zones, so we can afford it. Can be replaced with B-tree in the future)
32
        Number of zones depends on HW tables. Describe zone allocation/deallocation algoritm
111
        Number of zones depends on HW tables. Describe zone allocation/deallocation algoritm
33
        </para>
112
        </para>
34
        <para>Page tables. 4 level hierarchical and hash directly supported. B+ Tree can be implemented.</para>
113
        <para>Page tables. 4 level hierarchical and hash directly supported. B+ Tree can be implemented.</para>
35
        <para>For paging there is an abstract layer</para>
114
        <para>For paging there is an abstract layer</para>
36
        <para>TLB shootdown implementation (update TLB upon mapping update/remove).
115
        <para>TLB shootdown implementation (update TLB upon mapping update/remove).
37
        TLB shootdown ASID/ASID:PAGE/ALL.
116
        TLB shootdown ASID/ASID:PAGE/ALL.
38
        TLB shootdown requests can come in asynchroniously
117
        TLB shootdown requests can come in asynchroniously
39
        so there is a cache of TLB shootdown requests. Upon cache overflow TLB shootdown ALL is executed</para>
118
        so there is a cache of TLB shootdown requests. Upon cache overflow TLB shootdown ALL is executed</para>
40
       
119
       
41
        <para>
120
        <para>
42
            Address spaces. Address space area (B+ tree). Only for uspace. Set of syscalls (shrink/extend etc).
121
            Address spaces. Address space area (B+ tree). Only for uspace. Set of syscalls (shrink/extend etc).
43
            Special address space area type - device - prohibits shrink/extend syscalls to call on it.
122
            Special address space area type - device - prohibits shrink/extend syscalls to call on it.
44
            Address space has link to mapping tables (hierarchical - per Address space, hash - global tables).
123
            Address space has link to mapping tables (hierarchical - per Address space, hash - global tables).
45
        </para>
124
        </para>
46
    </section>
125
    </section>
47
</chapter>
126
</chapter>
48
 
127
 
49
 
128