Subversion Repositories HelenOS-doc

Rev

Rev 38 | Rev 40 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9 bondari 1
<?xml version="1.0" encoding="UTF-8"?>
39 bondari 2
<chapter id="architecture">
3
  <?dbhtml filename="arch.html"?>
9 bondari 4
 
39 bondari 5
  <title>Architecture overview</title>
37 bondari 6
 
39 bondari 7
  <section>
8
    <title>Scheme</title>
38 bondari 9
 
39 bondari 10
    <para><mediaobject id="arch1">
11
        <imageobject role="html">
12
          <imagedata fileref="images/arch1.png" format="PNG" />
13
        </imageobject>
38 bondari 14
 
39 bondari 15
        <imageobject role="fop">
16
          <imagedata fileref="images.vector/arch1.svg" format="SVG" />
17
        </imageobject>
18
      </mediaobject></para>
19
  </section>
38 bondari 20
 
39 bondari 21
  <section>
22
    <title>Kernel primitives</title>
38 bondari 23
 
39 bondari 24
    <para><termdef><glossterm>Thread</glossterm> is the basic execution
25
    primitive.</termdef></para>
38 bondari 26
 
39 bondari 27
    <para><termdef><glossterm>Thread context</glossterm> represents state of
28
    the <emphasis>thread</emphasis>. Thread context is built of the context
29
    registers contents, FPU state and the stack.</termdef></para>
37 bondari 30
 
39 bondari 31
    <para><termdef> <glossterm>Task</glossterm> is a multi-purpose entity,
32
    serving to <itemizedlist>
33
        <listitem>incorporate set if its threads</listitem>
37 bondari 34
 
39 bondari 35
        <listitem>provide common address space to its threads</listitem>
37 bondari 36
 
39 bondari 37
        <listitem>be an end-point in IPC</listitem>
38
      </itemizedlist> </termdef></para>
37 bondari 39
 
39 bondari 40
    <para><termdef> <glossterm>Address space area</glossterm> is a mutually
41
    disjunctive range of memory with the code, stack and data.
42
    </termdef></para>
37 bondari 43
 
39 bondari 44
    <para><termdef> <glossterm>Address space</glossterm> is a aggregating
45
    entity for address space areas, connecting them to the task.
46
    </termdef></para>
47
  </section>
37 bondari 48
 
39 bondari 49
  <section>
50
    <title>Monolithic microkernel</title>
37 bondari 51
 
39 bondari 52
    <para>Though HelenOS was initially planned as a microkernel, we were
53
    trying to avoid several issues, connected with microkernels, such as much
54
    higher overhead during memory management and hardware operations. For this
55
    reason some of the subsystems, that are to be implemented as servers in
56
    classic microkernel design, were implemented as a part of kernel, thus
57
    minimizing this overhead.</para>
37 bondari 58
 
39 bondari 59
    <formalpara>
60
      <title>Memory management</title>
38 bondari 61
 
39 bondari 62
      <para>Unlike the classic microkernel, HelenOS has all its memory
63
      management functionality in the kernel, available to the memory
64
      management server via the set of syscalls.</para>
65
    </formalpara>
38 bondari 66
 
39 bondari 67
    <formalpara>
68
      <title>Kernel device drivers</title>
9 bondari 69
 
39 bondari 70
      <para>HelenOS kernel has some of the very basic device drivers
71
      <itemizedlist>
72
          <listitem>
73
            ACPI
74
          </listitem>
75
 
76
          <listitem>
77
            APIC
78
          </listitem>
79
 
80
          <listitem>
81
            SMP configuration
82
          </listitem>
83
 
84
          <listitem>
85
            System clock
86
          </listitem>
87
 
88
          <listitem>
89
            Interrupt controllers
90
          </listitem>
91
 
92
          <listitem>
93
            Console
94
          </listitem>
95
 
96
          <listitem>
97
            VESA &amp; frame buffer
98
          </listitem>
99
        </itemizedlist></para>
100
    </formalpara>
101
  </section>
102
 
103
  <section>
104
    <title>IPC</title>
105
 
106
    <para>HelenOS IPC is designed in analogy with telephone communication.
107
    Each task has an <emphasis>answerbox</emphasis> and a set of
108
    <emphasis>phones</emphasis> to call another tasks' answerboxes.</para>
109
 
110
    <para>Communication is possible after the connection is established, and
111
    can be either <emphasis>asynchronious</emphasis> or
112
    <emphasis>synchronious</emphasis>.</para>
113
  </section>
114
 
115
  <section>
116
    <title>Functionality model</title>
117
 
118
    <para>As you know, microkernel design is very simple, just enough to
119
    provide communication facility for tasks. Most of the OS functionality is
120
    performed by server tasks, that are running in userspace. Thus most of the
121
    system calls in monolithic kernels, are the IPC calls on server tasks in
122
    microkernels.</para>
123
 
124
    <para>Moreover, problems experience the device drivers. Running in the
125
    user space, device driver still needs to recieve interrupts and access
126
    hardware directly.</para>
127
 
128
    <para>This raises two major problems in microkernels: <orderedlist
129
        numeration="loweralpha">
130
        <listitem>
131
          What is the recipient address of the server (e.g. "memory manager" or a specific device driver) ?
132
        </listitem>
133
 
134
        <listitem>
135
          How this server task is going to access hardware or kernel while running in the user mode?
136
        </listitem>
137
      </orderedlist></para>
138
 
139
    <formalpara id="intro_ns">
140
      <title>Name server</title>
141
 
142
      <para>As every microkernel, HelenOS has a "Name server" task with "well
143
      known" IPC address, that connects user task to any server just by the
144
      string service indentification.</para>
145
    </formalpara>
146
 
147
    <formalpara id="intro_ddi">
148
      <title>Device driver interface</title>
149
 
150
      <para>Device drivers use special syscalls to map physical memory areas
151
      into their address space, to map port regions (mostly ia32). Interrupts
152
      are delivered to the device driver task by the standard IPC
153
      means.</para>
154
    </formalpara>
155
  </section>
156
</chapter>