Mattise Kernel: Implemented 16BIT and 32BIT Threading

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Mattise Kernel: Implemented 16BIT and 32BIT Threading

Post by Kevin McGuire »

I have been working on the Mattise kernel with pcmattman, and we have been making a lot of progress together. I was so excited to be working with someone else that I wanted to make a post about the team development success so far.

Implemented 16BIT and 32BIT Threading
The Mattise kernel has 16BIT and 32BIT threading implemented, with a priority scheme. It is still missing a few critical functions and the support for mutual exclusion, sleeping, and synchronization.

The scheduler was written to fit together with the existing kernel infrastructure in such a way that minimal changes would be required. One of the most interesting features is the ability for the scheduler to not have any knowledge about virtual memory except for switching CR3 during thread switches. It uses a neat system of creating a thread in the process which then runs under normal scheduling control to finished loading the process image, or setup the new thread. This removes the constraint of having to deal with scattered memory when doing a manual translation from virtual to physical (copying process image into a different address space than the current).

Implemented Physical Page Allocator
The physical page allocator is implemented using a neat tagging system which is mainly used at the moment to differentiate between legacy memory (below 1MB), and memory above 1MB. This feature was added in the feature branch from the main line and is used when creating 16BIT threads, before a virtual memory implementation is available.

SVN
There is not much to see when compiling the kernel and loading it. It has zero user interactivity at the moment and would serve more as a developmental release for those whom might be interested in taking a look at some of the code -- or even tinkering with the code then compiling.

The current feature branch with the threading implementation; still waiting for a merge with the main line branch. I have made a few changes awaiting revision by pcmattman which make compiling the kernel on Linux a lot easier. Also the feature branch will crash if not using the correct Makefile (See Makefile.linux), because of the testing of the 16BIT threading.
svn co https://mattise.svn.sourceforge.net/svn ... ire/kernel
The main line branch with the physical memory allocator.
svn co https://mattise.svn.sourceforge.net/svn ... nk/kernel/

pcmattman, might have more to add since he has been working on the file system implementation and virtual memory.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Pretty cool stuff.. good luck you two.... (Isn't SVN just fun btw? :lol:)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

Brynet-Inc wrote:Pretty cool stuff.. good luck you two.... (Isn't SVN just fun btw? :lol:)
Yeah. I really like it, but I am having trouble sometimes. Like for instance I create a branch.. but I would like to merge from the main line back to my branch any changes including new files. I reorganized the SVN directories like you suggested too, Brynet-Inc - which I think look a lot nicer.

I tried the merge command, but sometimes I think I really do not know what I am doing.. I do it locally like so:


cd /home/kmcguire/pcmattman/svn/mattise/branches/kmcguire/kernel
svn update
// make changes to mine
cd /home/kmcguire/pcmattman/svn/mattise/trunk/kernel
svn update
cd /home/kmcguire/pcmattman/svn/mattise/branches/kmcguire/kernel
svn merge ./ /home/kmcguire/pcmattman/svn/mattise/trunk/kernel ./


Right? Or, is there a easier way or some key points I am missing? The last time I did that it would just drop back to the shell and display no messages just like both directories were the same or something.. :cry:
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Have you looked at this page From the SVN Book?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Cool, But you don't have to keep an entire copy of the repository on your system...

You can use SVN switch if you wish...

Imagine your working directory was:

Code: Select all

/home/kmcguire/svn/mattise/kernel
When working on your branch you could do:

Code: Select all

svn switch https://mattise.svn.sourceforge.net/svnroot/mattise/branches/kmcguire/kernel
And when you want to switch back:

Code: Select all

svn switch https://mattise.svn.sourceforge.net/svnroot/mattise/trunk/kernel
When you feel your branch is ready for a merge, you could do the following:

Code: Select all

svn switch https://mattise.svn.sourceforge.net/svnroot/mattise/trunk/kernel

Code: Select all

svn merge https://mattise.svn.sourceforge.net/svnroot/mattise/trunk/kernel https://mattise.svn.sourceforge.net/svnroot/mattise/branches/kmcguire/kernel
You can then commit... The link frank posted is also valuable..
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

Hmm. Let me think about this, and read.. The switch looks interesting.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Just felt like adding this...

I'm in the progress of adding paging support to the kernel which will complement Kevin's changes perfectly. Expect to see me ask some stupid questions over the next couple of weeks :D
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Paging is implemented! It's a basic implementation so far, but I've been able to run two different processes in different address spaces.
Post Reply