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.