00. Challenges of OS and disadvantages of Assembler language
Garry Shute's «Operating Systems → Virtualization of Resources» lecture
Operating system
- Operating System
- the discipline of unification, sharing and accounting of computer resources usage
Principal resources:
- Memory
- CPU
- Periferial devices
History:
- Single user, single task — almost no OS needed, batch mode
- Single user, many simultaneous tasks — accidental access prevention / sole resource locking, multitasking mode
- Many users, many tasks — full access control, fair sharing, accounting, multitasking mode
Typical (monolith) architecture:
- Kernel: the implementation of the very mechanism (of unification, sharing and accounting) — API (application programming interface)
- Memory: provisioning, protection, sharing
- CPU: scheduling
- Devices: access control
- Userspace: the logic above unification, sharing and accounting; common subtask solutions, high-level libraries, integration tools
- Applications: complete user workflow solutions (not a past of OS)
Much of kernel goals requires hardware implementation.
ABI (application binary interface) unification problem:
- Different architecture
- Different ISA (instruction set architecture) among similar architectures
- Different calling / register planning / other conventions
- OS specific: different kernel API (e. g. Linux-based, FreeBSD/MacOS, other *BSD, Windows, etc.)
- ⇒ API/userspace standards:
- POSIX
- LSB
- WinAPI
- ⇒ API/userspace standards:
C programming language
Architecture-related unification cannot be developed over Assembler language due to it architecture-oriented nature ⇒ we need new cross-platform programming language, that, however, takes into account architecture features.
What is to be improved over assembler language:
- arithmetical expressions
- calling conventions
- execution flow primitives (conditionals and loops)
- variable strategies (static in memory / on stack memory / on registers)
- scalar types and address arithmetic
- complex data type modelling
- …
What is not to be changed:
- Actual memory/addressing model
- Actual hardware-provided scalar types (integers and floats)
- Bitness (machine word size) and endianness (byte order)
TODO