DragonFly BSD
DragonFly users List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: How to teach OS

From: Chris Pressey <cpressey@xxxxxxxxxxxxxxx>
Date: Fri, 4 Mar 2005 12:03:44 -0800

On Fri, 4 Mar 2005 10:04:52 -0600 (CST)
Zera William Holladay <zholla1@xxxxxxx> wrote:

> Hi, I have a pedagogical question.
> If you (a developer) were teaching a first level college course in
> operating systems with the goal of (eventually) transforming each
> student into a *BSD developer, then how would you teach the course?
> Specifically, what programming assignments would you have?

(See below.)

> What material would you cover?

Role of interrupts, traps, and syscalls.
Concurrency and locking.
Virtual memory management.
Process and disk scheduling.

. ..because I think those are the hardest to understand correctly.

> When you took your first course in OSes, what was wrong with it?

I'm currently taking such a course.  There's almost nothing wrong with
it, actually.  The instructor is very knowledgable and his lectures are
quite lucid and engaging.  The assignments so far have been along the
lines of: introduction to coding in C, understanding the file system and
the I/O primitives, using GDB to debug given code in C, implementing a
subset of the Unix 'ls' command, implementing a toy transactional

My main critique of the class is, in fact, that it is aimed at
application programmers; i.e. how to exploit knowledge of the OS to
maximize your application's performance.  I don't agree with that on a
philosophical level; application programmers ought to be far more
concerned about reliability, maintainability and portability (or rather,
future-proofing or system-change-proofing) than performance, 9 times out
of 10.  This goes double for performance that comes from initimate
knowledge of the OS, rather than simply choosing appropriate algorithms.

(Another way to say this might be, anytime you even think about how the
underlying system works when you write software, well, you aren't
really writing application software anymore, you're writing system
software ;)

It would probably also have been better for the students of this course
to be exposed to C first; a lot of the trouble they're having with
assignments come from their difficulty of stepping out of the Java

> What
> would you have taught yourself then?
> I know these kinds of questions frequently pop-up on mailing lists
> (how do I become a developer, etc??), but I'm asking these questions
> with the intention of suggesting your ideas to my instructor so that I
> might be able to do them as assignments (and get grades for them).

Well, these are just ideas for assignments:

- Take an uncommented, well-defined section of kernel code (like a
  driver) and comment it.
- Take a well-defined section of code (kernel or userland) with the
  synchronization primitives removed.  Figure out where they should go
  and put them back in.
- Implement a toy filesystem, with inodes, directories, and files. (!)
- Implement a toy shell with redirection and job control. (!!)
- etc...


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]