This commit is contained in:
Miloslav Ciz 2025-01-16 23:00:49 +01:00
parent 2efc415ac4
commit 70c10acfc5
61 changed files with 1970 additions and 1954 deletions

View file

@ -1,6 +1,6 @@
# Operating System
Operating System (OS) is usually a quite complex [program](program.md) that's typically installed on a [computer](computer.md) before any other user program and serves as a platform for running other programs as well as handling [low level](low_level.md) functions, managing resources ([CPU](cpu.md) usage, [RAM](ram.md), [files](file.md), [network](network.md), ...) and offering services, protection and [interfaces](interface.md) for humans and programs. If computer was a city, an OS is its center that was built first and where its government resides. As with most things, the definition of an OS can differ and be stretched greatly -- while a typical OS will include features such as [graphical interface](gui.md) with windows and mouse cursor, [file system](file_system.md), [multitasking](multitasking.md), [networking](network.md), [audio](audio.md) system, safety mechanisms or user accounts, there exist OSes that work without any said feature. Though common on mainstream computers, operating system isn't necessary; it may be replaced by a much simpler program (something akin a program loader, BIOS etc.) or even be absent altogether -- programs that run without operating system are called "[bare metal](bare_metal.md)" programs (these can be encountered on many simple computers such as [embedded](embedded.md) devices).
Operating System (OS) is usually a quite complex [program](program.md) that's typically installed on a [computer](computer.md) before any other user program and serves as a platform for running other programs as well as handling [low level](low_level.md) functions, managing resources ([CPU](cpu.md) usage, [RAM](ram.md), [files](file.md), [network](network.md), ...) and offering services, protection and [interfaces](interface.md) for humans and programs. If computer was a city, an OS is its center that was built first and where its government resides. As with most things, the definition of an OS can differ and be stretched greatly -- while a typical OS will include features such as [graphical interface](gui.md) with windows and mouse cursor, [file system](file_system.md), [multitasking](multitasking.md), [networking](network.md), [audio](audio.md) system, safety mechanisms or user accounts, there exist OSes that work without any said feature. Though common on mainstream computers, operating system isn't necessary; it may be replaced by a much simpler program (something akin to a program loader, BIOS etc.) or even be absent altogether -- programs that run without operating system are called "[bare metal](bare_metal.md)" programs (these can be encountered on many simple computers such as [embedded](embedded.md) devices).
There is a nice [CC0](cc0.md) wiki for OS development at https://wiki.osdev.org/.
@ -58,9 +58,9 @@ Below are some of the most notable OSes.
What would an operating system designed by [LRS](lrs.md) principles look like? There may be many different ways to approach this challenge. Multiple operating systems (or multiple versions of the same system) may be made, such as as an "extremely KISS bare minimum featureless system", a "more advanced but still KISS system", a "special-purpose safe system for critical uses" etc. The following is a discussion of ideas we might employ in designing such systems.
The basic idea for a universal LRS operating system is to be something more akin a mere **text [shell](shell.md)** (possibly [comun](comun.md) shell), we wouldn't probably even call it an operating system. A rough vision is something like **"[DOS](dos.md) plus a bit of [Unix philosophy](unix_philosophy.md)"**; we may also imagine it like [GRUB](grub.md) or something similar really. The system would probably seem primitive by "[modern](modern.md) standards", but in a [good society](less_retarded_society.md) it would be sufficient as a universal operating system (i.e. not necessarily suitable for ALL purposes). The OS would in fact be more of a **program loader** (like e.g. the one seen in [Pokitto](pokitto.md)), running with the same privileges as other programs -- its purpose would NOT be to provide a safe environment for programs to run in, to protects user's data and possibly not even to offer a platform for programs to run on (for abstracting hardware away a non-OS [library](library.md) might be used instead), but rather to allow switching between different programs on a computer without having to reupload the programs externally, and to provide basic tools for managing the computer itself (such as browsing files, testing hardware etc.). This shell would basically allow to browse files, load them as programs, and maybe run simple scripts (e.g. in mentioned comun language), allowing things such as automatization of running several program (NOT in parallel but rather one by one) to collaborate on computing something.
The basic idea for a universal LRS operating system is to be something more akin to a mere **text [shell](shell.md)** (possibly [comun](comun.md) shell), we wouldn't probably even call it an operating system. A rough vision is something like **"[DOS](dos.md) plus a bit of [Unix philosophy](unix_philosophy.md)"**; we may also imagine it like [GRUB](grub.md) or something similar really. The system would probably seem primitive by "[modern](modern.md) standards", but in a [good society](less_retarded_society.md) it would be sufficient as a universal operating system (i.e. not necessarily suitable for ALL purposes). The OS would in fact be more of a **program loader** (like e.g. the one seen in [Pokitto](pokitto.md)), running with the same privileges as other programs -- its purpose would NOT be to provide a safe environment for programs to run in, to protects user's data and possibly not even to offer a platform for programs to run on (for abstracting hardware away a non-OS [library](library.md) might be used instead), but rather to allow switching between different programs on a computer without having to reupload the programs externally, and to provide basic tools for managing the computer itself (such as browsing files, testing hardware etc.). This shell would basically allow to browse files, load them as programs, and maybe run simple scripts (e.g. in mentioned comun language), allowing things such as automatization of running several program (NOT in parallel but rather one by one) to collaborate on computing something.
An idea worth mentioning is also the possibility to have a have a distribution of this "operating system" that works completely without a file system, i.e. something akin a "big program" that has all the tools compiled into it, without the possibility to install or uninstall programs. Of course this doesn't mean ALL operating systems would in the world would work like this, it would just be a possibility for those that could benefit from it, e.g. very small wrist watch computers that don't wouldn't want and need to include hardware and software required for a mutable filesystem to work, since all they would need would be a few tools like stopwatch and calculator, plus they would gain the advantage of loading a program instantly. The tools to be "compiled in" could be chosen by the user before compilation to make a personalized "immutable distro".
An idea worth mentioning is also the possibility to have a have a distribution of this "operating system" that works completely without a file system, i.e. something closer to a "big program" that has all the tools compiled into it, without the possibility to install or uninstall programs. Of course this doesn't mean ALL operating systems would in the world would work like this, it would just be a possibility for those that could benefit from it, e.g. very small wrist watch computers that don't wouldn't want and need to include hardware and software required for a mutable filesystem to work, since all they would need would be a few tools like stopwatch and calculator, plus they would gain the advantage of loading a program instantly. The tools to be "compiled in" could be chosen by the user before compilation to make a personalized "immutable distro".
Let's keep in mind that true LRS computers would be different from the current capitalist ones -- an operating system would only be optional, programs would be able to run on [bare metal](bare_metal.md) as well as under an OS, and operating systems would be as much compatible as possible. By this an OS might be seen as more of an extra tool rather than a platform.
@ -68,7 +68,7 @@ The system might likely lack features one would nowadays call essential for an O
The universal OS would assume well behaved programs, as programs would likely be given full control over the computer when run -- this would greatly simplify the system and also computing in general. Doing so would be possible thanks to non-existence of malicious programs (as in good society there would be no need for them) and elimination of [update culture](update_culture.md). Users would only install a few programs they choose carefully -- programs that have been greatly tested and don't need to be updated.
**On user interface**: the basic interaction mode would of course be the text interface. Programs would have the option to switch to a graphical mode in which they would be able to draw to screen. There would be no such [bloat](bloat.md) as [window managers](window_manager.md) or [desktop environments](desktop_environment.md) -- these are capitalist inventions that aren't really needed as users practically always interacts with just one program at a time. Even in a multitasking system only one program would be drawing to the screen at a time, with user having the option to "alt-tab" between them. This would also simplify programs greatly as they wouldn't have to handle bullshit such as dynamically resizing and rearranging their window content. If someone REALLY wanted to have two programs at the screen at the same time, something akin a "screen splitter" might be made to create two virtual screens on one physical screen.
**On user interface**: the basic interaction mode would of course be the text interface. Programs would have the option to switch to a graphical mode in which they would be able to draw to screen. There would be no such [bloat](bloat.md) as [window managers](window_manager.md) or [desktop environments](desktop_environment.md) -- these are capitalist inventions that aren't really needed as users practically always interacts with just one program at a time. Even in a multitasking system only one program would be drawing to the screen at a time, with user having the option to "alt-tab" between them. This would also simplify programs greatly as they wouldn't have to handle bullshit such as dynamically resizing and rearranging their window content. If someone REALLY wanted to have two programs at the screen at the same time, something akin to a "screen splitter" might be made to create two virtual screens on one physical screen.
**A bit more details**: the universal OS could simply be a program that gets executed after computer restart. This program would offer a [shell](shell.md) (textual, graphical, ...) that would allow inspecting the computer, configuring it, and mainly running other programs. Once the user chose to run some program, the OS would load the program to memory and jump to executing it. To get back to the OS the program could hand back control to the OS, or the computer could simply be restarted. If the program crashes, the computer simply restarts back to OS.