theme | paginate | backgroundColor | backgroundImage | style | marp |
---|---|---|---|---|---|
gaia |
true |
section.photo h1,section.photo h2,section.photo h3,section.photo h4,section.photo h5,section.photo h6 {
background-color: #888;
color: #FFF;
}
h6 {
font-size: 30%;
}
img[alt~="centre"] {
display: block;
margin: 0 auto;
}
|
true |
- Embedded Systems Engineer
- Rust Programmer and Trainer
- Formerly: C++, Python, Pascal, BASIC...
- Ferrous Systems (ferrous-systems.com)
- github.com/thejpster
- twitter.com/therealjpster
- neotron-compute.github.io
- ☞ What is an 'OS'? ☜
- A Brief History of the OS
- The OS Today
- Introducing: Neotron
- OS = Operating System
- DOS = Disk Operating System
- RTOS = Real-Time Operating System
- It runs applications
- It runs on a computer
- It manages files (on disk)
- It provides portability
- It runs applications ✅
- It runs on a computer
- It manages files (on disk)
- It provides portability
- Has a Central Processing Unit
- Executes Instructions, has Registers
- Has memory:
- Each location (a byte?) has a numeric address
- Volatile vs Non-Volatile
- Has Input/Output devices
- Often pretend to be memory
- Display, Keyboard, Storage, Communications
- It runs applications ✅
- It runs on a computer ✅
- It manages files (on disk)
- It provides portability
A - Track; B - Geometric Sector; C - Sector; D - Cluster
- It runs applications ✅
- It runs on a computer ✅
- It manages files (on disk) ✅
- It provides portability
or if the OS and Application are compiled together...
- The Application runs from boot-up
- How do you load other Applications?
- How do you run the Application on a different computer?
- Like, move the common parts out of each application?
- The bits that operate the computer ... system ?
- Like, move the common parts out of each application?
- The bits that operate the computer ... system ?
- It runs applications ✅
- It runs on a computer ✅
- It manages files (on disk) ✅
- It provides portability ✅
- What is a 'DOS' (or even an 'OS')?
- ☞ A Brief History of the OS ☜
- The OS Today
- Introducing: Neotron
- LEO I was the first commercial computer
- Built by J. Lyon's Tea Rooms
- Based on EDSAC
- 6000 tubes, 1200 relays
- First ran the "Bakery Valuations" application in 1951
- LEO III's "Master Programme" ran up to 12 applications
Automatic Digital Computation, 1953
- 1964
- Somewhat late and resource hungry
- Various interim OSes launched, like BOS/360
- Three versions: Single-task, fixed-tasks, variable-tasks
- Switched tasks when the CPU was stuck waiting
- System/360 shared peripherals, and mostly application compatible
- MIT / General Electric / Bell Labs - 1969
- Time-sharing for GE-645
- 36-bit word; 18-bit address/segment
- No distinction between files and RAM
- Dynamic linking
- Hierarchical File System
- Kernel/User-space
- Written in PL/I
- Bell Labs - 1969
- Ken Thompson, Dennis Ritchie, et. al
- Initially single-tasking; non-portable
- written for the DEC PDP-7, to play Space Travel
- Processes, Device Files, Hierarchical File System
- Proves useful for Word Processing (with
roff
) - Re-written in C in 1973
- Bell Labs' Research Unix V1..V10
- AT&T System III & V
- HP-UX, SGI IRIX, IBM AIX, Sun Solaris
- Berkeley Software Distribution
- SunOS
- Net/Open/Free/DragonFlyBSD
- NeXTSTEP (macOS)
- Microsoft Xenix
- For 8-bit Intel 8080 machines - 1974
- Altair, IMSAI, Osborne, KayPro, Commodore, Sinclair, Amstrad
- Needs an ASCII Terminal, floppy drive, 16 KiB RAM
- OEM ports the BIOS, Digital Research supply BDOS + CCP
HierarchicalFile System- pip understands
CON:
as a psuedo-file with special properties
- The IBM 5150 'Personal Computer' - 1981
- 16-bit Intel 8088
- Microsoft BASIC in ROM, Tape interface, 16 to 64KB RAM
- Microsoft buy 16-bit CP/M clone 86-DOS and licence it to IBM
- IBM do the BIOS, Microsoft provide DOS
- First 'PC Compatible' from Columbia Data Products
- Microsoft sell MS-DOS to anyone - CP/M is doomed
CON
is a psuedo-file with special properties
- MS-DOS
- Xenix Unix
- OS/2 with IBM
- 16-bit Windows (1.x, 2.x, 3.x)
- 16/32-bit Windows (95, 98, Me)
- 32-bit Windows NT (3.1, 3.5, 4, 2000, XP, Vista, 7, 8, 10, 11)
- Released in 1993 as Windows NT 3.1
- Portable
- MIPS, x86, DEC Alpha, PowerPC, Itanium, x86-64, arm
- Compatible
- OS/2, POSIX, Win16, Win32...
- Dave Cutler + co. came from doing VMS at Digital
Microsoft said sorry with $100M + added DEC Alpha port
- Almost nothing on the Apple I (1976)
- Apple/Microsoft BASIC on the Apple II (1977)
- AppleDOS (1978) / ProDOS (1983) / GS-OS (1988)
- Lisa OS (1983)
- Includes a GUI based on the Xerox Star
- Macintosh System (1984)
- Like a cut-down Lisa OS
- Later ported from 68k to a PowerPC microkernel
- Mac OS X is Unix'03 certified
- Microsoft BASIC on the 8-bits
- Commodore DOS ran on the Floppy Drive!
- AmigaOS...
- Exec was the multi-tasking Kernel
- AmigaDOS was the OS (based on TRIPOS, written in BCPL)
- Intuition was the GUI
- Partially in ROM (Kickstart)
- Atari OS + Atari DOS on the 400/800 line
- "TOS" on the Atari ST/STe
- BIOS
- GEMDOS (by Digital Research)
- GEM Desktop (ditto)
- MultiTOS on the Atari TT/Falcon
- MOS on the 8-bit machines (like the BBC Micro)
- Disk Filing System
- BBC BASIC was amazing
- RISC OS on the 32-bit machines
- Advanced Disk Filing System
- Still going!
- Is a Kernel
- GNU is Not Unix: C compiler, C library, shell, utilities
- (more and more non-GNU components these days...)
- X11 compatible Display Server plus a Window Manager
- Distributions like Ubuntu, Arch, Slackware
- It's like pick-n-mix
- What is a 'DOS' (or even an 'OS')?
- A Brief History of the OS
- ☞ The OS Today ☜
- Introducing: Neotron
CommodoreCP/MIBM(well...)Apple System/Carbon- Microsoft Windows NT (Win32)
- POSIX (Portable Operating System Interface ... X?)
- Your web browser...?
- Kernel-space vs User-space
- Kernel API is private
- Must use OS supplied static libraries
- EXEs and DLLs
- Paths like
C:\WINDOWS\CANYON.MID
- Functions like
CreateFileA()
- Kernel-space vs User-space
- Kernel API is public
- Use CPU syscall instructions
- Executables and Shared Objects
- Paths like
/home/jonathan/canyon.mid
- Functions like
open()
- Kernel-space vs User-space
- Kernel API is private
- Must use OS supplied static libraries
- Executables and Shared Objects
- Paths like
/Users/jonathan/canyon.mid
- Functions like
open()
- File Handling
- Open, Close, Read, Write, Directories
- Program Start/Stop
- Console Handling
- Reading / Writing Text
- Windows / 2D / 3D / Video
- Memory Management
- Networking (with Sockets)
- Processes and Threads
- Locks and RPC
- Application Programming Interface (API)
- Source-level compatiblity - function names, argument order
- Support multiple CPU architectures
- Application Binary Interface (ABI)
- Binary-level compatibility - register/stack usage
- Support single CPU architecture (although ... ARM64EC)
- Modern languages provide a portable API over the native API
- C++ STL
- Python
- Go
- Rust
- Cygwin/MinGW brings POSIX to Windows NT
- What is a 'DOS' (or even an 'OS')?
- A Brief History of the OS
- The OS Today
- ☞ Introducing: Neotron ☜
- Just Enough Operating System
- Loadable Applications
- Portable
- Understandable
- Open Source
- Open Hardware
- OS APIs are learnable
- Albeit growing...
- Kernels are hugely complicated
- Especially drivers!
- Operating Systems even more so
- They're both ancient...
- Single address space
- OS API is public
- Jump Table given to every application
- Executables, but no Shared Objects
- Paths like
0:/FOLDER/CANYON.MID
- Functions like:
open_file: fn(path: &str, mode: os::Mode) -> os::Result<FileHandle, Error>
- Not general purpose
- Well-solved problem
- Nostalgia
- Longevity
- Education
- Money
- File Handling
- FAT32 on an SD Card
- Console Handling
- VGA Monitor, PS/2 Keyboard
- Memory Management
- Basic
malloc
/free
- Basic
- Networking (with Sockets)
- Nope (well, maybe later...)
- Processes and Threads
- Nope
- Locks and RPC
- Nope
- Solving the driver problem
- I don't care about drivers for your machine
- Neotron-BIOS provides hardware-specific code
- The Neotron-OS provides hardware-independent code
- You supply the Application!
- Performance
- Developer Experience
- Community
- OS should be common for any BIOS
- Rust versions may not match
- Need to use
extern "C"
functions - BIOS supplies a
struct
of function-pointers
#[repr(C)]
struct ApiStaticString {
string: *const u8,
length: usize
}
#[repr(C)]
struct BiosApi {
get_version: extern "C" fn() -> ApiStaticString,
}
static mut API: Option<&'static Api> = None;
static mut VGA_CONSOLE: Option<VgaConsole> = None;
#[no_mangle]
pub extern "C" fn main(api: &'static BiosApi) -> !
unsafe {
API = Some(api);
VGA_CONSOLE = Some(VgaConsole::new(api));
}
let version = (api.get_version)();
println!("BIOS version: {}", version);
panic!();
}
static API: ApiWrapper = ApiWrapper::new();
static VGA_CONSOLE: VgaConsole = VgaConsole::new();
#[no_mangle]
pub extern "C" fn main(api: &'static BiosApi) -> !
API.init(api);
VGA_CONSOLE.init();
let version = API.get_version();
println!("BIOS version: {}", version);
panic!();
}
- Works the same way
- Entry point gets
&'static OsApi
- CRT sets up args/env and calls normal C-style
main
- Texas Instruments TM4C processor
- 80 MHz Cortex-M4
- 32 KiB RAM
- Real-time VGA over SPI
- PWM Audio, SDMMC, 2x Joystick, MIDI
- Raspberry Pi RP2040 processor
- 2x 133 MHz Cortex-M0+
- 256 KiB RAM
- Hardware-accelerated VGA over PIO
- 16-bit Audio CODEC, SDMMC, Slots
- Neotron Pico is micro-ATX sized
- Design includes a Board Management Controller (BMC)
- Keyboard controller
- Power control
- Status LEDs, Power button, Reset button
- Extra UART
- The DEC PDP-11 has Unibus
- 8080/Z80 machine have the S-100 bus
- The PC-compatibles had the ISA bus
- We have the Neotron Bus!
<style scoped> table { font-size: 60%; } </style>
Pin | Function | Pin | Function |
---|---|---|---|
1 | SPI COPI | 2 | Ground |
3 | SPI CIPO | 4 | Ground |
5 | SPI CLK | 6 | Ground |
7 | SPI /CS | 8 | /IRQ |
9 | I²C SDA | 10 | I²C SCL |
11 | EEPROM Addr0 | 12 | EEPROM Addr1 |
13 | EEPROM Addr2 | 14 | /RESET |
15 | 5V | 16 | 5V |
17 | 3.3V | 18 | 3.3V |
19 | Ground | 20 | Ground |
- @therealjpster on Twitter (@thejpster everywhere else)
- Visit #neotron on Matrix
- See https://neotron-compute.github.io
- Follow these fine people:
- @bitshiftmask @rustembedded @rustlang
- @foone @ekuber @computermuseum
- Find me later - let's chat!