Различия между версиями 2 и 3
Версия 2 от 2020-01-15 00:54:40
Размер: 2591
Редактор: FrBrGeorge
Комментарий:
Версия 3 от 2020-01-15 01:58:45
Размер: 2666
Редактор: FrBrGeorge
Комментарий:
Удаления помечены так. Добавления помечены так.
Строка 1: Строка 1:
= Challenges of OS and disadvantages of Assembler language = = 00. Challenges of OS and disadvantages of Assembler language =
Строка 57: Строка 57:
== H/W ==
 * [[../QemuInstall|Install and run MIPS virtual machine]]

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:

  1. Single user, single task — almost no OS needed, batch mode
  2. Single user, many simultaneous tasks — accidental access prevention / sole resource locking, multitasking mode
  3. 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

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

H/W

HSE/ProgrammingOS/00_ProgrammingOSIntro (последним исправлял пользователь FrBrGeorge 2020-01-15 01:58:45)