What Order Should I Make Things In?: Difference between revisions
[unchecked revision] | [unchecked revision] |
(added 'Alta Lang') |
(Did some reformatting and grammar fixes.) |
||
Line 1: | Line 1: | ||
This is a question of style. You can start at the start and dig straight in, writing a bootsector, then a minimal kernel, and build from there. You could skip the bootsector, and use a ready-made bootloader like [[GRUB]] |
This is a question of style. You can start at the start and dig straight in, writing a bootsector, then a minimal kernel, and build from there. You could skip the bootsector, and use a ready-made bootloader like [[GRUB]] (it's open for discussion whether rolling your own [[Rolling Your Own Bootloader|bootloader]] is a valuable experience or a waste of time). You can also write bits and pieces in no specific order, and just put them together at the very end. There is probably no right or wrong way to go about doing it. If you would like an overview of things that are handy to get working (and are practically a must for every OS), you can keep on reading. |
||
There is probably no right or wrong way to go about doing it. |
|||
But still, if I do not know what to start with ... |
|||
== For the starter == |
== For the starter == |
||
⚫ | |||
# Having a working and reliable interrupt/exception handling system that can dump the contents of the registers (and perhaps the address of the fault) will be very useful. |
|||
# The heap: allocating memory at runtime ('''malloc''' and '''free''') is almost impossible to go without. It should be implemented as soon as possible. |
|||
⚫ | |||
⚫ | |||
# You are likely to make mistakes when going further, so having a working and (once again) reliable interrupt/exception handling system that can report you the address of the fault as well as the register contents will be a valuable help aswell. |
|||
# Having the opportunity to allocate memory at run-time (<tt>malloc()</tt>-like interface) for your kernel's internal structure will certainly come handy sooner or later. It is suggested you handle it soon. |
|||
⚫ | For instance, the GUI could depend on the filesystem to load bitmaps or resources, but you don't necessarily need bitmaps in your very first GUI. Good advice in such a case is to design the interface of the filesystem first (be it open/close/read/write or something else), and then go on with whatever you prefer, respecting the interface on both sides. |
||
⚫ | |||
⚫ | For instance, the GUI could depend on the filesystem to load bitmaps, but you don't necessarily need bitmaps in your very first GUI |
||
== Style Extremes == |
== Style Extremes == |
||
OSDev seems to have "archetypes" among the OSDevvers (and the OS they develop). Of course, the idea that most people have of a "complete" kernel includes most (if not all) of the items listed below. |
|||
Operating system development seems to have "archetypes" though, among the OSdevers (and OS they develop). Of course a completed kernel is a bit of each presented here. |
|||
=== Lino Commando === |
=== Lino Commando === |
||
{{main|Lino Commando}} |
{{main|Lino Commando}} |
||
He's been impressed by the "naked beauty" of DOS times. The first thing he wants to |
He's been impressed by the "naked beauty" of DOS times. The first thing he wants to have is a blinking cursor after a ">" symbol so that he can type commands. No matter if there's no way to start two programs at the same time: he just needs a text editor and a filesystem driver. |
||
=== NICk Stacky === |
=== NICk Stacky === |
||
{{main|Nick Stacky}} |
{{main|Nick Stacky}} |
||
His test-machine has no keyboard and no screen |
His test-machine has no keyboard and no screen (no one needs that). All he needs is NICs (Network Interface Cards) ... plenty of NIC's ... and an ethernet cable to see if his kernel responds to pings and routes packets correctly. His kernel has powerful multithreading and a complete TCP/IP stack, of course. |
||
=== James T. Klik === |
=== James T. Klik === |
||
{{main|James T. Klik}} |
{{main|James T. Klik}} |
||
Look through the window |
Look through the window: see that background with alpha-blending and the anti-aliased fonts? See the corner of the screen? That's Klik's start menu! Hmm, no: I have no so-called 'programs' folder, as I can't load any applications for now, but here's a 16-items list of test cases for my WidgetToolKit. |
||
=== Eleanore Semaphore === |
=== Eleanore Semaphore === |
||
{{main|Eleanore Semaphore}} |
{{main|Eleanore Semaphore}} |
||
Works in a |
Works in a dark corner of a small room with listings all around. Her system has much evolved since last year, though all she can show you is still the same: bunches of A's and B's displayed in no obvious order on a text console that she controls with magic key combinations. You hear her talking about how she implemented component programming, auto-dependency-resolving and a virtual clock algorithm for her scheduler. |
||
=== Alta Lang === |
=== Alta Lang === |
||
{{main|Alta Lang}} |
{{main|Alta Lang}} |
||
Why would anyone want to write something as complex as an operating system in something as clunky and old as C? Alta wants something different for her system |
Why would anyone want to write something as complex as an operating system in something as clunky and old as C? Alta wants something different for her system: a new language for a more elegant operating system. She spends at least as much time on language design as on system design, in the hopes that if she can design the language to be clean enough and powerful enough, the system will simply fall into place. |
||
[[Category:FAQ]] |
[[Category:FAQ]] |
Revision as of 14:13, 1 May 2010
This is a question of style. You can start at the start and dig straight in, writing a bootsector, then a minimal kernel, and build from there. You could skip the bootsector, and use a ready-made bootloader like GRUB (it's open for discussion whether rolling your own bootloader is a valuable experience or a waste of time). You can also write bits and pieces in no specific order, and just put them together at the very end. There is probably no right or wrong way to go about doing it. If you would like an overview of things that are handy to get working (and are practically a must for every OS), you can keep on reading.
For the starter
- Printing strings and integer numbers (both decimal and hex) on the screen is certainly a must. This is one of most basic ways of debugging, and virtually all of us have gone through a kprint() or kout in version 0.01.
- Having a working and reliable interrupt/exception handling system that can dump the contents of the registers (and perhaps the address of the fault) will be very useful.
- The heap: allocating memory at runtime (malloc and free) is almost impossible to go without. It should be implemented as soon as possible.
Once those steps are completed, whether you'll try to have a working GUI before you have a filesystem, multitasking or module-loading is completely up to you. Try to sketch out what is likely to depend on what, and do things in 'least dependent first' order.
For instance, the GUI could depend on the filesystem to load bitmaps or resources, but you don't necessarily need bitmaps in your very first GUI. Good advice in such a case is to design the interface of the filesystem first (be it open/close/read/write or something else), and then go on with whatever you prefer, respecting the interface on both sides.
Style Extremes
OSDev seems to have "archetypes" among the OSDevvers (and the OS they develop). Of course, the idea that most people have of a "complete" kernel includes most (if not all) of the items listed below.
Lino Commando
- Main article: Lino Commando
He's been impressed by the "naked beauty" of DOS times. The first thing he wants to have is a blinking cursor after a ">" symbol so that he can type commands. No matter if there's no way to start two programs at the same time: he just needs a text editor and a filesystem driver.
NICk Stacky
- Main article: Nick Stacky
His test-machine has no keyboard and no screen (no one needs that). All he needs is NICs (Network Interface Cards) ... plenty of NIC's ... and an ethernet cable to see if his kernel responds to pings and routes packets correctly. His kernel has powerful multithreading and a complete TCP/IP stack, of course.
James T. Klik
- Main article: James T. Klik
Look through the window: see that background with alpha-blending and the anti-aliased fonts? See the corner of the screen? That's Klik's start menu! Hmm, no: I have no so-called 'programs' folder, as I can't load any applications for now, but here's a 16-items list of test cases for my WidgetToolKit.
Eleanore Semaphore
- Main article: Eleanore Semaphore
Works in a dark corner of a small room with listings all around. Her system has much evolved since last year, though all she can show you is still the same: bunches of A's and B's displayed in no obvious order on a text console that she controls with magic key combinations. You hear her talking about how she implemented component programming, auto-dependency-resolving and a virtual clock algorithm for her scheduler.
Alta Lang
- Main article: Alta Lang
Why would anyone want to write something as complex as an operating system in something as clunky and old as C? Alta wants something different for her system: a new language for a more elegant operating system. She spends at least as much time on language design as on system design, in the hopes that if she can design the language to be clean enough and powerful enough, the system will simply fall into place.