less_retarded_wiki/operating_system.md

63 lines
7 KiB
Markdown
Raw Normal View History

# Operating System
Operating System (OS) is normally a hugely complex program that's typically installed before any other program and serves as a platform for running other programs as well as managing resources (CPU usage, [RAM](ram.md), [files](file.md), [network](network.md), ...) and offering services and interfaces for humans and programs.
There is a nice [CC0](cc0.md) wiki for OS development at https://wiki.osdev.org/.
From programmer's point of view a serious OS is one of the most difficult pieces of software one can pursue to develop. The task involves an enormous amount of [low-level](low_level.md) programming, development of own tools from scratch and requires deep and detailed knowledge of all components of a computer, of established standards as well as many theoretical subjects such as [compiler](compiler.md) design.
An OS, as a software, consists of two main parts:
- **[kernel](kernel.md)**: The base/core of the system, running in the most privileged mode, offering an environment for user applications.
- **[userland](userland.md) (applications)**: The set of programs running on top of the kernel. These run in lower-privileged mode and use the services offered by the kernel via so called [system calls](syscall.md).
For example in GNU/Linux, [Linux](linux.md) is the kernel and [GNU](gnu.md) is the userland.
## Attributes/Features
TODO
## Notable Operating Systems
Below are some of the most notable OSes.
- [Android](android.md)
- [BSD](bsd.md) systems such as [OpenBSD](openbsd.md) and [freeBSD](freebsd.md): Unix-like OSes
- [Collapse OS](collapseos.md)
2023-07-05 15:15:51 +02:00
- [DOS](dos.md)
2023-06-20 17:03:33 +02:00
- [FreeDOS](freedos.md)
- [GNU](gnu.md)/[Linux](linux.md) systems encompassing many [distributions](distro.md)
2023-06-07 11:48:11 +02:00
- [Haiku](haiku.md)
- [Inferno](inferno.md): OS in the style of Plan 9
- [MacOS](macos.md)
- [Minix](minix.md)
- [Plan 9](plan9.md): research OS, continuing the ideas of [Unix](unix.md)
- [ReactOS](reactos.md)
- [Replicant](replicant.md)
- [Solaris](solaris.md)
- [TempleOS](templeos.md): simple [meme](meme.md) OS written by a [Terry Davis](terry_davis.md)
- [Unix](unix.md)
- [Windows](windows.md): very bad [proprietary](proprietary.md) [capitalist](capitalist_software.md) OS
2023-06-07 11:48:11 +02:00
- [9front](9front.md): OS based on Plan 9
2023-07-05 15:15:51 +02:00
- ...
## LRS Operating System
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 akin **[DOS](dos.md) plus a bit of [Unix philosophy](unix_philosophy.md)**. 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, 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.).
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.
The system might likely lack features one would nowadays call essential for an OS, such as multiple user support (no need if everyone has his own computer and [security](security.md) is not an issue), [virtual memory](virtual_memory.md), complex [GUI](gui.md) etc. There might even be no [multitasking](multitasking.md); a possibility to make a multitasking OS exists, but let's keep in mind that even such things as programs interacting via [pipes](pipe.md) may be somewhat implemented without it (using temporary buffer files into which one program's output is stored before running the next program).
2023-07-13 12:19:07 +02:00
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.
2023-07-05 15:15:51 +02:00
2023-07-13 12:19:07 +02:00
**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.
2023-07-05 15:15:51 +02:00
**A bit more technical 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. The OS could also contain functions, kind of an [API](api.md), as part of its code that "userland" programs might call, e.g. for drawing to the screen, reading input etc. (just as e.g. a BIOS usually offers similar functions). Note that shell [scripting](script.md) that executes other programs could still be possible, e.g. by remembering the state of script execution in a file on disc. Same thing could be used for communicating between the OS and programs (e.g. clipboard), i.e. there would still be no need for multitasking.
TODO: more