OS University Course

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Richy
Member
Member
Posts: 41
Joined: Wed Nov 19, 2008 10:03 am

OS University Course

Post by Richy »

Hi I'm new.

Also, I'm designing a third-year-undergrad Introduction to Operating Systems course. It's a single semester (three months long) course. Students have taken programming classes in C, and an introduction to microprocessor course which should include some assembly. I’ve been googling around for a few days looking for interesting OS resources, and finally stumbled on this site… an OS development wiki and forum? Awesome!

For the textbook, I'll be going with "Operating System Concepts" by Silberschatz, Galvin and Gagne (8th edition), unless someone can give me a compelling argument to go with something else.

But the real reason I'm here is because I'm struggling with assignments and projects. I would like the students to have some hands-on OS experience. The idea I've been kicking around in my head is to give them access to a simple computer and give them skeleton code for an OS, and make them code some blocks (CPU Scheduling, Memory Management, Interrupt Handling, some hardware management mainly the keyboard and hard drive, and the File System).

So my first question is, is that a realistic project for a class to do in three months?

The second question is, if yes and given the large selection of OSes at various stages of development available through the Wiki and elsewhere, which OS would you recommend I use as a skeleton? It should be simple enough for students to understand quickly (so preferably coming with good documentation and a tutorial) and should have well-defined modules (so that I can cut out single functions for my students to code as assignments, and not have to cut one line here and one line there and another line over there).

Alternate second question, if the answer to the first question is no, is, what would you suggest as hands-on OS assignments.

Thanks in advance for the tips and advice.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: OS University Course

Post by Love4Boobies »

Hello.

I would either go with that book or "Modern Operating Systems" (3/e) - they're both great. It's unfortunate for your students not to have any knowledge in assembly, as that is needed (not only when booting the computer, but also when scheduling, etc.). I found this tutorial looking through the wiki and I hope it covers what you want. I'll let someone else find a "skeleton" OS as I don't know of any right now, but I'm sure they're plenty out there.

EDIT: Also, if you want to see an example of such a course, take a look at Bereley's.

Cheers,
Bogdan
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: OS University Course

Post by bewing »

User avatar
Telgin
Member
Member
Posts: 72
Joined: Thu Dec 20, 2007 1:45 pm

Re: OS University Course

Post by Telgin »

I'm actually taking such a course right now, using that very book. It seems fine to me, but to be honest I haven't had much need to open it through the course.

As for how our course handled assignments, it sounds really similar to how you plan to. We are using a prebuilt simulator called OSP, which allows the instructor to decompose it into modules that need to be coded by the student. It also helps since if there is a problem in the simulation, it can usually tell the student what the issue is and how to solve it. Not always, but most of the time. We've done process and thread scheduling, and memory management, but we didn't make it to filesystems / resource management and so on.

The only problem is that OSP is Java based, so unless your students will know Java, it could be more trouble than it's worth. I hated this since I didn't know Java before taking this course (C++ is my main language), and I had to teach myself. Came out alright though in the end, I reckon.

If you're set on using a C based OS that can easily be decomposed and recoded by students, then I'm afraid I can't help there. I have no idea what is out there to look for. Coding one up from scratch is probably going to be impractical I would imagine.

Good luck though. :)
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: OS University Course

Post by Schol-R-LEA »

Just how useful the material here will be is going to depend on how much digging you want to do. The Wiki is almost certainly going to be of use to you, though it definitely has its bare spots. Some of the tutorials available are good, but a lot are misleading. The existing OSes are probably not going to be so useful, as they are of very mixed quality and were not as a rule written to be easily understood, though there are certainly some exceptional ones. Much of the work here focuses on the boot loader, which for an OS course is the wrong place to be spending a lot of time (though going over it briefly would be feasible, as it shouldn't be more than a week or two of assembly programming to write a simple "Hello, world!" boot loader given adequate coverage in class; if you do this, my recommendation is to have one class session covering the boot loader in detail, then a class lab session a week later helping the students debug their loader, then allow another week for them to finish it while continuing to other material in the class itself).

Depending on just how 'hands-on' you want the course to be, you might consider using Operating Systems Design and Implementation by Andrew Tannenbaum, which includes much of the same material as Modern Operating Systems (also by Tannenbaum) but specifically covers a small operating system called 'Minix' in depth. The OS was designed specifically for the book, and is written to be accessible to students. However, it may be a bit too much for an undergrad course (though that's what it was intended for, so maybe not).

Another alternative is NACHOS, which is another toy operating system meant for teaching. It is not a PC system, but that can be a benefit, as it can be run in a self-contained simulated environment which is easier to understand than a stock PC. If the microprocessor class uses MIPS as its example CPU architecture rather than IA-32, then NACHOS may be a good choice.

And then there are the 'big' free Unices such as Linux and FreeBSD. Unfortunately, these are probably too large and complex to be easily used for OS study at the undergrad level, though it may be reasonable to go over writing drivers in one of them, and using one of them for the student workstations wouldn't be a bad idea.

Finally, I should add that, unless you are free to reconfigure the student workstations for dual-booting, you probably should use an emulator such as BOCHS or a virtualizer such as VMWare or Xen to run any practice OS code in. This would be helpful to the students as well, as it would mean that they wouldn't need to change things on their own systems at home other than to install the software. Alternately, see if you can find a way to work with your test code from either a bootable CD or a bootable USB flash drive (the cost shouldn't be prohibitive, though you should mention the need for materials in the syllabus ahead of time, or better still, in the course catalog entry).
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
AntiRush
Posts: 5
Joined: Wed Sep 10, 2008 9:29 am

Re: OS University Course

Post by AntiRush »

The Kaya project has been designed for exactly that. It's divided into stages and depending on your course you can give students pre-built stages to start with if you desire. It's a pretty large project but every CS major that goes through Xavier University (and more than a few other undergrad CS programs) does it in a 3 month semester.
Disclaimer: I'm currently an undergrad at Xavier.
Richy
Member
Member
Posts: 41
Joined: Wed Nov 19, 2008 10:03 am

Re: OS University Course

Post by Richy »

Thanks for the suggestions. Keep'em coming!

To answer Schol-R-LEA's comment about testing and double-booting. That won't be an issue. The university recently refurbished some computer labs and got rid of a bunch of old 486s. I managed to get a few of them assigned to my course. I'll make sure they have functional hardware, get the hard drives formatted, and then I'll have my OS lab!
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: OS University Course

Post by JamesM »

Hi,

My reccommendation would entirely depend on the quality of the courses that your OS course depends on; specifically the assembly language course and the C course. The university I attend (University of York, England) has an operating systems course. It is run in the first term of an undergraduate's second year and has no practical sessions for that very reason - the University doesn't have a compulsory C course.

All of the university's courses teach design in some respect - be that a programming mentality, idiom or set of algorithms (or pure mathematics), sometimes accompanied by a brief introduction to a well-suited language. A minor knowledge of C is a prerequisite, and there is a voluntary "Crash Course in C" that takes place over the summer holiday, but those in attendance usually seem to come out with only the most rudimentary knowledge of C - a "put extra asterisks and ampersands in until it compiles" type of knowledge.

The reason I mention this is because without a thorough grounding in whatever language you use, be it C, pure assembly, Ada, Java etc.. How much of an operating system implementation can be accomplished using C, for example, if the implementor has only a passing notion of how pointers work?

My personal inclination would be to devote the extra practical time to lectures instead, covering more of the theory in class. This actually goes dead against what I would personally prefer as a student, but I just feel that unless the students really know their language and aren't going to get stalled bumbling around in the language constructs, not knowing common mistakes, how to debug etc., the practicals really would be just for the sake of having practicals - serving no real purpose.

I fully expect to be countermanded on this point, however! :)

Cheers,

James
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Re: OS University Course

Post by DeletedAccount »

hi,
My personal inclination would be to devote the extra practical time to lectures instead, covering more of the theory in class. This actually goes dead against what I would personally prefer as a student, but I just feel that unless the students really know their language and aren't going to get stalled bumbling around in the language constructs, not knowing common mistakes, how to debug etc., the practicals really would be just for the sake of having practicals - serving no real purpose.
In my humble opinion lectures doesnt really help. I was a regular bunker :) . . But practicals are really important , I did all my labs quite well .My GPA (in theory exams ) was not that good. .But I usually get very good marks for software lab exams .You are supposed to learn the language yourself --- at a university level at least that much compentency is expected , what good are you if cannot turn an algorithm into implementation , or simulate it ? No one really teaches anybody C , C++ , or any language (or anything ) in our university .

Regards
Thomas
dail8859
Posts: 1
Joined: Fri Nov 21, 2008 10:23 am

Re: OS University Course

Post by dail8859 »

Richy, I am presently taking a class exactly like you are describing. It is a third year undergraduate class on semesters. I have had previous classes in C and assembly. It is at Shawnee State University in Portsmouth Ohio. The website for the actual class is here. It has some of the lecture notes and has the assignments we have had so far this semester.

Many people in here have there own opinions on what book to use. For our class, we don't have a book AT ALL! We have built our OS from the ground up, except for out MBR (our instructor decided against it so we could cover higher level material) and the gdt was done for us. As you can see from the site, we have had to do the VBR, console, interrupts, irq's, paging, system calls, sound driver, and a few others and we are currently working on our file system. This is the funnest course i have ever taken in my almost 3 years of college! What better way to learn about OSs than to listen to a lecture, and then for an assignment, put it in our OS.

If you have any questions about how the course is done, or what tools we use, feel free to post any questions or email me!

Good Luck!
Justin
claxonix
Posts: 3
Joined: Sat Nov 22, 2008 1:25 am

Re: OS University Course

Post by claxonix »

man..what kind the university are there where they refurbish 486 computers ?!?!we are in 2008 right?
User avatar
JackScott
Member
Member
Posts: 1035
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Mastodon: https://aus.social/@jackscottau
Matrix: @JackScottAU:matrix.org
GitHub: https://github.com/JackScottAU
Contact:

Re: OS University Course

Post by JackScott »

A 486 computer is still a very useful thing. If you're trying to test an operating system, a good old 486 will work just as well as a Core i7 965, assuming you stick to the x86 architecture (which is still sticking around long after it was succeeded).

On environmental terms as well, it is commendable. All other things being equal, to recycle is far better than to not. There's all kinds of nasty things in computers: heavy metals, large quantities of plastics, etc.
User avatar
Omega
Member
Member
Posts: 250
Joined: Sun May 25, 2008 2:04 am
Location: United States
Contact:

Re: OS University Course

Post by Omega »

good to see your teaching OS Design, why not build your own skeleton and have them work on that? If you are in a time crunch then I'd go with the most non-object oriented code you could find, so stay away from FreeBSD code or Linux code, (puke). Are you going to teach the bootstrap loader or use GRUB? I'd use GRUB for teaching I guess because it might be a whole semester just with that, but kick that around for 300 levels. I would stay away from the tanenbaum books, his code is object oriented and nasty. But I hear that some Uni's once used his books for teaching, so whatever its nasty. Perhaps you should pin-point a specific aspect such as PCI or a certain controller like FDC to start. The whole thing in 3 months is too fast.
Free energy is indeed evil for it absorbs the light.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: OS University Course

Post by Love4Boobies »

OS courses are more theoretical than hardware related. There are hardware classes for that.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Omega
Member
Member
Posts: 250
Joined: Sun May 25, 2008 2:04 am
Location: United States
Contact:

Re: OS University Course

Post by Omega »

I could check out a book for that.
Free energy is indeed evil for it absorbs the light.
Post Reply