You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
4.3 KiB

5 years ago
  1. SOS: A Simple Operating System
  2. This is SOS, a Simple Operating System for i386-family
  3. processors. This is as simple as possible to show a way to program a
  4. basic Operating System on real common hardware (PC). The code should
  5. be easily readable and understandable thanks to frequent comments, and
  6. references to external documentation. We chose to implement the basic
  7. features of an OS, thus making design decisions targetting towards
  8. simplicity of understanding, covering most of the OS classical
  9. concepts, but not aiming at proposing yet another full-fledged
  10. competitive OS (Linux is quite good at it). However, for those who
  11. would like to propose some enhancements, we are open to any code
  12. suggestions (patches only, please). And yes, there might be bugs in
  13. the code, so please send us any bug report, and/or patches !
  14. The OS comes as a set of articles (in french) to be published in the
  15. journal "Linux Magazine France". Each month, the part of the code
  16. related to the current article's theme is released (see VERSION file),
  17. and the resulting OS can be successfully compiled and run, by booting
  18. it from a floppy on a real machine (tested AMD k7, Cyrix and Intel P4
  19. pentiums), or through an x86 emulator (bochs or qemu). The resulting
  20. OS is available as a multiboot compliant ELF kernel (sos.elf) and as a
  21. floppy image (fd.img). It provides a very very very basic demo whose
  22. aim is to understand how everything works, not to animate sprites on
  23. the screen with 5:1 dolby sound.
  24. The initial technical features and lack-of-features of the OS are:
  25. - monolithic kernel, fully interruptible, non-preemptible (big kernel
  26. lock), target machines = i386 PC or better
  27. - compiles on any host where the gcc/binutils toolchain (target
  28. i586-gnu) is available. Can be tested on real i486/pentium
  29. hardware, or on any host that can run an i486/pentium PC emulator
  30. (bochs or qemu)
  31. - kernel loaded by grub, or by a sample bootsector (up to article 2
  32. ONLY)
  33. - clear separation of physical memory and virtual memory concepts,
  34. even inside the kernel: no identity-mapping of the physical memory
  35. inside the kernel (allows to move virtual mappings of kernel pages
  36. at run-time, eg to free ISA DMA pages, and to avercome the 4G RAM
  37. barrier)
  38. - slab-type kernel memory allocation
  39. - no swap, no reverse mapping
  40. - VERY simple drivers: keyboard, x86 video memory, IDE disks
  41. - logical devices: partitions, FAT filesystem, "hard-coded"
  42. mountpoints only (~ MSDOS)
  43. - no network stack
  44. - user-level features: ELF loader (no shared libraries), processes,
  45. user threads (kernel-level scheduling only), mmap API, basic VFS
  46. To understand where to look at for what, here is a brief description:
  47. - Makefile: the (ONLY) makefile of the OS. Targets are basically
  48. 'all' and 'clean'
  49. - bootstrap/ directory: code to load the kernel. Both the stuff
  50. needed for a multiboot-compliant loader (eg grub) AND a bootsector
  51. are provided. The bootsector may only be used up to article 2.
  52. - sos/ directory: the entry routine for the kernel (main.c), various
  53. systemwide header files, a set of common useful C routines
  54. ("nano-klibc"), and kernel subsystems (kernel memory management,
  55. etc...)
  56. - hwcore/ directory: Low-level CPU- and kernel-related routines
  57. (interrupt/exception management, translation tables and segment
  58. registers, ...)
  59. - drivers/ directory: basic kernel drivers for various (non CPU)
  60. devices (keyboard, x86 video memory, bochs 0xe9 port, ...). Used
  61. mainly for debugging
  62. - support/ directory: scripts and configuration files to build the
  63. floppy images
  64. - extra/ directory: a set of configuration files to be customized for
  65. non-x86 host installations (yes, we primarily develop SOS on a ppc, for
  66. the x86 target of course), or for grub-less installations. See
  67. README file in this directory.
  68. The code is licensed under the terms of the GNU GPL version 2 (see
  69. LICENSE file).
  70. Enjoy !
  71. David Decotigny, Thomas Petazzoni, the Kos team
  76. --
  77. David Decotigny
  78. PS: Made with a Mac.