ZealOS/docs/Doc/Strategy.DD.html

100 lines
7.6 KiB
HTML
Raw Permalink Normal View History

2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
2021-12-11 11:10:58 +00:00
<meta name="generator" content="ZealOS V1.07">
2021-07-03 05:07:57 +01:00
<style type="text/css">
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
2021-07-03 05:07:57 +01:00
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF5> Decisions Making ZealOS Simple
2021-07-03 05:07:57 +01:00
<a name="l2"></a></span><span class=cF0>
<a name="l3"></a>Linux is a semi-tractor -- you need professional drivers for 20 gears. Linux has file permissions. Common people are hurt by
<a name="l4"></a>file permissions.
<a name="l5"></a>
<a name="l6"></a>Windows is a car.
<a name="l7"></a>
<a name="l8"></a>ZealOS is a motorcycle -- if you lean-over too far, a motorcycle will crash. Don't do that! There are no side air bags on
<a name="l9"></a>a motorcycle. DOS and C64 had no memory protections and ran in ring-0, with no security. This saves an order of magnitude
2021-07-03 05:07:57 +01:00
<a name="l10"></a>complexity.
<a name="l11"></a>
<a name="l12"></a>Linux and Windows are general purpose operating systems. They attempt to do any task you want. ZealOS cherry-picks tasks
<a name="l13"></a>and is designed to do the same things a C64 did. This saves and order of magnitude complexity. For example, the </span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/RedSea.DD.html#l1"><span class=cF4>RedSea</span></a><span class=cF0> file
<a name="l14"></a>system allocates just contiguous files -- you load and save whole files at once. Also, ZealOS does not do multimedia. In
<a name="l15"></a>theory, memory will fragment with lots of big files. The system would fall to pieces with multimedia.
<a name="l16"></a>
<a name="l17"></a>A three button mouse is like a leg you cannot put weight on. ZealOS just does hardware everybody has, with no divergent
<a name="l18"></a>code bases for each machine's custom hardware. There is one graphics driver instead of 50 for different GPUs. This saves an
<a name="l19"></a>order of magnitude complexity and makes for a delightful API, so developer's code is not like a frayed rope end.
<a name="l20"></a>
2021-07-03 05:07:57 +01:00
<a name="l21"></a>
<a name="l22"></a>
<a name="l23"></a>* Everything runs in kernel, </span><span class=cF2>ring 0</span><span class=cF0>, mode.
<a name="l24"></a>
<a name="l25"></a>* </span><span class=cF2>One memory map</span><span class=cF0> for all tasks on all cores with virtual addresses set equal to physical, just as though paging is not used.
<a name="l26"></a>
<a name="l27"></a>* One platform -- </span><a href="http://en.wikipedia.org/wiki/Amd64#AMD64"><span class=cF4>x86_64</span></a><span class=cF0> PC's, no 32-bit support.
<a name="l28"></a>
<a name="l29"></a>* No security or cryptography.
<a name="l30"></a>
<a name="l31"></a>* Least (greatest) common denominator hardware support. Mostly, one driver for each device class. We can't be in the
<a name="l32"></a>business of different drivers. Compatibility is the greatest challenge for PC operating systems. Disk code does not use
<a name="l33"></a>interrupts, avoiding compatibility risks. </span><span class=cF2>PS/2</span><span class=cF0> keyboard/mouse is used instead of </span><span class=cF2>USB</span><span class=cF0>, also more compatible.
<a name="l34"></a>
<a name="l35"></a>* Updates whole screen at </span><span class=cF2>60 fps</span><span class=cF0>, optimized for full screen games where </span><span class=cF2>InvalidRectangle</span><span class=cF0>s are counter-productive.
<a name="l36"></a>
<a name="l37"></a>* One font, 8x8. Text and graphic layers done in software with text normally on an 8x8 grid.
<a name="l38"></a>
<a name="l39"></a>* Compiler extends all values to 64-bit when fetched and does only 64-bit computations intermediately. Assembler has minimal
<a name="l40"></a>16-bit support, good enough for compiling boot loaders.
<a name="l41"></a>
<a name="l42"></a>* No object files. Use </span><span class=cF2>JIT</span><span class=cF0>.
<a name="l43"></a>
<a name="l44"></a>* Whole files are processed almost exclusively.
<a name="l45"></a>
2021-12-11 11:10:58 +00:00
<a name="l46"></a>* </span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/ZealC.DD.html#l1"><span class=cF4>One language</span></a><span class=cF0> and compiler for command-line, scripts, songs, automations and code.
<a name="l47"></a>
<a name="l48"></a>* One editor/word processor/browser for the command-line window, source code, documentation browser, dialog forms.
<a name="l49"></a>
<a name="l50"></a>* No child windows. One window per task. Buttons are widgets, not child windows. There are child tasks, however.
<a name="l51"></a>
<a name="l52"></a>* No distinction between </span><span class=cF2>thread</span><span class=cF0>, </span><span class=cF2>process</span><span class=cF0> or </span><span class=cF2>task</span><span class=cF0>.
<a name="l53"></a>
2021-12-11 11:10:58 +00:00
<a name="l54"></a>* The </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/Sched.ZC.html#l1"><span class=cF4>Scheduler</span></a><span class=cF0> is for home systems. It is not preemptiove. Disk requests are not broken-up, so sharing is bad. It's
<a name="l55"></a>wonderfully simple.
<a name="l56"></a>
<a name="l57"></a>* </span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/MultiCore.DD.html#l1"><span class=cF4>MultiCore</span></a><span class=cF0> is done </span><span class=cF2>master/slave</span><span class=cF0>, instead of </span><span class=cF2>SMP</span><span class=cF0>. </span><span class=cF2>Core0</span><span class=cF0> applications explicitly assigns jobs. Locks are present allowing
<a name="l58"></a>multicore file, heap, and hardware access, though.
<a name="l59"></a>
<a name="l60"></a>* </span><span class=cF4><u>Sound</u></span><span class=cF0> has single-voice 8-bit signed MIDI-like samples.
<a name="l61"></a>
<a name="l62"></a>* All tasks have a heap and a symbol table. Scope is that of environment variables in other operating systems. As text is
<a name="l63"></a>typed at the command line or you run programs by </span><span class=cF2>#include</span><span class=cF0>ing them, the symbols go in the table. If a symbol is not found, the
<a name="l64"></a>parent task's table is checked. The father of all tasks has the API symbols you'll need waiting in it's table. No need to </span><span class=cF2>#in
<a name="l65"></a>clude</span><span class=cF0> headers.
<a name="l66"></a>
<a name="l67"></a>* No need for namespaces -- scoping occurs automatically based on task symbol table hierarchy with the </span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/Glossary.DD.html#l154"><span class=cF4>System Task</span></a><span class=cF0>'s symbol
<a name="l68"></a>system-wide global.
<a name="l69"></a>
<a name="l70"></a>* Sometimes, we </span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/CutCorners.DD.html#l1"><span class=cF4>cut corners</span></a><span class=cF0> in the interest of keeping the code beautiful.
2021-07-03 05:07:57 +01:00
</span></pre></body>
</html>