operating_systems
#define operating_systems: \
I--------------------------------------------\
I--------------------------------------------\
I--------------------------------------------\
I /$$$$$$ /$$$$$$ \
I /$$__ $$ /$$__ $$ \
I | $$ \ $$| $$ \__/ \
I | $$ | $$| $$$$$$ \
I | $$ | $$ \____ $$ \
I | $$ | $$ /$$ \ $$ \
I | $$$$$$/| $$$$$$/ \
I \______/ \______/ \
I--------------------------------------------\
I--------------------------------------------\
I--------------------------------------------I
┌──────────────────────┐
│ User-space │
│ ┌────────────────┐ │
│ │ Kernel │ │
│ │ ┌──────────┐ │ │
│ │ │ Hardware │ │ │
│ │ └──────────┘ │ │
│ └────────────────┘ │
└──────────────────────┘
Resposabilities:
• protecting the hardware and data from programs and the user
• managing multiple users and enforcing safety between them
• facading hardware interfaces
— sharing resources between programs:
• allocating memory
• processor scheduling
• error detecting
Important_operating_systems:
Multix
Unix
Linux
FreeBSD
OpenBSD
Plan9
DOS
Windows <...>
OS X
IOS
Android
Nix_family:
.- Linux --- distros {Android}
/
Multix --- Unix --- *BDS
\
'- Plan9
System_calls:
• an API defined by the OS
• exposes hardware operations to the user in a controlled (safe) manner
Process:
• a running instance of software
• modern OS-es are capable of multiprocessing;
where multiple run seemingly or actually at the same time
Memory:
• an address space is a range of memory; it is used as an umbrella-term
Virtual_memory:
• "virtual address space"/"linear address space"
• the operating system may virtualize memory for each program
• from the programs perspective, they are the only ones using memory
Privelage_separation:
• operating systems would like to make sure random processes
owned by Bob the janitor cannot crash everything
Mode_separation:
kernel mode: trusted internal software
user mode: anything else installed/executed by the user
• basic method of separation
• modes have their own address spaces
Modules:
{ drivers }
• a kernel module is an optional component of the kernel
• module-s are often allowed to define their own systemcalls
Static:
• compiled into the kernel
• generally considered more secure
Dynamic:
• "Loadable Kernel Module"/"LKM"/"Kernel Loadable Driver"/"KLD"
• separately compiled binaries enableable at runtime
• primary way to implement rootkits
Boot_loading:
• the code responsible for fully booting a machine
• the first thing executing after a successful POST and after whatever mobo firmware exits
• an OS could contain its own boot loader or depend on
an external program to pass control to it
• a boot loader could support launching multiple OS types/versions
• when multiple OS-es are installed side by side, its called dual booting;
even if there are more than 2 OS-es; tho some retards bump it
with the number of OS-es even tho its completely irrelevant
• during dual booting, an interactive menu is presented to the user;
usually with a timeout to launch a default OS
GRUB:
• the most common boot loader used with linux
Raspi_Arm_magick:
cmdline.txt : specifies commandline arguments to pass to the kernel;
space separated list; must not contain new lines
config.txt :
Environment:
• Unix concept
• a list of string key-value pairs
• each program has their own
• upon fork(), its inherited
• used for passing in state
• the most universal way to perform configuration