From "Code"
🎧 Listen to Summary
Free 10-min PreviewEvolution and Features of Early Operating Systems (CP/M, MS-DOS, UNIX)
Key Insight
Operating systems emerged to manage computer resources, with file systems as a crucial component for organizing data into named files across disk sectors. CP/M (Control Program for Micros), developed by Gary Kildall in the mid-1970s for the Intel 8080 microprocessor, was a foundational 8-bit operating system. It typically resided on 8-inch diskettes with 77 tracks, 26 sectors per track, and 128 bytes per sector, yielding 256256 bytes total. The first two tracks held CP/M, while 75 tracks were for files. Its file system supported named files and the ability to store them in non-consecutive sectors, grouping them into 243 allocation blocks, each containing 8 sectors (1024 bytes). The disk's first 2048 bytes (two allocation blocks) served as the directory, accommodating up to 64 files via 32-byte entries, which stored information like the 8.3 filename and type (e.g., MYLETTER.TXT, CALC.COM) and a disk map of allocation blocks.
CP/M loaded into memory through a 'bootstrap loader' stored in ROM, which would load the initial 128-byte sector from disk, beginning the 'booting' process. Once loaded, CP/M occupied approximately 6 KB of RAM, consisting of the Basic Input/Output System (BIOS), Basic Disk Operating System (BDOS), and Console Command Processor (CCP), leaving roughly 58 KB in the Transient Program Area (TPA) for user programs in a 64 KB system. The CCP displayed an 'A>' prompt and recognized commands like DIR (to list files, supporting wildcards such as '*.TXT'), ERA (to erase files), REN (to rename files), TYPE (to display text file contents), and SAVE (to store memory blocks to disk). If a command was not recognized, the CCP would assume it was the name of a program (e.g., 'CALC.COM') and load the corresponding COM file into the TPA at address 0100h for execution.
A key operating system function is providing an Application Programming Interface (API), allowing programs to access hardware indirectly. CP/M's API used the 'CALL 5' instruction; by setting register C to a specific function value (e.g., 01h for keyboard input, 02h for screen output, 16h for creating a file), programs could invoke BDOS subroutines. BDOS managed the file system and relied on BIOS for direct hardware interaction, making the API device-independent. This design allowed CP/M programs to run on various computers with Intel 8080-compatible processors, as long as CP/M was present. This model significantly influenced MS-DOS, which succeeded CP/M, adopting the 8.3 naming convention and its own File Allocation Table (FAT) system. MS-DOS 2.0 introduced hierarchical file systems, derived from UNIX, which in turn pioneered concepts like portability, time-sharing, multitasking, memory management, and virtual memory. UNIX's open nature fostered many variants, including the GNU project and Linux kernel, which became significant in open-source operating systems.
📚 Continue Your Learning Journey — No Payment Required
Access the complete Code summary with audio narration, key takeaways, and actionable insights from Charles Petzold.