Changes between Version 9 and Version 10 of Tutorial


Ignore:
Timestamp:
2014-12-18T19:32:24Z (9 years ago)
Author:
Martin Decky
Comment:

final touches

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial

    v9 v10  
    11= What is HelenOS =
    22
    3 HelenOS is a portable general-purpose operating system designed and implemented from scratch. It is based on microkernel multiserver design principles. This means that the kernel of the system has relatively limited responsibilities (mostly just memory and resource management, scheduling of threads and facilitating communication between user space tasks) and most of the core system functionality is implemented in user space (including for example device and file system drivers). The core system functionality is decomposed into individual, isolated, intensively communicating and mostly simple user space tasks. This orthogonal decomposition of concerns follows the concepts of component-based software engineering. You can learn more about HelenOS in our [wiki:FAQ FAQ].
     3[http://www.helenos.org/ HelenOS] is a portable general-purpose operating system designed and implemented from scratch. It is based on microkernel multiserver design principles. This means that the kernel of the system has relatively limited responsibilities (mostly just memory and resource management, scheduling of threads and facilitating communication between user space tasks) and most of the core system functionality is implemented in user space (including for example device and file system drivers). The core system functionality is decomposed into individual, isolated, intensively communicating and mostly simple user space tasks. This orthogonal decomposition of concerns follows the concepts of component-based software engineering. You can learn more about HelenOS in our [wiki:FAQ FAQ].
    44
    55The HelenOS project has been in constant development since 2005 (with earlier prototypes even predating its official inception), but the development team is rather small and its manpower is limited. Therefore HelenOS is still not a drop-in replacement for mature operating systems such as GNU/Linux. It simply lacks some end-user features of a desktop operating systems. But it is an excellent research, experimenting and prototyping tool, also thanks to a well-documented and readable code. Over the years, many contributions to HelenOS were done by university students in the context of their bachelor/master theses or programs such as [wiki:GSOC Google Summer of Code] and [report:20 ESA Summer of Code in Space]. This also demonstrates the friendly learning curve of HelenOS.
    66
    7 As for the features, HelenOS currently supports [wiki:HardwareSupport 7 hardware architectures] (in most cases on actual hardware, not just in emulators) from a single portable code base. HelenOS has support for SMP, textual and graphical user interface (a composing window manager), IPv4 and IPv6 networking (including drivers for several ethernet cards), USB bus and USB devices, PATA and SATA disk drives, sound (including drivers for Sound Blaster 16 and Intel HD Audio) and more.
     7As for the features, HelenOS currently supports [wiki:HardwareSupport 7 hardware architectures] (in most cases on actual hardware, not just in emulators) from a single portable code base. HelenOS has support for SMP, textual and graphical user interface (a compositing window manager), multiple file system types (ext4, FAT, exFAT, ISO 9660, UDF, etc.), IPv4 and IPv6 networking (including drivers for several NICs), USB bus and USB devices, PATA and SATA disk drives, sound (including drivers for Sound Blaster 16 and Intel HD Audio) and more.
    88
    99This is a brief step-by-step tutorial for running HelenOS in QEMU and experiencing some of its features. There is also a [wiki:UsersGuide more comprehensive guide] and an [wiki: entire wiki] with various user and developer resources.
     
    1111= How to Run HelenOS in QEMU =
    1212
    13 Assuming you have downloaded the x86-64 ISO image called `HelenOS-0.6.0-rc3-amd64.iso`, you can use the following QEMU command line to run it:
     13Assuming you have downloaded the x86-64 ISO image called `HelenOS-0.6.0-rc3-amd64.iso`, you can use the following [http://www.qemu.org/ QEMU] command line to run it:
    1414
    1515{{{
     
    3434== The Boot Process ==
    3535
    36 HelenOS for x86-64 uses the GRUB boot loader to boot the kernel and a few initial user space tasks that are required to bring the system up. A RAM disk containing the root file system is also loaded by GRUB. During HelenOS bootstrap you can see some log entries, either from the kernel or from the user space tasks as they are started and initialized. After a while the user space GUI compositor should take over the screen and you should see three windows. At that time, there are more than 35 user space tasks already running in the system and providing its functionality.
     36HelenOS for x86-64 uses the [http://www.gnu.org/software/grub/ GRUB boot loader] to boot the kernel and load a few initial user space tasks that are required to bring the system up. A RAM disk containing the root file system is also loaded by GRUB. During HelenOS bootstrap you can see some log entries, either from the kernel or from the user space tasks as they are started and initialized. After a while the user space GUI compositor should take over the screen and you should see three windows. At that time, there are more than 35 user space tasks already running in the system and providing its functionality.
    3737
    3838== The First Steps ==
    3939
    40 The window titled `vterm` is a terminal window where you can run commands via a command line. The terminal window is running a `bdsh` (Brain Dead Shell, named so because of its simplicity). The `vlaunch` window demonstrates some other widgets of our GUI framework and it also allows you to run another instance of `vterm`. The untitled window in the right-bottom corner of the screen is a simple liveness indicator.
     40The window titled `vterm` is a terminal where you can run commands via a command line. The terminal is running a `bdsh` (Brain Dead Shell, named so because of its simplicity). The `vlaunch` window demonstrates some other widgets of our GUI framework and it also allows you to run another instance of `vterm`. The untitled window in the right-bottom corner of the screen is a simple liveness indicator.
    4141
    42 The GUI is rather simple, but it supports the common window manipulations using the mouse. You can move the windows around by dragging the window title, you can switch window focus by clicking on them, etc. But the GUI is more capable than just that. It uses a '''composing desktop''' and therefore you can use the following hot-keys to manipulate the focused window in more fancy ways:
     42The GUI is rather simple, but it supports the common window manipulations using the mouse. You can move the windows around by dragging the window title, you can switch the focus by clicking on the windows, etc. But the GUI is more capable than just that. It uses a '''desktop compositor''' and therefore you can use the following hot-keys to manipulate the focused window in more fancy ways:
    4343
    4444||= '''Key''' =||= '''Action''' =||
     
    4646|| Alt + C, Alt + V || Window opacity (more transparent, more opaque) ||
    4747
    48 Once you get bored by this, just run `tetris` from the terminal window. This should make you occupied for some time.
     48Once you get bored by this, just run `tetris` from the terminal window. This should make you occupied for some time :)
    4949
    50 The shell supports some basic commands you are likely familiar with: `ls`, `cat`, `cd`, `pwd`, `cp`, `mv`, `rm`, `mkdir`, `echo`, etc. If you get totally lost, just run the `help` command to give you some hints. You can use `help commands` to list the internal commands of the shell and `help help` to get more information on how the help system works. The shell provides commands history (Up and Down keys), tab completion and [wiki:TextEditing clipboard integration] (Shift + Left and Shift + Right keys to select, Ctrl + C and Ctrl + V to copy and paste).
     50The shell supports some basic commands you are likely familiar with: `ls`, `cat`, `cd`, `pwd`, `cp`, `mv`, `rm`, `mkdir`, `echo`, etc. If you get totally lost, just run the `help` command to give you some hints. You can use `help commands` to list the internal commands of the shell and `help help` to get more information on how the help system works. The shell provides commands history (Up and Down keys), tab completion and [wiki:UsersGuide/TextEditing clipboard integration] (Shift + Left and Shift + Right keys to select, Ctrl + C and Ctrl + V to copy and paste).
    5151
    52 There is also support for different keyboard layouts. You can switch between three sample layouts using:
     52There is also a basiv support for different keyboard layouts. You can switch between three sample layouts using:
    5353
    5454||= '''Key''' =||= '''Layout''' =||
     
    5959== Cool Stuff ==
    6060
    61 A brief list of quick and interesting things to do in HelenOS. We assume you have used the suggested QEMU command line, otherwise your mileage may vary. Just run these commands in the terminal window:
     61This is a brief list of quick and interesting things to do in HelenOS. We assume you have used the suggested QEMU command line to run HelenOS, otherwise your mileage may vary. Simply run these commands in the terminal window:
    6262
    6363* `ping 127.0.0.1`
     
    6868  - Try to resolve the IP address of google.com. You can use the arguments `-4` and `-6` to specifically ask for an IPv4 or IPv6 address.
    6969* `websrv -p 8080`
    70   - Start a web server on port 8080. You can then type the URL `http://localhost:8080` in your browser in your host system and see what happens.
     70  - Start a web server on port 8080. You can then go to the URL [http://localhost:8080] in your browser in your host system and see what happens.
    7171* `wavplay demo.wav`
    7272  - Play a sample sound file.
    7373* `modplay demo.xm`
    74   - Play an XM module file. The pitch of some of the notes is not correct because the player does not implement all the FastTracker II effects yet.
     74  - Play a sample XM module file. The pitch of some of the notes is not correct because the player does not implement all the FastTracker II effects yet.
    7575* `edit demo.txt`
    76   - Run a simple [wiki:UsersGuide/Editor text editor] to edit some UTF-8 text file. The entire system uses UTF-8 to store character strings and texts, although the terminal font does not support all Unicode glyphs.
     76  - Run a simple [wiki:UsersGuide/Editor text editor] to edit a sample UTF-8 text file. The entire HelenOS uses UTF-8 to store character strings and texts, although the terminal font does not support all Unicode glyphs.
    7777* `loc`
    78   - Display the location service entries (mostly hardware devices).
     78  - Display the location service entries (mostly hardware devices known to the system).
    7979* `nic`
    80   - Display network interface cards.
     80  - List the network interface cards.
    8181* `inet`
    82   - Display network configuration.
     82  - Display the network configuration.
    8383* `usbinfo --list`
    84   - Display connected USB devices.
     84  - List the connected USB devices.
    8585* `top`
    86   - Display current running tasks, CPU and memory utilization and other system statistics.
     86  - List currently running tasks, display CPU and memory utilization and other system statistics.
    8787* `tetris`
    8888  - Play tetris.
     
    9898== Advanced: Development and Testing ==
    9999
    100 Because of the ongoing development, HelenOS changes rapidly and needs to be tested and debugged. For the most fundamental debugging you can switch to the kernel console using the `kcon` command. Note that the kernel console brutally violate the microkernel design principles, but it was never meant to be part of a production system. It is just a debugging tool. Also note that the user space is not aware of the kernel console and therefore the user space graphic output might sometimes overwrite the kernel output.
     100Because of the ongoing development, HelenOS changes rapidly and needs to be tested and debugged. For the most fundamental debugging you can switch to the kernel console using the `kcon` command. Note that the kernel console brutally violates the microkernel design principles, but it was never meant to be a part of a production system. It is just a debugging tool. Also note that the user space is not aware of the kernel console and therefore the user space GUI output might sometimes overwrite the kernel output.
    101101
    102102You can use the Page Up and Page Down keys to scroll back in the kernel console output. Some of the more commonly used commands of the kernel console are:
     
    124124
    125125* `stats`
    126   - Print the running tasks.
     126  - List the running tasks.
    127127* `trace`
    128   - Trace the execution of a task. You can examine thread creation/termination, kernel syscalls and task communication (either on the level of basic messages or on the protocol level).
     128  - Trace the execution of a task. You can trace thread creation/termination, kernel syscalls and task communication (either on the level of basic messages or on the protocol level).
    129129* `taskdump`
    130   - Create a core dump of a task for later examination. A core dump is also created automatically if a task crashes.
     130  - Create a core dump of a task for later examination. A core dump can be also created automatically if a task crashes.
    131131* `tester`
    132   - Run tests that test various parts of the HelenOS system.
     132  - Run tests that test various features of HelenOS.
    133133* `redir`
    134134  - Redirect the standard/error output of a task to a file for later examination.