16 ms·
An Experimental Course on Operating Systems
- neduma 9y agoInteresting. Can anyone take this course or Stanford students only?
- krat0sprakhar 9y agoWell, the lecture notes and assignments seem are available online, so one can follow at your own pace Assignment 0: https://web.stanford.edu/class/cs140e/assignments/0-blinky/ https://web.stanford.edu/class/cs140e/assignments/0-blinky/
- zellyn 9y agoSeconded. Following a class syllabus on your own time and without grading or feedback except knowing whether you did it is under-rated :-)
- chrissnell 9y agoThat's awesome. It's very well written. In just five minutes of reading, I learned what registers and memory-mapped I/O are and how they apply to the Pi. Old news to CS students but for this guy with a liberal arts degree, super helpful. I'm grateful that the document took the time to explain this kind of thing.
- busterarm 9y agoDid you complete assignment 0 yet?
- WaxProlix 9y agoIf you follow the pre-registration survey link, it asks for a SUNet ID, and if you try to register via Piazza, it asks for an @stanford.edu email address. So it seems likely the course proper is just students.
- vardhanw 9y agoFWIW I created a subreddit [0] for folks (not from Stanford) wanting a forum to study, follow and discuss on this course. [0] http://www.reddit.com/r/cs140e http://www.reddit.com/r/cs140e
- kissiel 9y agoLooks similar to "Baking Pi" from Cambridge. https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/
- pjmlp 9y agoThat one is in straight Assembly, but actually quite interesting to follow. Thanks for the link.
- sigjuice 9y agoI'm afraid I disagree. An OS course needs to at least cover virtual memory, processes and filesystems. Doesn't look like "Baking Pi" does.
- barbegal 9y agoThat depends on what you mean by "Operating System". Lots of real time operating systems don't have virtual memory or file systems. But I would agree with you that the "Baking Pi" course covers little of what one would typically associate with an operating system, it is much more of a course on low level ARM assembly and interfacing with a frame buffer.
- raverbashing 9y agoWill this become the Rust's era Minix (which encouraged a certain student to do an improved version?)
- pjmlp 9y agoThat would be Redox. https://www.redox-os.org/ https://www.redox-os.org/
- drizze 9y agoRedox looks very cool! It is very funny that their "Screenshots" tab is full of pictures of real computer screens: https://www.redox-os.org/screens/ https://www.redox-os.org/screens/
- hinkley 9y agoWhen HDMI was new one of the things that went around gamer circles was the fact that it was possible to do video capture on a second computer by daisy chaining them together. That way your game isn't compromised (as much, you probably still have higher latency) by trying to capture video. I don't know if any modern video cards can still do that, but it might be good for these guys to look into it.
- extrapickles 9y agoYou can still get HDMI capture cards as the more popular streamers use them so their main computer is unencumbered with video mixing. Most video cards these days have built in support for capturing video and encoding it on the fly in hardware, with a <5% impact to performance. This wouldn’t work for these guys as its probably a feature enabled by the driver.
- jjuel 9y agoTo me that looks like they are just trying to show their software running on real machines. Which is why they show the whole laptop in the picture. A screenshot saying "Here it is running on a Thinkpad" doesn't have the same effect you know?
- adamnemecek 9y agoI'm pumped too see the new OS architectures Rust will allow for.
- dmitrygr 9y agoSame as C. Rust is basically C with hardcoded checks enforced and put in by compiler that good programmers already know to put in.
- saghm 9y agoGiven all the vulnerabilities that have happened with C code over the years, I think making it harder for programmers to screw up is a win.
- woodrowbarlow 9y agowhile it's true that Rust has the potential to decrease the frequency and impact of certain types of bugs, i think the GP was saying that Rust's borrow checker is unlikely to revolutionize the way operating systems are designed and the way userspace interacts with the kernel. the GP fails to acknowledge Rust's other features such as its type system, but i'm not convinced those will revolutionize operating system architecture either. that doesn't mean i'm not excited about the potential of a new open-source general purpose operating system kernel written in Rust and entering the same space as the Linux kernel. it seems like a good fit for the language and an area where modernization is past due.
- saghm 9y agoFair enough, I definitely agree with everything you're saying. I took a little issue with the statement that "good programmers" know how to properly write safe C good though, as it not only is unnecessarily condescending but also glosses over the fact that even good programmers write code with bugs, and "knowing how" to do something properly doesn't mean you'll do it properly 100% of the time.
- jimktrains2 9y ago
- edcarter 9y agoWow, I would have loved to take this class in my undergrad. This looks really cool!
- polskibus 9y agoI hope they turn this course into a MOOC.
- 2_listerine_pls 9y agoSadly, Stanford isn't as commited as MIT to open their courses. Only a handful of them can be found on Coursera/Lagunita.
- 0xFFC 9y agoDo you know why?
- polskibus 9y agoDon't they have their own edx platform?
- 2_listerine_pls 9y agoIt's a fork of edx's platform called "Stanford Online –Lagunita".
- agumonkey 9y agoi remember something in that vein yes, also I did their db course and it was a very nice one (the tone was a nice blend of simple but serious with interesting exercises but no torture)
- HankB99 9y agoThat's unfortunate. The first class I took on Coursera (and it might even be before it was Coursera) was a Stanford class. It was "Introduction to Databases" by Prof. Jennifer Widom and was very good.
- _nalply 9y agoHave a look at the cheat sheet, it's extremely illustrative for intermediate Rust programmers: https://web.stanford.edu/class/cs140e/notes/lec3/cheat-sheet.pdf https://web.stanford.edu/class/cs140e/notes/lec3/cheat-sheet...
- conradev 9y agoHere is the original link – it was made by Raph Levien: https://docs.google.com/presentation/d/1q-c7UAyrUlM-eZyTo1pd8SZ0qwA_wYxmPZVOQkoDmH4/edit#slide=id.p https://docs.google.com/presentation/d/1q-c7UAyrUlM-eZyTo1pd...
- steveklabnik 9y agoA quick note: while this is a good way to get a grasp on how these types work, it also exposes/implies things that are implementation details and not guaranteed. This is why we haven't put it in the docs, awesome of a resource as it is.
- raphlinus 9y agoMy feelings are hurt! Nah, just kidding. An example of the kind of thing that might change, the current stdlib mutex implementation currently depends on pthread mutex objects, which can't be safely moved, so there's an additional allocation to box them. The parking_lot crate is an alternative implementation that interfaces with the system at a lower level, so can avoid this allocation. I found I learned a lot about Rust's low level implementation details when making the chart, so can definitely see how it would be useful for such a class, and am very happy it's being used in this way.
- steveklabnik 9y ago<3 By the way, I'm extremely sad to be missing your talk at the Recurse Center; I'm in Canada until Monday :(
- wasted_intel 9y ago
- lgessler 9y agoSee also: http://rust-class.org/ http://rust-class.org/ (Note though that this uses Rust as it was in 2014.)
- steveklabnik 9y agoYeah, with the caveat that Rust in 2014 was a very different language; we had a runtime back then! http://rust-class.org/0/pages/final-survey.html http://rust-class.org/0/pages/final-survey.html was very instructive to read at the time.
- Dowwie 9y agoIf anyone has looked at web frameworks in Rust, they'll have noticed one known as Rocket (http://rocket.rs http://rocket.rs). The Rocket project is authored by none other than Sergio Benitez, who is teaching Stanford CS140e.
- mcguire 9y agoHow is Rocket, compared to the others? (I don't know that the one I used before is still going.)
- robto 9y agoThere's a really good talk from StrangeLoop about it[0], I highly recommend checking it out. I don't write rust, but it made me want to. [0]https://www.youtube.com/watch?v=QS8mrbAPLJc https://www.youtube.com/watch?v=QS8mrbAPLJc
- akhilcacharya 9y agoI really should not have read that resume. Really doesn't help the overall inadequacy problem.
- shawn 9y agoOn the other hand: At Google I worked with the Gmail performance team to decrease server downtime by detecting anomalous behavior before server failure. I designed and implemented an original anomaly detection algorithm based on local outlier factors. Does anyone have any info about anything related to this? I want to write a program to detect anomalous behavior in my systems too. (Mostly so I can completely ignore the useful information, but still.)
- adtac 9y agoI can talk about my experience writing such a tool during my internship at a bank that rhymes with Oldman Bachs. Bear in mind, this wasn't my original project; since I had finished my first project, I was allowed to work on something else I find interesting. So it will probably not be very robust, but it worked. The tool would run in trading engines and monitor different metrics of performance. CPU usage, while allowed to burst, shouldn't be sustained at 100% for a long time. Typically, these machines are monsterous and have hundreds of gigs of memory; therefore, they shouldn't come anywhere near 100% memory usage either. There's a bunch of other proprietary internal metrics that I can't really explain (stuff like latency of a particular kind of response). Anyway, since I was most comfortable with writing the tool in Python (also, time was a constraint as I started working on the project towards the end of my internship), I wrote a modular tool with pluggable metrics. The reason why it wasn't a monolithic block: if the company decides to add a new metric they want to measure and follow, they should just have to write the logic necessary to retrieve that metric. The rest should be handled by my framework: anomaly detection, alerting relevant parties, and so on. So banged out the framework and had just enough time to write two modules: CPU usage and memory usage (probably the easiest ones). With a simple moving window average and standard deviation, you can identify outliers: I marked everything outside 2*sigma as an outlier as it's better to have false positives than false negatives (but not excessively many false positives as that would be counter-productive and make humans ignore reports). The alerting part was fairly straightforward as there was a built-in tool to do that. I ran a few tests with historical data and it was pretty good at detecting the anomalies that I would mark myself as a human. It could be better if someone smarter than could come up with a machine learning algo to do the same thing more accurately. (I didn't productionize it as I didn't have the time.)
- ihuman 9y agoWhy was the title changed? It used to be "Stanford CS140e: Writing a Raspberry Pi OS in Rust"
- steveklabnik 9y agoHN usually prefers the <title> of the webpage, in this case, that's "Stanford CS140e - Operating Systems". However, it's already a link at stanford.edu, so the first half is redundant, but "Operating systems" is a zero-information title, so "An Experimental Course on Operating Systems" was used instead, as it's the sub-title of the page. I'm not a mod, so I can't say for sure, but I bet that was the thought process.
- hinkley 9y agoProving again that heuristics don't solve problems, they just make them less obvious.
- jzoch 9y agoYeah I figured the original title I put was more informative, but oh well. Hopefully people click it and see its a pretty modern and interesting take on an OS class!
- g051051 9y agoI'd love to follow along, but I don't see a parts list to get the matching parts.
- woodrowbarlow 9y agoAssignment zero lists the following parts: 1 Raspberry Pi 3 (Model B) 1 1⁄2-sized breadboard 1 4GiB microSD card 1 microSD card USB adapter 1 CP2102 USB TTL adapter w/4 jumper cables 10 multicolored LEDs 4 100 ohm resistors 4 1k ohm resistors 10 male-male DuPont jumper cables 10 female-male DuPont jumper cables
- g051051 9y agoYes, I saw that, but it'd be nice to get the exact same components if possible. It'd be even nicer if the same pack the students got was available from their source.
- freehunter 9y agoWhat do you mean by exact same components? Cables are pretty much cables, LEDs are LEDs, resistors are resistors, and a Raspberry Pi is a Raspberry Pi. Other than the Pi, brand names don't really matter too much in this space.
- g051051 9y agoI'm haven't done any electronics stuff before, so I didn't know that.
- planteen 9y agoThat list is a bit under-specified for an absolute newbie to electronics. A link to Digikey or Mouser would be helpful. A resistor just isn't a resistor, for example. I imagine they really mean a 1/4 watt 5% tolerance thru-hole resistor for use on the breadboard, for example. Someone who orders a surface mount 0402 1k resistor is in for trouble...
- 9y ago
- kaycebasques 9y agoSounds cool! Mildly related: I found "Nand To Tetris: The Elements of Computing Systems" to be an amazing, bottom-up, hands-on approach for learning about the fundamental layers of computer architecture, from hardware to assembly to OSs.
- chucksmash 9y agoA wonderful complement (albeit with significant overlap) is Charles Petzold's Code. It's written as prose so doesn't include exercises but the book is infused throughout with the mastery attained by its author. His synthesis of different ideas and the historical context he provides give a very nice perspective on computing. While nand2tetris makes for a good textbook to work through, Code makes for a better subway read.
- pmarreck 9y agoDoes anyone else think it's time for a new and promising operating system? The hegemony of OS X/Windows/Linux has basically gone on for a generation. Shout-out to BeOS (the old geeks will know of it) which was the last promising new OS I encountered... and that was many moons ago
- baq 9y agoit'd be certainly nice, but writing a kernel is easy compared to having working device drivers - that's hard enough on windows/linux/macos...
- RandomInteger4 9y agoIs it the writing of device drivers that's the difficult part or just the fact that there's so many devices to write drivers for?
- pjmlp 9y agoBoth.
- Const-me 9y agoBoth but I think #1 is harder to solve/workaround. Many modern devices (GPUs are most famous for that but there’re others, e.g. printers) include their microcode/firmware/binary blobs as a part of their device driver. Technically you can reuse these binaries for different OS, but legally, at least if you’re on American soil, you can’t.
- hedora 9y agoIt depends on what device you are writing drivers for. I’ve done a few in userspace, and it can take between 60 minutes (with simulation for testing) and a few engineers a year. That’s ignoring stuff like filesystems, network protocols, shader compilers, or whatever else you need to get basic functionality out of the device. Also, a given chip might require anywhere between 2-3 drivers (for something simple like a power controller) to hundreds + a stand-alone OS (for things with an embedded microprocessor, like a drive or some fpgas) It is tedious work, but I’d love to see the BSD’s band together with a hardware manufacturer to produce a high end consumer-grade laptop with a 4-5 year production lifespan, and well-supported hardware. There haven’t been any noteworthy hardware improvements in that space in the last 5 years (arguably a 2013 MBP is better than a 2018 one in most ways), so this isn’t as crazy as it used to be. These laptops could be similar to Windows laptops also sold by the same vendor, which reduces engineering costs. Dell sort of does this for Linux, but they churn the models too quickly for the BSD’s to catch up, in practice. The vendor could rotate a new model in every 2-3 years (maybe rotate form factors each time), and make it a sustainable business. There is precedent for this in the embedded space. Look at PC Engines, for example.
- emh68 9y agoRust + OS design seems like the sweet spot for teaching future systems programmers. Nice idea!
- lalwanivikas 9y agoIt looks like you need to be a Stanford student to be able to watch the lectures. Can anybody here recommend a good OS course(video preferably) for beginners? I am a self-taught developer and would love to learn it in my free time.
- ozanonay 9y agoBerkeley's CS 162 is great, and recordings are available on internet archive. There are some decent undergraduate textbooks these days too: OSTEP is particularly accessible and free online, and the Tom Anderson _Operating Systems: Principles and Practice_ book is solid.
- atak1 9y agoYou don't really need the lectures - I took the main version (cs140) with ousterhout. His notes are condensed and give you a good summary of the basics. They're also open to the public: https://web.stanford.edu/~ouster/cgi-bin/cs140-spring14/lectures.php https://web.stanford.edu/~ouster/cgi-bin/cs140-spring14/lect...
- atomicnumber1 9y agohttps://www.ops-class.org https://www.ops-class.org
- jlebar 9y agoIf any Stanford students are reading this wondering if they should take this class: Engler was one of my favorite professors at Stanford. He's kind, sharp, well-prepared, and consistently delivered great lectures. One of the things that made him stand out to me are the insights he provided beyond what's in the papers we read in CS240. You can read the papers yourself, but the papers won't tell you things like "I think the reason this paper was accepted is different from the reason the author likely thinks it was accepted." He's awesome, take his class. Find a good team, and, um, don't underestimate how much time CS140 takes. :)
- random3 9y ago> "I think the reason this paper was accepted is different from the reason the author likely thinks it was accepted." That's a great perspective to have! I wonder if opinions like these are available online - I'm thinking in a format like Adrian Coyler's morning paper. I would love to read opinionated, yet highly educated material.
- bitamess 9y agodawson Engler, you talking about?
- jlebar 9y agoCorrect, one of the people listed as teaching this course.
- zodiac 9y agoWow I saw this page first without realising it's him. I remember being blown away by his research, and the fact that they're in separate areas (symbolic execution and exokernels). It seemed like he'd stopped publishing a few years ago - do you know why?
- srcmap 9y agoIs the goal of the this class teaching student how to re-write the Pi3 's kernel/driver in Rust? It is not that clear from the course syllabus. "This course covers the following topics: Disks, File systems, I/O, Threads & Processes, Scheduling, Virtual Memory, Protection & Security, Interrupts, Concurrency & Synchronization." In theory, if those are the goals, one doesn't need Rust as part the first week's lecture. Rewriting the Kernel in Rust sure makes a very interesting (and very tough) way to learn OS in 3 months.
- capkutay 9y agoIs this supposed to be a replacement for using PINTOS to build an OS in C? I remember the PINTOS projects as one of the most rewarding things I worked on in my college career. https://web.stanford.edu/class/cs140/projects/pintos/pintos_1.html#SEC1 https://web.stanford.edu/class/cs140/projects/pintos/pintos_...
- jzoch 9y agoIts an alternative. Rather than using a virtualized environment, you build everything yourself for a raspberry pi 3. No scaffolding, nothing. and its in Rust!
- foobaw 9y agoI'm glad they transitioned into Rust. OS classes I've taken before were nowhere this cool.
- clw8 9y agoUV actually had a Rust based OS class four years ago! The language was at something like 0.7 so I'm really excited to have this course with up-to-date Rust.
- anocendi 9y agoSweet! I have been looking for a good opportunity to build something with Rust in a domain I already know, and this looks like a right mix of everything!
- trisimix 9y agoSeems the chances of a non stanford student getting this class is pretty slim. Super lame.
- jzoch 9y agoI am currently taking the class. Its an embedded systems + OS class that undertakes the challenge of writing an operating system for a raspberry pi 3 in Rust. The lectures aren't recorded sadly, but its the first time offering something like this and both Sergio and Dawson are fantastic professors!
- wcrichton 9y agoNote that the "e" is inspired from CS107e [1], the experimental version of "Introduction to Computer Systems". 107e also uses a Raspberry Pi to help students incrementally build up a working knowledge of basic system components including the processor, memory, and peripherals. [1] https://cs107e.github.io/ https://cs107e.github.io/
- peonicles 9y agoRust + Rpi interests me and I might wanna follow along. Are they using an available kit from an online retailer ? Getting/shipping individual parts is a pain where I'm from.
- nafizh 9y agoCan someone point to a reliable website where I can buy the required materials? I think this is going to be a big question for beginners.
- wemdyjreichert 9y agoWelp. I dont even go to Stanford, but applied anyway cause it looked good. Wish me luck getting in :)
- StillBored 9y agoI guess its "experimental" as in your will in a lab setting with experimental (rust!?) code for traditional operations on an rpi. Not that you will be experimenting with new OS concepts. Which is sort of a shame because it seems much of OS research might be turning back to concepts that haven't been explored since the "RISC/unix" revolution in the late 80's early 90's proclaimed that multiple privilege level machines, capabilities, full ACL controlled operations, message passing kernels, and dozen's of other concepts wern't "fast" or fell to the wayside because the RISC and traditional unix model couldn't support them, while we continue to pay a huge hidden tax for the flat address/paged memory model...
- Jupe 9y agoIt seems the 2 biggest hurdles of creating a new OS (aside from designing and actually writing the damn thing) is software support and driver support... Silly idea, but how about a "super" terminal OS... that does a few primary things: 1. Responsive clients for various UIs (X, VNC, RDP, SSH, Powershell, etc.) - Having a full UI to use my smart phone would be awesome. 2. Run VMs (which can run docker, etc.) 3. Uses some mechanism (wave hands here) on the remote machines to facilitate storage, computation?, graphics, audio, clipboard and printing on the local terminal. 4. Strong support for a few devices. Pick a few network cards and graphic cards to support, perhaps a few other basics, and leave it at that... I know it would still take years of writing a LOT of code, but this could reduce the lack of software support. Drivers are still a sticky issue... (Yeah, like I said, a silly idea!)
- sprayk 9y agoPlan 9 sorta does 3. Can execute on one device, display on another, play sound on two others, and store wherever. This was always my pipe dream w/ that OS.
- rcarmo 9y agoI’ve been moving towards this for a couple of years. Right now a minimal Linux with Firefox and an RDP client will do 90% of what I need, and I would run the whole thing off a Raspberry Pi 3 if it supported dual monitors. Ironically, Windows Home also qualifies, and new low-end fanless PCs can drive 4K displays, so I’ll likely be running a setup like that by Summer, with zero local data except remote connection settings.
- nafizh 9y agoI have made a list of all the materials needed for this class with amazon links. Hope this helps people who would like to pursue this course from outside Stanford. 1. 1 Raspberry Pi 3 https://www.amazon.com/Raspberry-Pi-RASPBERRYPI3-MODB-1GB-Model-Motherboard/dp/B01CD5VC92 https://www.amazon.com/Raspberry-Pi-RASPBERRYPI3-MODB-1GB-Mo... 2. 1 1⁄2-sized breadboard https://www.amazon.com/Qunqi-point-Experiment-Breadboard-5-5%C3%978-2%C3%970-85cm/dp/B0135IQ0ZC/ https://www.amazon.com/Qunqi-point-Experiment-Breadboard-5-5... 3. 1 4GiB microSD card https://www.amazon.com/Samsung-MicroSD-Adapter-MB-ME32GA-AM/dp/B06XWN9Q99/ https://www.amazon.com/Samsung-MicroSD-Adapter-MB-ME32GA-AM/... 4. 1 microSD card USB adapter https://www.amazon.com/Adapter-Standard-Connector-Smartphones-Function/dp/B01BXSKPES https://www.amazon.com/Adapter-Standard-Connector-Smartphone... 5. 1 CP2102 USB TTL adapter w/4 jumper cables https://www.amazon.com/KEDSUM-CP2102-Module-Download-Converter/dp/B009T2ZR6W/ https://www.amazon.com/KEDSUM-CP2102-Module-Download-Convert... 6. 10 multicolored LEDs https://www.amazon.com/Multicolor-Flashing-Changing-Electronics-Components/dp/B01C19ENG4/ https://www.amazon.com/Multicolor-Flashing-Changing-Electron... 7. 4 100 ohm resistors https://www.amazon.com/dp/B0185FCR66/ https://www.amazon.com/dp/B0185FCR66/ 8. 4 1k ohm resistors https://www.amazon.com/dp/B00CVZ46FM/ https://www.amazon.com/dp/B00CVZ46FM/ 9. 10 male-male DuPont jumper cables, 10 female-male DuPont jumper cables https://www.amazon.com/Haitronic-Multicolored-Breadboard-Arduino-raspberry/dp/B01LZF1ZSZ/ https://www.amazon.com/Haitronic-Multicolored-Breadboard-Ard... Edit: edited for solderless breadboard link rather than a solderable one.
- tzs 9y ago[Report of incorrect link deleted, as it has been corrected] For the 100 and 1k resistors, I'd recommend something like this: https://www.amazon.com/PIXNOR-Resistor-1ohm-10Mohm-Resistors-Assortment/dp/B00SD6F6FC/ https://www.amazon.com/PIXNOR-Resistor-1ohm-10Mohm-Resistors... That includes 20 1k and 20 100 ohm resistors, plus 20 each of 54 other assorted resistor values, and it costs slightly less than just buying the 100 ohm and 1k 10 packs that you suggested.
- jzoch 9y agoNo that is not the correct one, we are using a solderless board.
- godelmachine 9y agoCan anyone from any corner of the world register for this class?
- juanmirocks 9y agoI wonder: is there room for a new OS to truly surpass Linux/Windows ? I would love to see more commercial success for micro/nano-kernels (vs. the staple monolithic kernels)
- baumbart 9y agoCould someone explain to me how Golang would compare to Rust for this purpose? I'm a Golang newbie and I always wondered if it would be possible to write an OS in it (+ some assembly).
- chillydawg 9y agoGolang isn't generally suited to real time or near real time systems (like operating systems) because of its garbage collector. It will pause (not for very long) whenever it likes to tidy up and that can cause problems when interacting with hardware where timings are potentially critical.
- baumbart 9y agoThanks, makes sense!
- vardhanw 9y agoFor anyone interested in following up on the course, I have created a cs140e subreddit [0] as I think it will be useful for those interested. Feel free to join. [0] http://www.reddit.com/r/cs140e http://www.reddit.com/r/cs140e