Ktux Multitasking & Update

So it’s been some time since I posted, unfortunately life has kept me on the go these past several weeks and I’ve had limited time at my desk.  However, thankfully I was able to work on Ktux from my netbook and now I successfully have multitasking working!  I attempted several previous implementations of a scheduler without success, this time I re-wrote mostly everything from scratch, minus a few lines of the timer ISR assembly code.  Currently, the scheduler supports thread creation/destruction and basic priority adjustment with nice() (just adjusts the process quantum timeslice).  Oh, and a simple yield() was implemented as well.  As of the moment, I have a pointer array to keep track of the threads, but in the process of replacing with linked lists (same implementation Linux kernel uses).

The screenshot below demonstrates 4 threads of execution, 3 of them increment counters (with various priorities) and the final one just displays the values on the screen, then yields():

I finally invented something that works!!

Now, of course with with multitasking support comes a whole new array of synchronization issues.  I have intentionally followed the KISS principle thus far when developing the kernel framework, knowing that any substantial code would most likely need to be re-written with critical sections, locks, etc.  Due to the complexities and time involved, I am fairly certain I will not aim for full SMP support in Ktux.  A few basic atomic operations have been written, but for the moment I think I will just use something similar to the big kernel lock in Linux; performance is not my main concern here, getting something out the door that actually runs is.

Not sure where I will go from here, I know the virtual memory needs a *LOT* of work, it’s pretty ugly right now.  From there, I think user-level thread support will be a logical next step.

Update & Ktux upload

So life has been quite hectic lately with the holidays and it’s time to get back to writing.  I still need to upload the final piece of my service account script which basically consists of a simple Nautilus script to invoke it.  This will be coming shortly, hopefully later this week.

As for my OS Ktux, I am uploading a tarfile with the latest code for anyone whom may care to peruse the source.  Unfortunately it’s been longer then I would have liked since this has been worked on.  However with my new laptop I will be re-creating my development environment and should have more information available soon.