Thursday, May 28, 2009

Task #4, I Choose You!

After another code/blackboard sprint this morning, we're proud to announce a working implementation of basic scheduling along with a few simple system calls. (Like fork() - I hear that one's pretty important.)

We use FIFO scheduling with a preset number of queues, each representing a given priority level; the kernel picks the ready task at the highest priority, runs it, then places it at the back of the queue at its priority level. Since low priority tasks can easily be starved by high priority tasks, this may seem like an embarrassingly stupid scheduling algorithm - until you realize that this is embedded real-time programming, where we alone decide exactly which tasks run at each priority level.

For your amusement, here are some development statistics so far.

ARM assembly: 50 lines, 25 hours
C: 250 lines, 5 hours

There's a point about language expressiveness, ease of debugging, and programmer productivity here that I'm going to completely ignore in favour of getting some much-needed sleep. We'll try to get some terminal output screenshots up in the next few days.

No comments:

Post a Comment