Operating Systems 2015F Lecture 23
Video
The video for the lecture given on December 2, 2015 is now available.
Notes
Lecture 23 ---------- * Project due Monday at midnight (last day of classes) * Last interviews will be on Wednesday, Dec. 9th * Therac-25 * other operating systems * randomness Therac series of machines irradiate individuals... to treat cancer (normally) Used hardware and software to control radiation dosage (location and intensity) How do you make sure you don't fry a patient? There's the specific dose (for a particular patient) and there's a maximum dose (for anyone) In earlier models, specific dose was determined by software, while the maximum dose was limited by hardware interlocks With the Therac-25, they removed the hardware as a cost saving measure If the software was perfect this wouldn't have been a problem... There were concurrency issues in the software (race conditions) We can't guarantee we won't make these mistakes again. But I can suggest... * When possible, eliminate concurrency - single threaded processes are wonderful - threads are generally used to handle blocking I/O; instead, just use non-blocking I/O - really large scale computations will have to span computers - why not use the same techniques to run across cores? - use functional programming where possible Synchronized methods in Java impose mutual exclusion on their contents - okay but better to not have to deal with threads Other operating systems ----------------------- Why not throw away what we have and start over? Because there is too much software written that depends on the old OS To make a new OS, you either 1. start anew and build an adaptation layer for old software 2. start anew and write everything from scratch #1 is bad because the old OS is going to be better than your new OS at running old software #2 is bad because where do you get the resources to start over? We might get a really new OS in two places: * Quantum computing * Biological computing So what OSs do we have? * UNIX-based * Windows NT-based UNIX started at Bell Labs, moved to Berkeley, and spread from there UNIX always ran on "bigger" machines hobbyist/home PCs couldn't run UNIX Home PCs didn't have memory management units (MMUs), so no * page tables * TLBs * no virtual addresses, only physical addresses So early home computer operating systems didn't support processes - OS just was libraries for accessing hardware * Apple ]['s, Atari 400/800, Commodore Vic20 & 64 all had no real OS * early PCs were supposed to run CP/M, but the owner of it didn't play ball with IBM * So Bill Gates bought/created MS-DOS, licensed it to IBM * MacOS also didn't support an MMU MS-DOS and MacOS were really, really bad at connecting to the Internet - couldn't handle the concurrency of network traffic So they needed a replacement Apple tried hard to develop a replacement and failed (Taligent), * bought NeXTStep, that became MacOS X * NeXTStep was a UNIX plus a Postscript-based GUI (developed by NeXT a company founded by Steve Jobs) Microsoft needed a new OS too, got Windows NT from DEC's VMS group UNIX had diversified but then started supporting the POSIX standards Nowadays, instead of POSIX we have the Linux kernel Two main lines of UNIX descendents today * xBSDs (FreeBSD, OpenBSD, NetBSD) * Linux Linux is just a kernel. The BSDs are a whole UNIX-like OS developed together Linux userland is developed as many projects and unified in Linux distributions It comes down to licensing and lawyers In the early 1990's, AT&T's lawyers came after BSD. So BSD was held back just as the Web was taking off Free Software Foundation - came about because of proprietary UNIX flavors BSD license allowed for proprietary forks - just give a copyright notice in documentation FSF wanted a UNIX-like system that would be "free" - free as in freedom, all would be able to use and change it - GNU GPL, General Public License - you can do whatever you want, so long as you also give away the source code with any binaries and you don't restrict the freedom of others GNU system was successfull except for one component, the kernel QNX - example of an embedded, proprietary operating system - used to be very popular, now being replaced by...Linux - tend to stick around now mainly because of regulatory issues, or severe resource constraints - QNX is a microkernel-based system with POSIX compatibility - everything is a process