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."
"Yes, Craig?"
[BeginPrejudice]
You forgot that most (if not all) professors don't memorize people's names (unless they are around them alot).
[EndPrejudice]
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.
Uses a port of minix that runs in user mode on Solaris called Solaris Minix. Currently (last time I heard) it's used in the OS component of COSC301 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.
There's a really nice Operating System textbook written by Andrew Tannenbaum that is written around an OS kernel that's form fitted for student use.
Georgia Tech's CS3210 class (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
Yow, I've heard of documentation that writes the program but this is ridiculous! :)
--
I've finally had it: until slashdot gets article moderation, I am not coming back.
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
Would you do it for some scoobie crack?
Any clue as to when they'll be implementing the local digital version of Halloween? Just think, perfect reproductions of your hardware-bashing bananza!
/ \
\ / ASCII ribbon campaign for peace
x
/ \
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. 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.
/. 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?
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
Bah. end-of-rant.
Price, Quality, Time. Pick none. What, you thought you had a choice?
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?
Price, Quality, Time. Pick none. What, you thought you had a choice?
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.
- Free tabletop fantasy gaming! Grey Lotus
The computer engineering program at the University of Waterloo (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 Coldfires).
One should note that QNX 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!
it's not going to stop until you wise up, no it's not going to stop. so just give up.
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*
Our class worked on modifiying NACHOS.
The current class is working on modifying Linux.
At Rice 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).
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...
Bye!
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
I'm not sure if it's still used, but when I took Operating Systems (CSC 370) at UNLV, 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.
20 January 2017: the End of an Error.
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.
--Britt
when i took this class the profs were so frustrated with drop outs we didnt have partners... the project was not complex though...
-sig-
I'll be taking it next semester, but currently the course is taught using minux.
old skool.
::matt:: Computers let you make more mistakes faster than any other invention, with the possible exception of tequila.
http://www.cse.unsw.edu.au/~cs9242/intro/intro.ht
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/
And a page dedicated to L4:
http://www.cse.unsw.edu.au/~disy/L4/
"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.
(\(\
(^.^)
(")")
*beware the cute-bunny virus
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.
--Let's hack root on 127.0.0.1 --panZ
Cal Poly SLO's CSC 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 online book, Linux Kernel Internals edited by Michael Beck and Tanenbaum's Modern Operating Systems.
We worked on Nachos for the undergrad OS course at Louisiana Tech 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.
-I go to Rice, so figure out my email address
...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
"All I do is eat and poop!" -- Bean
At EIVD, 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..
The difference between Theory and Practice is greater in Practice than in Theory.
For the Advanced Operating Systems course and Distributed Systems course at Saint Mary's University 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.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, another is CacheFlow, and I'm sure other slashdotters can add more to this list.
I have written a truly remarkable program which this sig is too small to contain.
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.
bash-2.04$
bash-2.04$yes "Don't you hate dialup connections?"| write USERNAME
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.
.h files exposes too much of the object internals.
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 -
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)
It's the project component 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.
2 years and no mod points. Join reddit. Because openness is good.
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...
The CS program at Kent State University uses Nachos in all of its Operating Systems courses. This semester, the instructor focused more on operating systems in general (particularly how *nix OSes function). Nachos was used for two relatively simple programming assignments involving using threads.
My only beef with the class was that the instructor was harsh on grading. The undergrads in the class are averaging C's while the grad students are averaging B's.
The OS class at Florida uses Minix. Try and get anything done on departmental harware the night before an assignment is due with 100 students recompiling the kernel at the same time.
Or a cut down version, anyway. They hacked out some unnecessary stuff to keep the files more manageable. For the desperately curios, details are on Dr. Steffen van Bakes's website at http://www.doc.ic.ac.uk/~svb
I used Nachos at GMI. It was ok, but the prof murdered the class unbeleivably....
C++, btw, made the class usefull. I, being a CE, and thankfully not a CS student, actually knew C/C++ from my other classes, and didn't have to come up to speed on it they way all the poor CS students did from their hellish experiences with Modula-2.
I took java, and that was painfull, not the language so much as that I was coding in 4 hours, start/finish what they would spend 2 weeks on... The CS people were pretty pitiful. But then, the CS program was even worse.
End of story: We used nachos, it was kinda cool, but if you're going into CS, go elsewhere. If you're going into CE, then it's a decent place.
Very assute of you to notice that they don't have civil engineering.
Please crawl back under the bridge now.
My intent was not to flame all CSs, just those I had to deal with in my classes.
GMI is a small engineering school, now called "kettering university". Was once General Motors Institute. Caters heavily to Mechanical Engineering (go figure), but the ECE department is actually pretty good. Slightly centered on industrial automation and cars, but moving away from that and towards more high-tech uses of electronics/computers.
I went there for the co-op program. Nice idea, being able to co-op from my freshman year on, but would I do it again? only for the friends. Take your money to MIT/Cal/Stanford instead. Much cooler toys/labs to play with elsewhere.
UMass-Amherst has just switched their OS course (CS 377) to be taught in Java. We used to offer it in C, using the NACHOS system. However, for some reason, that nobody seems to know, it is now in Java. This seems to be the worst possible decision. I can understand Algorithms in Java (CS 311), but OS should be a low-level programming class. And you simply cannot teach low-level programming in Java. I'm very torn, because I haven't taken this class yet, and OS is what I want to do with my career, but at the same time, I'm two and a half years towards a double degree in CompSci and Computer Systems Engineering, and don't want to go through a transfer.
The new class is so bad, to give you a few examples, the textbook has nearly no sample code. Probably because Java relys on an underlying JVM, which currently needs an underlying OS...... The class has only 3 labs, and one of them is to write a program that reads in a text file, and outputs a sorted list of the words in it. This assignment should be given in a *data-structures* class, not one on OS.
I could go on for pages here, but instead I'll stop. Aarrrgghhh....
who at the university made BSD? was it CS students profs or both??
starting this semester at UMBC we used the pthreads-based Roadrunner real time os written by the professor. We ended up writing gettime(), a counting semaphore, shared memory facility ( map() ), and disk scheduling.
At UNBC Prince George, BC, Canada we use nachos, it is our sleepy hollow bridge to sucess in cpsci, get past it and your safe. The first 4 common nachos assignments are done as a lab completely without instruction, (no credit for the lab) The prof only mentions the lab once in class, and that is to introduce the TA, from there we are on our own.
That must be "Computer Engineering," and not "Correct English."
Hmm... What year was this?
/me's a 4th year CE at the UofA btw... Last remaining final this term, and 4 months more to go baby!
Isn't part of the required stream anymore, tho there is a compsci tech that sounds similar.
U of A has divided the CompE program into two streams. The regular stream, and a crappy software option stream. Take out all the good EE courses and leave the student even further in the divide between EE/CS
Later!
I don't know if they still use it, but when I was at the University of Toronto we used a toy operating system called Minotaur that was written in Object Oriented Turing.
My school has a similar deal for the OS class to use every semester. Unfortunately, low level internals was never taught...we ended up just using the machines to create mutexes and semaphores and shm's in programs and using systems calls to see that they were there. I heard in the future they are going to start doing low level stuff. Also, we looked at the QNX Neutrino architecture as a case study.
Guess which one University of California at Berkeley uses. Some nachos thing.. they should use BSD.. mb
My biggest beef with many CS programs is that they spend too much time using obscure, academic tools. What extra value do you get in writing a microkernel in Modula-2 that you couldn't get from C++ or Java?
Slashdot: come for the pedantry, stay for the condescension.
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!
No pity required or accepted. The way I figure it, if you shave off the first year of bullsh1t courses, and the last year of pinko courses, then I got the same "meat" as a CS degree. Granted, I did go to a pretty good college. I have been able to kick ass upon the majority of CS guys that I've met.
Slashdot: come for the pedantry, stay for the condescension.
The most theory based school in the south (I think) for CS is probably University of Oklahoma in Norman. Never have I thought that I would be programming so much crap (mostly toys with no great skill required of it)... I'm a junior and we haven't even SEEN C yet! It's all been OOP; C++ and Java. My OS class last semester switched from C to Java (like half the cirriculum did about two years ago). Our projects included multithreading! Oh Boy!!. And round-robin scheduling (for the whole sememster) with almost no mm and paltry deadlock prevention. I'm crying in envy of not being able to get a grade for hacking the Linux kernel (or anything else that's real)... Of course we learned everything in the book about memory management and filesystems, but actual coding? I think there are about 3 professors here who have programmed in the last 7 years. Threre REALLY needs to be a Software Engineering degree here.
Orpheus
Here at UNB (University of New Brunswick) in Canada our CS/a> program uses Linux for our Operating System courses. I haven't taken the second operating systems course where we actually get to muck around in the Linux kernel but I am taking it next semester.
Here at UNB (University of New Brunswick) in Canada our CS/a> program uses Linux for our Operating System courses. I haven't taken the second operating systems course where we actually get to muck around in the Linux kernel; but I am taking it next semester.
This, and the recent 'what can I do for OSS' threads are really great... Next term I'm taking an 'Advanced Operating Systems Class' at school, and, partially 'cuz there's only going to be 3-4 ppl in it, and partially 'cuz it's never been taught before, it's going to be an independant project. Talking to the prof. , the sylabus will basically say "Find some open-source OS project, and do something for it".
Not only is the coursework going to be open-ended, but he's going by a -very- liberal interpretation of 'open-source OS'... I mentioned that the Berlin project was looking for volunteers, and he said it'd be kosher. So, as long as it can reasonably be justified as expanding my knowledge of OS internals, it's a go.
Anybody wanna try recruiting me for their project, and save me the trouble of making a decision myself? (not to mention the ego boost that it'd cause...)
my sig's at the bottom of the page.
The CS452 Real-time programming ( homepage) 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.
"You need a license to buy a gun, but they'll sell anyone a stamp." - Red Green
Have a look at this puppy. Those have to be the most crowded 10 minutes of your life...
nal 11
For the record: Modula-2 was not conceived as 'teaching language'. That was Pascal. AFAIK Wirth intended Modula-2 to be something of industrial strength for the guys taught on Pascal.
And boy, it was good. I wrote some pretty decent software with Modula-2 (using GEM). There is nothing you could do in C that you couldn't do in Modula-2. Amen.
And besides, if you took 'a quickie little 2-year college program instead of a full CS degree' then you are a guy after 'a quickie little 2-year college program'. You have my pity.
-m-
I would like to die like my grandfather did - sleeping. And not screaming in terror, like his passengers.
The companion OS theory subject remained, but the only coding/practical work we did there was to simulate a few different scheduling algorithms to study their behaviour, and a bit of concurrency.
Oh, well. At least we got a good grounding in the theory (I hope).
"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?"
What the hell's wrong with Modula-2?! It's a fine language, combining the best of C and Pascal.
It ain't microkernel, but it was commercial grade: Nicholas Wirth wrote the OS and all of its utilities with Modula-2: the Lilith System. Even had its own windowing system...
-> I hate sigs...
I'm proud to say that UCLA uses Linux to teach its operating systems class. Damn cool....
- Bootup and printf. Bootup the kernel. Use a printf facility to put charecters to the screen.
- Simple batch scheduling. A number of threads should be run. The scheduler simply runs all threads till completion.
- Non-preemptive scheduling. Threads yield control of processor voluntarily. A keyboard thread reads characters from the keyboard. A shell-thread reads characters from a keyboard buffer and writes them to screen.
- Preemptive scheduling and system calls. The keyboard-driver is now interrupt driven. A timer interrupt enforces scheduling. Two shell-threads make use of int-instructions to generate system calls.
- Multithreaded and preemptive kernel. The kernel is made preemptive. Multiple threads are allowed to execute inside the kernel simultaneously. Spinlocks are used for synchornization.
- Inter Process Communication (IPC). Send and receive system calls are implemented. The receive call is blocking. As such, the kernel must now support some sort of thread-suspend/thread-resume.
- Virtual memory and user-level. Taks now run in virtual memory protected from each other. A task may contain multiple threads. It is also necessarry to make a clear distinction between user-level and kernel-level.
- Demand paging. Students are given a hard-disk driver that are allowed to access a Linux swap partition. When there is no more physical memory, the kernel swaps out pages to disk using some replacement policy. Bss, data, and text sections are mapped on demand.
Princeton University also made use of some of this, but I'm not sure what modifications they did. Some effort has also later been put into improving the course, and the OS has changed its name to LearnOS.You're wrong. Modula-2 sucks from top to bottom.
Thank you very much.
"Kernel? What's that?"
Of course, my college's CS department isn't exactly known for having a high quality program, what with our one dedicated professor. She's got a doctorate, and she tries hard, but we don't get much in the way of resources (read: none). I had to play tech support to my own CS profs.
She knows programming theory okay though.
They are teaching us the Linux Kernel over here. Somehow big and complex and I wonder if something like the hurd would be a better choice...but I'm definitely enjoying it :)
In our upper lever Operating Systems class the semester long project was to write a low level operating system in C. It was the most grueling class I have ever taken, and also one of the most educational. We designed a system that run a loop of interrupts, giving focus between running applications, user input and an idle process. It was quite a chore and I believe they have suspended the class because to many people were failing all their other courses when they took this one. All that means though it I am now allowed to go back to the new kids and say "well back in my day...."
the full win2k source? errr, my memory is rusty, wasn't that some 40 million lines of code or something? of course the kernel part wouldn't be nearly that big, but i still shudder to think how big it might be. as for uc berkeley, we just used trusty old nachos too. one prof in the past has made folks work on bsd (fittingly), but running nachos on top of solaris seems to be much much easier.
Thanks for the info. I kindof wish my intro OS course was more like that, but another part of me is glad it wasn't. One of the other courses I had been taking concurrently was a software systems development, which is an extremely time intensive group (4 people) group project. Made doubly time intensive by the fact that our 4 person group functioned more like 2.5.
Spent more time on work for that course than the othr 4 put together. Incredibly fun though.
What year of University was this? Undergrad? Grad? Was it a group project?. My 3rd year undergrad intro to OS course was nothing like that. Mainly just stuff like modifying the scheduler in Linux and fooling around with semaphores.
I found the page they took off their website in the google cache, the url: http://www.google.com/search?q=cache:creditcards.c om/solutions/main_success.html+&hl=en
They are:
Rock The Vote
Home Broker Auction
Walking Connection
Urban Gear
Mika's Wedding
Premier Solutions
iKnowledge
Largan Digital Cameras
Spy Gate
GHR 15
Crash Busters
USA One 2000
Greatest Networker
Christian Concert Authorithy
Casino Judge
eCashier
onLine Fitness Systems
The kernel was written in modula-2 but we could implement our module in either c or modula 2.
At one time IBM considered going to M2 for the new RISC series of AS400s (which have been 64bit for over 4 years!). One key portion of the CISC As/400s was written in M2, I believe it dealt with the interface layer between programs and the OS. The current AS/400 microcode is in C. BTW.... what I would not do for a AS/400 similar system on a PC.... (the AS/400 upgraded from CISC to RISC without needing major (most programs needed ZERO) changes to programs... what other OS can claim that?
* Winners compare their achievements to their goals, losers compare theirs to that of others.
As Univ. of Washington, we use Nachos, it was quite ok when you got a hang of it...
We used Linux back in '96 at New Mexico Tech (holy crap batman, their site is looking awful these days). We were broken into three person teams. Our final project was to implement threads in Linux.
$ finger #timmy
invalid use of finger
Fredericton or Saint John? I don't know too many people in the area that use Linux or BSD at all.
BdosError
Complexity is Easy. Simplicity is Hard.
Yeah it's not too hard to sift through the code. But when you are a full-time student with a part-time job its not as simple as it sounds. I only had 25 hours to allocate to this assignment. I heard some people were spending as much as 60-70 hours on it! Incidentally I never fully got it working due to a lack of time. But I still managed a B- for a grade.
We used the O/S Minix 2.5 years ago. If I recall our biggest assignment was to modify the process scheduling. Not exactly the funnest task to debug :)
Just 5 days ago I wrote the final exam for CS354 (Operating Systems) at the University of Waterloo in Canada. I've had more than my fill of Nachos over the last term.
OSP is used at the Polytechnique of Montreal (www.polymtl.ca)
The program: Not so good (output=text, graphical interface=none). You have to know exactly what you're doing (not the best for learning). Last time I used it, I had to compare two process scheduling algorithms (round robin and multiple level queues). A great thing is that OSP can generate processes on a random basis, so you can see different results. The inconvenient is when it comes to comparison. The average timings are always the same... I think OSP has issues dealing with time representation.
The book: OSP "An Environment for Operating System Projects" available on www.amazon.com $14.67 (search keyword OSP).
When i was a 2nd year student, on OS class. We playing around the small-size unix -- Minix. It's not too big, not too complicate - because Andy designed it for a study purpose. My group project is to do a new process scheduler. It was a very good time :)
I heard that many universities around the world
use Minix / Xinu as a 'toy' for their students.
My brother there who still a student told me that
next year, new prof will change the OS to Linux ...new prof, new os.
Anyway, Minix is what Linux comes from :D
"freedom is not free" -- from SIIT car park
There was a system in the 80s called CHIP, (a nifty little cisc architecture) and an OS that ran on it called HOCA. the entire thing was done from scratch.
Last year, at Xavier University we used a new system called MPS, which generally simulates a MIPS processors. The OS for this is called TINA and somewhat based on HOCA (the kernel can be easily ported). Again whole thing from scratch. as far as I know, only 2~3 people in the world have actually finished this academic project. (it wasn't easy)
Topics covered were all the usuals for an OS, such as
The book was well written and easy to follow. I have had the fortune to take classes with both professors, and they are very knowledgable on the subject. In fact, I just looked and Dr. Mooney still teaches at WVU, and is in fact teaching CS256: Operating Systems Structures this semester.
The course was excellent. And the book made the subject matter easy to follow. It's one of my favorite textbooks from my college days. A very easy read.
Hey! I had him for my OS class too! Back when he was teaching at UMBC. I think my semester was the first semester (or could've been the second, can't recall) he used DLXOS. And ya, it had some bugs in it. I even found a bug in the semaphore stuff. We never got to implementing the filesystem for it though cause we ran out of time.
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.
pb Reply or e-mail; don't vaguely moderate.
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
Hurry up and jump on the individualist bandwagon!
Custom kernels are very useful in University. I doubt I would be able to make it through midterms without my Orville Reddenbacher.
At doc.ic.ac.uk, the second year students get a lab exercise to modify Minix (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.
-- Ed Avis ed@membled.com
>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.
If tits were wings it'd be flying around.
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.
A Government Is a Body of People, Usually Notably Ungoverned
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.
This is my signature. There are many signatures like it but this one is mine..
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.
Check out some of the funky pictures of penguins. ;)
http://www.cs.washington.edu/451
(\(\
(^.^)
(")")
*beware the cute-bunny virus
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.
Karma: Good (despite my invention of the Karma: sig)
At Brown the students write their own kernel on top of a simulator after being given some minimal framework (a buffer cache, a loader and lots of header files). Then those that take the optional lab component of the course implement processes and kernel threads (including a simple scheduler), a VFS subsystem (without permissions among other things), Virtual Memory (without paging to backing store), and a simplified System V filesystem. Once it all works they get to run the shell 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).
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.
---
Good judgment comes from experience.
Experience comes from bad judgment.
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.)
You are in a maze of twisty little relative jumps, all alike.
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?
Slashdot: come for the pedantry, stay for the condescension.
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).
"You need a license to buy a gun, but they'll sell anyone a stamp." - Red Green
The first university to be taken to the Supreme Court for aiding and abetting a corporation.
- I don't care if they globalize against free speech. All my best free thoughts are done in my head.
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!
GPL Deconstructed
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...
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.
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.
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
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?
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++.
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
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.
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.
;-D
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
______________________________
Eric Krout
If you celebrate Xmas, befriend me (538
(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!
GPL Deconstructed
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!)
"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?"
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.