Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Custom Kernels Used In Comp. Sci Programs? 161

pdowner asks: "I've just finished and handed in my latest Operating Systems Inmternals assignment for my degree in Computer Studies. It involved writing/modifying a timer module for a Microkernel implemented in modula 2, which is written by one of my lectures and is available from here. I am interested in finding out what microkernels other universities use to teach their students the insides of Operating Systems."
This discussion has been archived. No new comments can be posted.

Custom Kernels Used In Comp. Sci Programs?

Comments Filter:
  • by Anonymous Coward
    "Yes, Craig?"
    [BeginPrejudice]
    You forgot that most (if not all) professors don't memorize people's names (unless they are around them alot).
    [EndPrejudice]
  • by Anonymous Coward
    Here at Cornell we have developed an exciting new non-partisan educational techqnique. we don't learn anything in our OS class (CS414). Just ask prof. daniel mosse (mosse@cs.cornell.edu) or project class instructor ranveer chandra (ranveer@cs.cornell.edu) what we did. uhhh. 'page table' or something. yeah. storage server my ass ranveer, that was the dumbest f'ing thing i've seen my entire ass boring life. cornell sux0red it up on that one.
  • by Anonymous Coward
    Yeah, the project class is just that storage server thing in Java. When I took it last year, we were told to work in groups of 3 or 4. At least this year they trimmed it down to 2 -- even though 1 person should be able to do it (I know since I did all the work). Surprisingly, even with groups of 4 people were having problems. Whats wrong??? Are they just cramming too much theory stuff and not teaching enough programming? I don't know. I like the theory stuff, but just wish we had more relevant work for applications based classes.
  • by Anonymous Coward
    Uses a port of minix that runs in user mode on Solaris called Solaris Minix [canterbury.ac.nz]. Currently (last time I heard) it's used in the OS component of COSC301 [canterbury.ac.nz] and used to be used in COSC403.
    It uses the solaris calls for context switching. The year I did the course we traced through a system call. For a trivial call (getpid() off the top of my head) we went through the minix user mode libraries that effectively trapped to the solaris kernel and out into the interrupt handler for minix (which was a wrapper for SIGUSR1) up into the kernel, through several context switches into the memory manager and back, etc.
    It worked well as a teaching system (after all, that's what Minix was designed for) and has the advantage of running hosted in user mode and not taking out an entire computer to run it. Emulating things like a MMU involved some rather hacky solutions, but all the basic functions of an OS could be implemented in user mode. In fact, examining some of the emulation techniques used was quite educational.
  • by Anonymous Coward
    There's a really nice Operating System textbook written by Andrew Tannenbaum that is written around an OS kernel [cs.vu.nl] that's form fitted for student use.
  • Georgia Tech's CS3210 class [gatech.edu] (OS Design, the first in the Systems specialization) is taught exclusively by tinkering with the Linux kernel. We use a Compaq test platform that runs on the ARM processor. Students were organized into teams of three; each team was issued a board to run all their test kernels on. It's still a very new course, so nothing is etched in stone -- they're adding more material each semester -- but this semester we had projects wherein we tinkered with the scheduler & played with devices. It was still pretty much an overview, but I think with more preparation and time it should turn into a great course. I took it this semester -- turned in the final exam on Tuesday -- and really enjoyed it.
  • At UT austin my OS class was taught using Minix, and the sad thing is that they printed the full source in the book. So the book was several hundred pages of crap.
  • Actually, the same guy (Dave Johnson) that introduced Yalnix here began at Rice (and is back there now).
    Supposedly it's pronounced y'all nix in respect for its Texas origins.

    elwing
    (from CMU and Texas)
  • Well at Washington State University (GO COUGS)... We wrote our own version of Minix and used A small linux kernel to teach the boot process from a floppy. http://www.eecs.wsu.edu/~cs460 [wsu.edu]
  • Yow, I've heard of documentation that writes the program but this is ridiculous! :)


    --
  • I love this book, and it has taught me a bunch even though I've never had a chance to use XINU. By the way, in case you've never heard of it, XINU stands for XINU Is Not UNIX. :)
  • This is undergrad with 2 person groups... It is usually taken by Juniors and Seniors
  • I'm upset to hear that people still do things like that to hardware.

    Any clue as to when they'll be implementing the local digital version of Halloween? Just think, perfect reproductions of your hardware-bashing bananza!

  • We used to have a kernel writing assignment on the second year, which by now (I think) has devolved to implementing features of a kernel like scheduler and drivers for units. For those of you who understand Danish (yeah - right) the link to the relevant page is here [www.diku.dk].


    Now back in the old days of '91 when I took the course, we actually implemented a whole kernel in 68000 assembler on old eurocard-based Motorola machines named after dead greek philosophers... but those machines have by now sadly passed away. One was auctioned off as parts at a party, one went to the internal museum of ancient computer parts and one was used as the Danish analog to a piñata at our local analog to Halloween :)

  • hey rob, its avatar... cool to see some other towers/AAST people posting on slashdot... and useful info too!, who woulda thought... who knows if you'll ever see this either...

    - avatar - (noy)
  • Huh? Nachos isn't microkernel based, unless that's changed since I used it (and that's a BIG change); there's no message passing or separate services. It's monolithic.
  • for all those looking for more info, check out the lab's homepage http://fossil.wpi.edu [wpi.edu]. and also a little thanks to prof finkel for making the last project NOT involve a thousand reboots.
  • Yay, a chance to rant about something that has been bugging me for a while. First, I took a "UNIX" course last year and we had the option of installing and learning a bit about Linux. 4 of us (class of ~30) took the challenge and played around with it, but got no support or guidance - and I'm paying tuition for this remember. The course focused more on Digital UNIX and turned out to be more of a primer and even more of a disapointment. Which leads me to my rant.

    Ever since "computers" and "technology" has become more prominent and all these agencies scrounging for IT workers, a new trend has developed. I look around my class and see people who are not so much interested in technology as much as the jobs that they will find. They are not interested or curious in even the slightest sense and take the joy out of playing with computer technology. It saddens me to see our instructors to teach to the LCD and not even TRY to encourage people to branch out and THINK for themselves.

    Maybe I chose the wrong place to study so I would like to ask the /. crowd about their experiences with other students. Is there a growing trend with people intrested solely in the possible monetary gain and less about learning and experiencing cool computer tech?

    Bah. end-of-rant.
  • It's sad that money makes the world go around, but it's a fact. We are led to believe, when we are young, that if we do what we are interested in then we will be happier and more productive. Its sad when people don't heed this advice.

    You're right: if they make it easier, more people pass. More people passing means more money for the school. Sadly, this perpetuates (ugh) the problem of un-interested parties and removes the challenge from the course.

    Life should be a challenge... if it was all easy then what would the point be?

  • Dude: Welcome to the real world. 99.9999999% of all people are sheep. What's worse, if given the opportunity, 99.99999% of them will choose slavery over freedom. Where do you think the various socialisms (fascism, marxism, stalinism, leninism, maoism) get their serfs?

    Sorry for being a dreamer; someone who, for some fucked up reason, thinks that the world could be more than it is. A scary thing may be that I believe in text-book socalisim (a dream that can never be realized) and dream of world peace. No, I'm no tree-hugging flower child, but I wouldn't mind a bit of peace now and then.

    I do tech-support. I do it because it makes me happy and makes me feel like I contribute something. Too bad most people seem to be stuck in that "take-take", "me-me," mode. Bah, but I don't let them get to me.

    Freedom exists in your mind; you just have to know where to look.

    bah... whatever... enough happy shit for one day.

  • well, almost. At WVU, we basically take DOS, and slowly take over the various functions of DOS as the semester progresses. By the end of the semester we have a shell, a dispatcher(our OS is multiprogramming, unlike DOS), drivers for printer and serial port, and other such stuff. We talk about File Systems and memory management and virtual memory, but don't implement them(we use FAT, and the support routines to interface to our code are written for us).

    The coding is done in C, and I don't think I've ever spent as much time in a programming class or learned more about software engineering in a semester.
  • The computer engineering program at the University of Waterloo [uwaterloo.ca] (in Canada) doesn't use a specific OS to learn from (although the textbook uses the traditional ones for examples - NT, *nix, particularly Solaris).

    Instead, the project is to design (from scratch, including a design document) and implement a real-time operating system on an embedded system (currently Motorola [motorola.ca] Coldfires [mot-sps.com]).

    One should note that QNX [qnx.com] came out of the UW CS real-time course, not the OS course.
  • They were lucky, we had to write our own language to translate the linux kernel into! Uphill in the snow BOTH WAYS!
  • I'm a UW CS student as well.

    I just had to point out how ridiculous it is that the Linux Operating Systems course website was created in Microsoft Frontpage.

    I hate our CS department. So Microsoft-ish. Bleh.

    *sigh*

  • Hah --- you joke, but it's almost true. In my operating systems class at University of Washington (in Seattle), we looked at parts of NT code, and our professor (an ex- microsoft kernel programmer) was trying to arrange for the next quarter to have access to the full Windows 2000 source code. I'm not sure if that ever happened, though.

    Our class worked on modifiying NACHOS.

    The current class is working on modifying Linux.

  • At Rice [rice.edu] we used Nachos as well. The last year they offered the class in both C/C++ and Java. One of the labbies had port the OS over to Java. Not a simple project but doable. Just letting you know there is another option out for Nachos.....

    Spoonz
  • At Lehigh we use three Operating Systems:

    Linux
    Win32 (NT/98)
    Minix

    For filesystem calls Minix. Linux make a good study, but difficult for assignments. MS does not seem to share its code for study. We used win32 and Linux to learn networking calls (a few people used Solaris instead of Linux, left about 20 hung processes on our main Solaris server).
  • by synx ( 29979 )
    not entirely true, i have a book called 'operating system design volume I the xinu approach'

    there is also tcp/ip stuff for it, and i understand a networking course uses xinu for that... not sure exactly.

    the copyright is 1988, but its still in print.

  • Nah, its probably the same think you had. BlockTransfer(), and yfs.h ;-) The rest was all up to us...
    --------------------------
  • Yea, we used Minix last year here at Drake. Oddly enough, we played around with process scheduling and other process table goodies for an assignment. I'd have to disagree with you on the debugging part though, the source is small enough that it's not too hard to completly understand. That makes debuging quite a bit better.
  • Not Another Completely Heuristic Operating System (N.A.C.H.O.S.) was our OS training ground at USC. From the memory that I haven't repressed, it was a big steaming pile of stuff distributed by Berkely as a learning OS.

    Not much fun.

  • I think the University of Toronto uses the Mach kernel in its OS courses.
  • Yeah, just like how the guy that wrote the book I was forced to buy was writen by a guy who wrote the OS in Java. That does not mean that it is a good language to be programming operating systems in.

    Obviously, I didn't buy the book, and get a better Modern Operating Systems, by Tanenbaum. The book was about 8 years older, but still covered 90% of the course content.

    Sometimes you just can't beat the oldies, like Tanenbaum or Stevens... ahh...
  • The course is offered on the Fredericton campus. CS4405 if you're interested. Took it last year and it was pretty good.
  • We used & wrote code snippets (ie timer / disk scheduling algorithms ..etc). It would have been very nice to a real OS. But every one in CS was a Linux geek :-)

    For my final year project we worked with RT-Linux (in 1998, when it was just shaping up). We basically replaced a RTOS called UNOS (developed by University of New South Wales) with RT-Linux. I think UNOS is dead now (or very limited use)

    But again I was an undergrad, so may be post grads do muck with the real thing.

    LinuxLover
  • At EIVD [www.eivd.ch], Switzerland, we use OSP for our Operating systems courses. But we're only on our second assignment and we're already running into a lot of dead ends because we don't have any documentation on it and can't find any on the web.

    I'm not sure if it's still used, but when I took Operating Systems (CSC 370) at UNLV [unlv.edu], OSP was the framework within which we wrote a memory manager and a process scheduler. As I recall, documentation for OSP was a thin staple-bound book in a dark blue cover; it couldn't have been much more than 50 or 60 pages. Since I took this course back in '92 or '93, it's definitely a fairly old product by now. I don't know if there ever would've been a website associated with it as almost nobody had heard of the Web or was using it in any serious way at the time.

  • Harvard also uses this for it's undergrad OS class.

    It's certainly not a microkernel though. It's a monolithic kernel running on a MIPS emulator that doesn't have any real device driver system. Granted device drivers aren't really worth teaching in an OS internals class.

  • when i took this class the profs were so frustrated with drop outs we didnt have partners... the project was not complex though...
  • I'll be taking it next semester, but currently the course is taught using minux.

    old skool.
  • COMP9242 - Advanced Operating Systems at The University of New South Wales uses the L4 Microkernel as the basis of its course:
    http://www.cse.unsw.edu.au/~cs9242/intro/intro.htm l [unsw.edu.au]

    The textbook that the University of Colorado has a good deal of information about the Mach microkernel (orginally derived from BSD), (although most implementations of Mach are somewhat old and/or abandoned). Mach had its hayday a few (like 8 or more) years ago (with Digital's OSF/1 and the NextSTEP system using the Mach2.5 implementation), but is currently pretty obsolete. The Hurd uses the GnuMach implementation (based on Mach3, i think), but is moving toward a better microkernel abstraction and to the L4 microkernel specifically.

    There is a small OS that was build on top of the L4Ka implementation for a class project, called ChacmOS, and the authors graciously GPL'd the source. This is a wonderful source of information regarding the L4:
    http://www.l4ka.org/projects/ChacmOS/ [l4ka.org]

    And a page dedicated to L4:
    http://www.cse.unsw.edu.au/~disy/L4/ [unsw.edu.au]

  • "comp. Sci" is not a word.
  • Um, John, sorry, but I can't remember which John you are. And you posted anonymously too.
    Email me at slowping@yahoo.com.
  • We also use a VERY simple OS in our processor arch 2 and 3 [calpoly.edu] classes. For the purposes of teaching fault handling/vector tables, virtual memory and such; students are given a simple framework of code for a MC68k simulator as well as the microcode for the processor as writen by a prof [calpoly.edu] (and being re-writen in java by a student now). Students are required to perform a number of labs implementing the above features in 68k assembly.

    As a first timer, I learned a lot working at such a simple low level with a simulator I could modify and beat heck out of.

  • Cal Poly SLO [calpoly.edu]'s CSC [calpoly.edu] department uses the 2.0 Linux kernel for our OS classes.

    Why use 2.0 and not something bleeding edge? Documentation and commentaries are more available for the 2.0 series. We used David A Rusling's The Linux Kernel [calpoly.edu] online book, Linux Kernel Internals [fatbrain.com] edited by Michael Beck and Tanenbaum's Modern Operating Systems [fatbrain.com].

  • We worked on Nachos for the undergrad OS course at Louisiana Tech [latech.edu] as well. I don't think many real world operating systems are programmed in C++, but as a learning tool, I feel like (in retrospect) it did the job: C++ is the language we used in most of our coursework, so it was well-covered ground. We were more comfortable learning concepts like virtual memory and task switching (and implementing them) without getting bogged down in a lot of low level C and assembler.
  • At Rice University we have a Java version of Nachos. Of course, not all of our assignments are done using the Java version, since it is an OS after all.

  • ...uses a mixture of mini-programs (for stuff like a process/job scheduler) and the Linux kernel (making us add in system calls and use them).

    The interested reader is referred to our project list [vt.edu]
  • At EIVD [www.eivd.ch], Switzerland, we use OSP for our Operating systems courses. But we're only on our second assignment and we're already running into a lot of dead ends because we don't have any documentation on it and can't find any on the web. BTW, even our teacher doesn't have some documentation on it. Otherwise it seems to be a good system to simulate an operating system and is really easy to debug.
    CU.
    Zeiram
  • from the ground up on SGI indy boxes with MIPS 4300 CPUs

    pretty cool really, the first 3 weeks of the class are a team effort led by the prof to get a basic kernel up with threads and a serial port driver(no easy thing on SGI hardware, it's pretty fscked up)

    then the rest of the class was spent in 3 person teams hacking 24/7 to add features (no porting of existing stuff from linux, had to be ground up)

    we added dynamic memory, a VFS, a GUI, and attempted a scsi driver, but a wonky scsi floppy drive stopped that.

    at least that was what they did when I was there.

    I heard that some cheese head was trying to make them start using nachos..

  • by mclearn ( 86140 )

    For the Advanced Operating Systems course and Distributed Systems course at Saint Mary's University [stmarys.ca] in Nova Scotia (Can.), we used a custom kernel called Lego. Unfortunately, it has nothing to do with the toy -- it is based on the fact that it is a microkernel with modularity similar to Lego building blocks (insert/reuse/replace).

    For more information, you can see Dr. Hughes' work (and students') on Lego here [www.dal.ca].
  • They dropped CS307? I must have been in the last bunch through. IIRC, it used Minix for the final two assignments, on top of which we had to implement some syscalls, and write a shell. It was a pretty good subject.

    I just finished an embedded systems subject that used uCOS/ii, a little RTOS, to make a network "phone".

    --zaugg

  • The University of Waterloo's operating systems course requires you to implement a message passing microkernel. There are a number of "spin off" companies, started by Waterloo grads and/or profs, who have commercialized this microkernel design. One is QNX [qnx.com], another is CacheFlow [cacheflow.com], and I'm sure other slashdotters can add more to this list.
  • Minix rocks!. Get the book from Tanenbaum, it has the source in hard copy, and a CD in the back. It was written explicitly to be played with as a teaching OS. The code is very understandable, so implementing anything is a snap.
  • If you *just* finished the last homework then you better not have used any of your late days on the other assignments considering Nieh only gives 3 late days :P The last assignment was easy. --Another Columbia student in the OSI class this semester.
  • Almost all progresses in the field can attribute to the "obscure, academic tools". And, the use of a diversity of tools frees students from the mindset of always using the favorite tool of the year, and can make them more flexible on changes.

    In Waterloo, our first year CS courses used to be in Pascal when I took it. Now they're in Java. Onto the second year stuffs - used to be Modula-3 only. Now people can choose to work on M-3 or Java (M-3 is superior language-wise, thus more suitable for teaching). 3rd-4th year courses use C, C++, Java, Scheme, Tcl...and, in some courses you are free to choose your tools. Perl, Python, Matlab, Ruby aren't uncommon.

    What if 6 years from now C++ isn't the tool of choice anymore? People using a variety of tools tend to switch faster. And, C++ is not a good OO language - .h files exposes too much of the object internals.

    And Java? Hm...I haven't seen a fast and stable JVM yet. There aren't many good native Java compilers either. And we're talking about microkernels here...do you think Java is the right tool for an OS kernel, before a good native compiler exists?

    Well, everything said, you've made your own choice. So all the best with it.
  • I know Georgia Tech uses Linux for their OS and Embedded Systems course here. (Though I haven't taken the newly revised courses, when I took it we used solaris)
  • E&CE 354 [uwaterloo.ca], a compulsory Computer Engineering course, we are given a shell of an OS kernel, which is written by the profs/department.

    It's the project component [uwaterloo.ca] in this RTOS (Real Time OS) course. The hardware is the Motorola Coldfire board, interfaced to a PC or to a remote linux server (to compile on sparc, dl to Coldfire remotely - the prefered method). We write it all in C (and a small requisite amount of assembler for manipulating the stack).

    We got knee deep in the stuff real quick. Working in groups of four (God help those with only 3 members - there were 4 project courses that term!), our group managed to do all the writing, testing, and demoing in 7 days of near around-the-clock group work. We basically went home only to shower during the coding. *Sigh* probably all Comp Eng's get wistful thinking of that course (or have near mental breakdowns).

    Anyhow, we had to demonstrate working timer functions, interrupts, serial ports, scheduler, memory management, etc. The kernel was given to us as a skeleton, we put the guts into it.... some groups even wrote a game.

  • I had the OS course with Satya. The best professor/class I've ever had - to this day I use concepts learned in that class. I think this guy is just bitter since they upped the units from 12 to 18 after he took it.
  • Here at NIU, we still have our trusty IBM S/390...

    The best OS class will simply tell us how SJF or RR scheduling works... no code really...

    Peace out.

  • Anyone know of of a very small OS... one that will simply boot a machine to a prompt, nothing more?

    Just wondering...
  • I don't know of any existing programs using it, but if I were teaching an OS class I'd use The HURD, simply because of its modularized design, which should make it very easy for students to get up to speed -- and which, while allowing users to safely do kernelspace development, would permit a few boxen to be put up and used by the class. It may be too slow for actual use, but in theory the HURD kicks ass -- and it's the theory that students need to get at this level.

    Plus it's Mach-based, and thus gets the "trendy" sticker on it for using a microkernel! Woohoo!

  • I took the second (out of three) Operating System course here at state.

    The first one (CSC202) is basically threads and stuff. Maybe you'll get to modify a fake scheduler; woo hoo.

    The one I just took (CSC451) is pretty cool. Everything we did was usermode, but still... The course is taught in C. We wrote a typical utility (sortuniq -- roughly equivalent to 'sort | uniq -c', but as one command; I just used a binary tree), a simple file system ("MiniMinix"; it's the Minix filesystem with stuff taken out), a shell (implements pipes and redirection, but no other real metacharacters or built-ins) and a tftp client-server (that should work with real tftp; the server is threaded).

    The next class, CSC452, is being discontinued in favor of CSC492, I think. This basically gets students working on projects with industry. However, I don't know what kinds of OS projects we're going to find; it should be interesting...
    ---
    pb Reply or e-mail; don't vaguely moderate [ncsu.edu].
  • We used it at Taylor [tayloru.edu] as well. As a sad note (or maybe not...) I learned more C than I did about OSes. Also I learned about how group projects are supposed to work, as a group! All in all it was a great experience.
  • Here at Brown, we have a class where you write your own operating system kernel, entirely from scratch. Some userspace code (libc and a linker-loader) is given, but that's it. (it also runs in a clever `virtual machine' using mprotect tricks)

    The kernel is actually fairly similar to Linux (or any UNIX for that matter). It used to be a C++ object-oriented microkernel, but obviously that was changed. (I think it was because of student interest, actually)

    Admittedly, about all it does is boot and run programs on a System V filesystem with simple virtual memory (no swap even, unless you do extra credit), but it's still a pretty cool project :)

    Daniel
  • Custom kernels are very useful in University. I doubt I would be able to make it through midterms without my Orville Reddenbacher.
  • by Ed Avis ( 5917 )
    At doc.ic.ac.uk [ic.ac.uk], the second year students get a lab exercise [ic.ac.uk] to modify Minix [cs.vu.nl] (which is, of course, a microkernel design). Last year it was adding a new kernel task for debugging and a user process which sends messages to this task to step through programs and set breakpoints. The number of layers a system call goes through is rather scary. Still, it's no worse than on Linux or any other complex OS, just more explicit.
  • > Guess which one University of California at Berkeley uses. Some nachos thing.. they should use BSD.. mb

    Why? Just because they created it doesn't mean they're stuck with it. If it wasn't for Berkeley, we wouldn't really have Unix either, it'd still be a buggy stripped down bastardized commercial OS ... hey get them a copy of NT quick!


    --
  • >What commercial grade microkernels are
    >written in Modula-2?

    Technically I don't know of any microkernels written in M-2, but the AS400 operating system is written Modula-2. It might not be anymore, but it was originally. I know because I interviewed with IBM Rochester in 1988 and that's what they were doing. The AS/400 was new back then and they were selling like hotcakes. I had Modula-2 experience so that's why they considered me.
  • Oh man, that brings back memories. When I took my first Operating Systems class at Illinois, I was thrust into C++. It was the same kind of deal. "Hello class. All of your MP's for this class will be written in C++. If you know C++, great. If you don't, we recommend that you learn it." At least we didn't have to use templates and exceptions. Never did have any classes in Modula-2 though.
  • You gave the answer right there: Module-2 is a great teaching language. That is a good enough reason to teach it for beginning CS students. But at the same time it shouldn't be used for upper division course work.

    When I went to university, the first CS class was Pascal. That was a primo decision on their part. I learned how to program instead of how to fiddle with syntax. Today, Pascal would still be a good choice for CS101, but I would also add Java and Python. After that, the next class was assember (PDP-8).

    Then, to our horror of horrors, we were thrust into "real" programming. "This is Unix, this is C, you know nothing of them, but the first assignment is due this friday". It was rough those first five days, but since we were firmly grounded in programming as opposed to syntax, we made the transition with flying colors.
  • I've done three OS projects now. I was one of the first two classes (I'm not sure if it was the second year or the first) at CMU to do Yalnix. I TAed a course in Nachos at a different university and I worked through the minix stuff for my own edification..

    I hope Satya still runs it at CMU. He is truely the best of the best, a brilliant OS expert and among the best professors I've ever worked with, he can take difficult concepts and make them into very easy to understand ones and do it completely and in a nearly poetic way. If you can take his course, take it. Anyhow, when I did yalnix they gave you a virtual machine and told you how to compile code for it and that was it. I believe we did 5 projects, 1) was the standard freeby, had to debug a multithreaded queue application. 2) was a serial terminal driver, only difficult if you didn't know how it was supposed to work and had to grapple with understand that as well as writing the code. 3) Was where it hit the fan, we implemented the kernel here, 5 or 6 weeks, we implemented the syscalls, the scheduler, and the memory managment. 4) Kind of a lob, you made yalnix run arbitrary ELF-sparc code, I don't remember if this was intended to be a project of if they did some resheduling and gave us another freeby because of the difficulty of the first. This project essentially meant adding a few syscalls and pluging in some ELF code that they gave us. 5) we implemented the yalnixfs, this was a (bitch**bitch) yalnix wasn't multithreaded so we needed to invent a technique for dealing with it (lot's of goto's and a state tracker) Part 3 was the scariest and part 5 was the hardest. At the end Juan Leon, the TA that year, was talking about figuring out ways to reduce the pain/knowledge gained ratio, he thought it was way too hard for what we learned. It was one of the few projects at CMU I was really proud of, I always learned stuff in classes but that class kicked my ass at times and I was very happy to do as well as I did and I felt like I learned a lot.

    I think Nachos and Minix are potentially harder projects, the class I did Nachos with had it pretty easy. Minix works on real hardware and the development cycle and tool chain can be a problem as well as just understanding your hardware, I know sparc and alpha well but I'm not an x86 guru and it's not the most logical architecture, there are lot's of special rules that you only learn from experience. It may be bias but I think yalnix was the best one of the three, CMU made it very hard but it was doable and you really learned the concepts by implementing them. Further, the OS class at CMU is the best I have seen. Again, my hat is off to Satya and Leon, I think the class was a good balance between real world implementation and concept; Satya pretty much taught the state of the art concepts in lecture even though the Yalnix OS is very primitive in a lot of ways. I think the OS class in general is a difficult one, they could give you Linux and ask you to screw around with various components, that could be incredibly easy or incredibly difficult. They could give you most of a kernel and ask you to implement a few syscalls and change the MM stuff. They could give you disk space and an editor and make you do the whole thing. Dialing in a good pain/signal ratio is hard. I would expect CMU to possibly make it easier, the general theme when I was there was that the school promoted a geek and hacker culture and not enough of an entrepreneural one and that there were 3 girls in SCS and 200+ guys and that wasn't right. (there were more female professors in SCS than students) The compiler class was similar, both OS and compiler pretty much took a semester of my undivided attention to get A's.

  • by synx ( 29979 )
    We' used XINU for the 4th year OS course here at UBC. Its not really a unix-alike system, and its extremely simple... but it allows students to play around with stuff like implimenting semaphors, ipc, etc.

    The size and simplicity makes it possible for a student to understand it in a single term course, so I can understand why they went with a non-real life os like xinu vs BSD or Linux.
  • The University of Washington's Computer Science program used the Linux kernel this quarter for teaching the OS class. In previous quarters, we either used simple mini-programs or Nachos.

    Check out some of the funky pictures of penguins. ;)

    http://www.cs.washington.edu/451 [washington.edu]

  • Of course the Modula-2 program would contain at least twice as many lines of code. Hell, a decent printf() statement in C ends up as 5 lines of Modula-2!
    If you think less lines are always better, you'll love this language [muppetlabs.com]. You'll realize what you miss when you go from C to it. The same can apply for the Modula-2 to C comparison.
    I have been able to kick ass upon the majority of CS guys that I've met.
    I'm not questioning your ability to kick ass, but are you sure it is a good estimator of what the college offers compares to what a full degree does?

    Let's try this question: Would you be able to kick the ass of your present self if you went thru a full CS curriculum?

  • I just finished the last assignment for OS I at Columbia. We used Red Hat running on vmware running on Red Hat.
  • At Brown the students write their own kernel on top of a simulator [brown.edu] after being given some minimal framework (a buffer cache, a loader and lots of header files). Then those that take the optional lab component [brown.edu] of the course implement processes and kernel threads [brown.edu] (including a simple scheduler), a VFS subsystem [brown.edu] (without permissions among other things), Virtual Memory [brown.edu] (without paging to backing store), and a simplified System V filesystem [brown.edu]. Once it all works they get to run the shell [brown.edu] they wrote as the first assignment on their own kernel. Its a ton of work to do in one semester (and the drop out rate is usually very high) but those that finish come away with a uniquely deep understanding of UNIX flavored OSes for an undergraduate course. (sorry for the blatant plug but I owe my current job to this course).
  • Both the University of Illinois at Urbana-Champaign and the College of William and Mary(VA) use Tom Andersen's NACHOS projects. I also know that the University of Virginia also used to use NACHOS, though they may not any more. They also use NACHOS at UC Berkely, since that is where NACHOS was developed.

    NACHOS provides basically everything you need to do a meaningful OS academic implementation. And its writen in C++ (with a hair of assembly), whose features make it easier to write the OS in than plain old C. NACHOS runs on top of the SPIM simulator (which simulates the MIPS instruction set), so you can run NACHOS on linux or unix w/o having to recompile your programs which run under NACHOS.

  • Georgia Tech recently added a new course to the CS lineup, an optional 'hands-on' OS course to follow up on the OS Theory course that's required for both Computer Science and Computer Engineering majors. I was lucky enough to be in this class the first semester that it was taught (I love this kinda stuff!).

    Of course, the school didn't want us messing up the kernels on computers in the school labs for our tinkering... but Compaq Research Labs was kind enough to loan out some single-board computers that they've been developing (in exchange for free 'field testing').

    The operating system being used for these computers? Linux, in Debian flavor. I'm no Linux expert, I've yet to have a Linux machine of my own (though when I've got money enough for a New System, it will be Linux), but I was glad to learn the ins and outs of Linux in this class.

    ---
  • Heh, I was in that class too. It was sort of cool, playing with the Linux kernel (v2.2.14-SuSE). Although I would rather see in the future the lab being done where you modified a kernel and then ran the OS on a virtual machine. All the projects before the final one took hours that was mostly spent rebooting a fscking due to some stupid little error that halted the kernel. (Oh, that task pointers are a loop? Crap, that's why my scheduler froze the system.) Even if you didn't freeze the machine, you still wound up rebooting to try the new kernel. The last project went quickly because, being a kernel module, you could insert it, test it, and take it back out without rebooting. (That and it was incredibly easy.)

    If instead you modified an OS and ran it in a virtual machine, the OS dying in the virtual machine wouldn't need to be fully-rebooted - you just restore the image, patch in the new kernel, and try again. You'd still have to boot, but you'd gain the ability to debug the kernel in the virtual machine with better control than attempting to debug the kernel while running it on the actual machine (which mostly consisted of printk statements to the kernel log). The first assignment was a killer because messing up the scheduler basically meant a reboot followed by a fsck.

    Although it was definately cool to learn about the differences between Linux and other OSes and why the Linux scheduler sucks and the Windows one does too but in different ways. (Linux could use preemptive multitasking, where a process that should have the CPU gets it as soon as possible, while Windows needs some work to prevent it from starving processes.) It also gave me a new appreciation for kernel modules and just how cool that technology was. (So, is Linux really a monolithic kernel? The kernel modules put it into this nice limbo between monolithic and micro.)

  • Please tell me that you were forced to use Modula-2, and didn't really choose it on purpose.

    I hate how CS programs force pinko, academic tools like Modula-2 onto students. This is the reason that I took a quickie little 2-year college program instead of a full CS degree. Even then, I ended up with 3 or 4 classes that were based on Modula-2 (on VMS, just for more fun).

    I realize that Modula-2 is a great teaching languge, but c'mon -- how many commercial-grade microkernels out there are written in Modula-2?

  • The CS452 Real-time programming [uwaterloo.ca] ( homepage [uwaterloo.ca]) deals with a true microkernel. Actually micro kernel is a bad name - what is created is actually a nanokernel, closer to QNX than to MACH.

    We start with some basic tools (a loader, C (or C++) compiler, some printf code and a frame-buffer driver. Then we write a message-passing real-time kernel. The kernel does very little - actually only starts a couple of initial processes, passes messages between processes and provides an interface to interrupts. Everything else is performed in a separate process. During the course, this kernel is developed and then each group (of 1 or 2 memebers) also has to write a system to control a train set or a robot. The real-time program is more work than the kernel creation, but every group ends up with a working nanokernel in about 5 or 6 weeks.

    Each group is given alot of freedom to do what they would like, with only some basic guidelines to follow. The kernel must be message-passing and it must support real-time operation. By real-time, this means the scheduler is predicatable. The system setup loaded the kernel and programs into RAM directly so disk I/O was avoided. There is a serial terminal attached to a PC and the PC had a frame-buffer. Part of the requirements of the final project were to use the frame-buffer to display some graphics relating to the real-time actions being controlled (position of trains on the track showning movement for example).

  • The first university to be taken to the Supreme Court for aiding and abetting a corporation.
  • Isn't this a contradiction on your part?

    "I realize that Modula-2 is a great teaching language, but... I hate how CS programs force pinko, academic tools like Modula-2 onto students."

    Regardless of your contradiction, a full CS degree should be teaching language *independent* stuff, for the most part, such that it is irrelevant that "pinko, academic" tools are forced onto you.

    With a decent grounding in predicate calculus, semaphores, locks, synchronization, threads, etc... you can forget Modula2 the minute class is over, and still be doing cool things.

    To rephrase, the class should be teaching you things at a level abstract from reality. You should be able to grab, say, C++ from a *one* term class at a local college, or if you're really masochistic, out of one of those 21 day books ^^

    Geek dating! [bunnyhop.com]
  • by Phaid ( 938 ) on Wednesday December 13, 2000 @03:40PM (#561297) Homepage

    Back in 1993-1994 at the University of South Alabama, we used uCOS. You can see more about it here [ucos-ii.com]. It's a very small RTOS kernel -- small enough and well enough documented that you can actually master the whole thing in a short while. It (or at least the version available back then) isn't a world-class OS, but it's excellent for a hands-on introduction to the internals of IPC, scheduling, etc.

    Linux is an excellent learning tool as well, and some of us at USA used it in projects in later courses, but its very complete feature set, size and complexity, and not-always-clear documentation makes it a bit challenging for novices. Sometimes smaller is better...

  • by The Mayor ( 6048 ) on Thursday December 14, 2000 @12:35AM (#561298)
    Yep. We did the same project at Rice Uiversity. Working with Yalnix. Given CMU's lead in kernel design, I'd suspect Rice modelled their course after CMU's. Great course, really. Between this and the compiler course (we built a funtional compiler), I have a much firmer understanding of what goes on under the covers. It was a bitch at the time, but I'm damned glad I have it under my belt now.
  • by The Mayor ( 6048 ) on Thursday December 14, 2000 @12:44AM (#561299)
    This guy has no clue. Carnegie Mellon is 10x the undergraduate university that MIT will ever be, at least in terms of the education it provides (there's something to be said about living in Boston instead of Pittsburg).

    Look, I knew a couple of guys (one CS, one Mech E) that transferred from my school (Rice) to MIT. They both said their workloads dropped considerably, while their grades rose. They were very aware of the fact that they weren't getting the same education that they were getting at Rice. But, MIT has the name.

    And one thing I've realized since I've graduated. There are only two other schools I've come across where the grads are as competent as my peers at Rice (truth be told, most of us Rice guys are complete goons socially, though). One is CMU. The other is Harvey Mudd College.

    Just my $.02
  • by Mike Schiraldi ( 18296 ) on Wednesday December 13, 2000 @06:59PM (#561300) Homepage Journal
    Sorry to be a "me too"er, but i took that class last year, and it was the best CS class of my college career, both in terms of how much i learned and how valuable that information turned out to be in the real world.

    Writing new system calls, device drivers, schedulers... Mention to an interviewer that you know how to do this and they drool.

    Great investment for VMWare, too - they give free licenses to the class, and in return, 150 VMWare-loving kids a year are pumped out and into influential software development positions.

    --

  • by SuperKendall ( 25149 ) on Wednesday December 13, 2000 @04:01PM (#561301)
    I'm not sure they still do this as it was pretty ambitious, but in my OS class at Rice University (I think in 1991 or so) we had to build the whole kernel. The basic features we had to have were multitasking, memory protection ( I believe it had to handle page swapping ), and task scheduling (possibly some kind of I/O system?). There probably were other features I forget to mention.

    We also had to write a few sample apps to work in it, and I think we were given some apps as well that had to run within our system. It may also have had to integrate with the multiuser file system we had to build earlier in the semester, but I can't say for sure if that is true.

    Though a lot of work, that was one of my favorite clases ever. Later on for a grad class we were to use the Mach kernel for some research, but that fell through and I never did get to do the project.
  • by bconway ( 63464 ) on Wednesday December 13, 2000 @02:42PM (#561302) Homepage
    My school, WPI [wpi.edu], recently received a grant from the NSF to build a Linux lab, which includes about 30 PIII-600mhz machines run SuSE 6.4, each of which is assigned to a pair of people to do with as they wish for the term. Last term it was used by the OS I class, followed by Distributed Systems (OS II) this term. The experience of coding low-level operating system software and in the process modifying the kernel yourself was in invaluable experience.
  • by bconway ( 63464 ) on Wednesday December 13, 2000 @04:07PM (#561303) Homepage
    This is similar to what the other OS classes have done in the past, but those all were coded on the big UNIX machines that everyone uses. The new projects included writing your own kernel scheduler, implementing kernel synchronization, and coding modules. It was truly impressive for an undergraduate CS course, to say the least.
  • by adubey ( 82183 ) on Wednesday December 13, 2000 @03:03PM (#561304)
    At UWaterloo [uwaterloo.ca] we use Nachos [washington.edu] for our OS course [uwaterloo.ca].

    Nice things: it is microkernel based (unlike Linux), and it is written in an OO language.
    Bad things: the OO language is C++.
  • by def ( 87618 ) on Wednesday December 13, 2000 @04:40PM (#561305) Homepage
    The OS course at CMU is a 400 level class, though students can take it as early as second-semister sophomore year. (Typically people take it in their junior year). It's a project class that is genearlly done in pairs, but can be done individually if you are clinically insane ;)

    The course involves 4 projects: You write a shell that runs on Solaris, then you write a terminal driver, a kernel, and a filesystem for the kernel, all of which runs on a virtual machine that you link as a library to the executable. I'm assuming this is what the original poster meant by "codebase", because you get nothing beyond the
    hardware and prototypes for functions to interface
    with the hardware.

    The course is a *lot* of work, but it is definately worth it. I doubt I'd understand filesystems and kernels as well if I hadn't had to write them from the ground up ;)
  • by Kwikymart ( 90332 ) on Wednesday December 13, 2000 @03:07PM (#561306)
    Can you say "Holy HTML error Batman!"?
  • by ionix ( 91505 ) on Wednesday December 13, 2000 @03:43PM (#561307) Homepage
    Which has definite pluses and minuses. It's a thing called DLXOS, running on the DLX simulated processor. You can learn all about it here:

    http://www.cse.ucsc.edu/~elm

    Anyway, the obvious plus was that the instructor could answer any questions you needed answered about it. The minus was that it was still a bit buggy, and a bug in the custom gcc compiler about stove in our heads on one of the assignments. We implemented monitors, traps for input and output to a user program, a keyboard buffer, a shell, 2-level page tables, virtual memory, and a custom filesystem. The preexisting code wasn't always as self-explanatory or well-commented as it could have been, but it was nice to be actually writing this stuff and not just plugging the holes like we would have been in NACHOS. And it was in C, whiche we were plenty comfortable with.

  • by ekrout ( 139379 ) on Wednesday December 13, 2000 @02:58PM (#561308) Journal
    It involved writing/modifying a timer module for a Microkernel implemented in modula 2, which is written by one of my lectures and is available from here.

    So what software do you use (Powerpoint?) to create your lectures that gives them the capability and AI features to create kernels and microkernels? Please reply with the link ;-D

    ______________________________
    Eric Krout
  • by rusti999 ( 167057 ) on Wednesday December 13, 2000 @04:15PM (#561309)

    Let me add to this posting. I was in the same class, but I took it last year when it was first offered in this style (Columbia used to use Nachos for the OS class). As was said, we used Linux in virtual machines (VMware). The VMware itself runs on Linux. One good thing about this is more than one groups can use the same machine; you just have to create VMware disk for each group. There is an article [ddj.com] about the class at DDJ [ddj.com]. I found this approach very good, because you don't crash machines when something goes wrong in the kernel. You just crash the VMs, and this won't affect other people doing other unrelated things on the machines running the VMs (good utilization of resources).

  • by 2nd Post! ( 213333 ) <gundbear.pacbell@net> on Wednesday December 13, 2000 @03:38PM (#561310) Homepage
    (Two weeks after assignment 4, in which some deadlocks and synchronization issues are resolved in the scheduler...)

    Microsoft releases SP2 for Windows98 SE as part of IE5.01 release

    Geek dating! [bunnyhop.com]
  • by aheitner ( 3273 ) on Wednesday December 13, 2000 @04:34PM (#561311)
    I can flesh that out a little bit.

    The codebase is only really

    - Standard Solaris functions for manipulating process contexts. Solaris is a great environment for all this, since everything is provided for you

    - Special memory tricks. Rather than deal with the real SPARC pagetable structure, their support library uses a memory mapped file (mapped based on a simple 1-level page table provided by the kernel we write). This makes writing the paging code much easier.

    - Signal handlers for things like SIGSEGV and all, as well as a timer that goes off. These are translated by the support library into kernel traps (which we write). So when a user program gets a SEGV for a memory access somewhere in the memmapped file, we change the page table some, the support library remaps things approrpriately, and we continue running. The timer is much slower than a real OS's timer, so a process's timeslice is slow enough a human can watch it go by (maybe 1/2 second or so).

    So yeah. For all you people who thought you were doing everything, there really was a support library behind the curtain pulling the wool over your eyes. Norm and I cought the little man in there a couple of times doing funky things a couple of times (ever notice how you never have to worry about page table addresses when you switch from realmode to virtual memory? in theory you should have to be very careful to keep your page table from, say, falling across a physical page boundry when you allocate it with VM enabled. the support library ignores such details :).

    Basically this ends up giving us a real kernel that's very very close to the Sun hardware. I actually asked Greg (professor this semester) why they didn't use Nachos. The answer had to do with the oversimplifications Nachos makes. Yalnix is a much more complete environment.

    Actually, Greg says he's planning on redoing project 3 for next semester. He wants to take DR-DOS (or possible his own little minimalist DOS-like OS. This project would be on Intel intead of Sun hardware) and replace interrupt handlers one by one until you have UNIX. Since the DOS disk stuff would still be in place, he could then add demand paging to the project. He said this was the Clemson graduate OS project. For CMU undergrads, he'd write the asm utility functions, and also we'd have the advantage of VMWare or Plex86 (so when we crash ourselves all is not lost; this is a major advantage of Yalnix -- when you crash the OS, you get a core dump). The cool thing would be, when you were done, you could boot your OS for real on the hardware.

    A note to people who aren't familiar with the CMU OS course: it's considered the hardest undergrad CS course (18 units, that's 6 credits). The last two projects are a month long each, easily 30-50 hours a week in the cluster. But when you're done and can say to recruiters, "Yeah I've taken OS and I got an A" they offer to hire you on the spot.

    Ok, enough wasted time. I need to go back to my filesystem (project 4, due Friday at midnight. eep!)

  • ...What Microsoft does with the local universities in Seattle?

    "Today class, our good friend Mr. Gates has given us some of the Windows 98 SE kernel to use as an example. We're to modify this fine example of coding and add some new features to it."

    (A horrifying silence ensues)

    (After a long two minutes, one of the students, Craig, raises his hand.)

    "Yes, Craig?"

    (Craig clears his throat, and tries to speak as slowly and clearly as possible)

    "Sir, um, did we do something wrong to deserve this?"

  • by nstrom ( 152310 ) on Wednesday December 13, 2000 @02:40PM (#561313)
    At CMU [cmu.edu], our operating systems class writes a kernel called Yalnix. It's a user-mode Solaris implementation, and we're provided a codebase to work from -- we're basically responsible for implementing the kernel call API, the scheduler, and the memory manager. Details available here [cmu.edu].

I tell them to turn to the study of mathematics, for it is only there that they might escape the lusts of the flesh. -- Thomas Mann, "The Magic Mountain"

Working...