Operating Systems 2026F Lecture 4

From Soma-notes

Video

Video from the lectures given on September 22nd and 23rd, 2026 are now available:

Notes

Lecture 4A

Lecture 4A
----------

Why is the original LinuxOnTab pretty slow?
 - load the whole linux distribution over the web, all at once
 - but also, it is emulating an x86 processor (32 bit)


What is happening when you load a web page? What code is running?
 - by default, it is HTML, CSS, JavaScript
 - so how do you run x86 code?


Sidebar - what is x86?
 - refers to the instruction set of Intel (and then AMD) processors

8080 - 8 bit
8086/8088 - 16 bit
 - 8088 was in the first IBM PC
80286
80386 <-- first 32 bit x86 processor
80486
Pentium
Pentium Pro
...
Intel decided to go make the Itanium for its 64 bit processor
 - not backwards compatible

AMD made x86-64
 - 64 bit version of x86



So what's going on in your web browser?

LinuxOnTab v1
x86 emulator
Firefox (JavaScript/WebAssembly)
x86-64 <-> Kernel

LinuxOnTab v2 (in WebAssembly)
Firefox (JavaScript/WebAssembly)
x86-64 <-> Kernel


An operating system can be big or small
 - a small operating system => complexity pushed to applications
 - a big operating system => applications can be simple, use rich functionality of OS

Again, files are not all "files"
 - many aren't real <- /proc, /sys, /dev
 - many aren't persistent <- tmpfs filesystems

Shell variables are private to a shell process

Environment variables are passed to any child processes
 - a child process is created from a parent process

Lecture 4B

Lecture 4B
----------

Why are some operating systems big, and others small?
 - small because you don't have room for anything else
 - large because more functionality -> simpler applications
   (for the developer)

Intel processors
8080 <- 8 bit
8088/8086 <- 16 bit (Original IBM PC)
80286
80386 <- 32 bit processor
80486
Pentium
Pentium Pro

Itanium <--- 64 bit processor, NOT backwards compatible

AMD came up with x86-64, and Intel had to adopt it


In LinuxOnTab, we have


LinuxOnTab v1
v86 emulator (in WebAssembly)
Browser (x86 or ARM) <-> Kernel
Hardware

LinuxOnTab v2 (in WebAssembly)
Browser (x86 or ARM) <-> Kernel
Hardware

v1 is slower because
 - emulates x86-32
 - loads whole disk image

v2 loads on demand and has native WebAssembly