Slashdot Mirror


Custom Kernels Used In Comp. Sci Programs?

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."

17 of 161 comments (clear)

  1. uCOS by Phaid · · Score: 3

    Back in 1993-1994 at the University of South Alabama, we used uCOS. You can see more about it here. 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...

  2. Re:Carnegie Mellon University by The+Mayor · · Score: 3

    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.

    --
    --Be human.
  3. Re:Carnegie Mellon is great... by The+Mayor · · Score: 3

    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

    --
    --Be human.
  4. Re:Columbia uses Linux by Mike+Schiraldi · · Score: 3
    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.

    --

  5. At Rice, we built the whole thing. by SuperKendall · · Score: 3

    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.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  6. Linux lab at Worcester Polytechnic Institute by bconway · · Score: 3

    My school, WPI, 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.

    --
    Interested in open source engine management for your Subaru?
    1. Re:Linux lab at Worcester Polytechnic Institute by bconway · · Score: 3

      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.

      --
      Interested in open source engine management for your Subaru?
  7. Nachos by adubey · · Score: 3

    At UWaterloo we use Nachos for our OS course.

    Nice things: it is microkernel based (unlike Linux), and it is written in an OO language.
    Bad things: the OO language is C++.

  8. Re:Carnegie Mellon University by def · · Score: 3

    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 ;)

    --
    WRCT Pittsburgh, 88.3FM
  9. Re:At UNB we use Linux of Course! by Kwikymart · · Score: 3

    Can you say "Holy HTML error Batman!"?

    --

    Buying a Dell computer is equivalent to dropping the soap in a prison shower.
  10. Our instructor wrote ours by ionix · · Score: 3
    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.

  11. Your Lectures Must Be Amazing! by ekrout · · Score: 3

    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

    --

    If you celebrate Xmas, befriend me (538
  12. Re:Columbia uses Linux by rusti999 · · Score: 3

    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 about the class at DDJ. 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).

  13. Even worse... by 2nd+Post! · · Score: 3

    (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!

  14. Re:Carnegie Mellon University by aheitner · · Score: 5

    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!)

  15. Can you imagine... by Obiwan+Kenobi · · Score: 5
    ...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?"

  16. Carnegie Mellon University by nstrom · · Score: 5

    At CMU, 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.