OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 9:19 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: development decisions
PostPosted: Fri Apr 24, 2009 8:56 am 
Offline
Member
Member
User avatar

Joined: Fri Dec 26, 2008 12:31 pm
Posts: 299
Location: Boston
I am planning to take up working on my OS again. I had to stop a bit for other obligations, but Im still stuck at where I left off. Right now, I have something allows interrupts in protected mode, and has paging enabled. Here is the problem.

I need to do more work on my memory manager to make it so that it can create tables for a process and allocate memory for them. The problem though is, in order to test it and confirm it works, I would need a way to create and switch to a new process, to show that indeed the tables have been allocated correctly and allow a process to run. In order to verify that a process is working, I will at least one system call so I can at least print something to verify the process can make calls to kernel space, and it can return to user space and continue its execution. I have an idea of how to do each of these things, but the big hurdle is that it seems like I will need to develop all three alongside each other, or at the very least process management with memory management. How have people handled this in the past? Im inclined to just go for it, but if something is not working right it will be very hard to tell what it is, but on the other hand, it seems that in order to test one piece, you will need other pieces working.

Also, I forgot to add, it seems that in order to run processes, you will need to be able to read some type of filesystem so you can read in the program, or am I wrong about this and for testing you can hardcode a simple process into the main kernel code?

_________________
http://code.google.com/p/eliax/


Top
 Profile  
 
 Post subject: Re: development decisions
PostPosted: Fri Apr 24, 2009 10:08 am 
Offline
Member
Member
User avatar

Joined: Thu Oct 02, 2008 8:20 am
Posts: 67
In fact you don't have to create a process to test your memory manager

Just make it create a page directory, manually switch to it, write to a random user-space location, read back and see if everything worked
This should be enough to tell that it is working well

Afterwards you could create several processes whose starting point would be in your kernel code and see if it works (don't forget to make your kernel space available in user mode by setting the appropriate flag)
This way you won't need any syscall, just call your kernel's printf

_________________
MysteriOS
Currently working on: TCP/IP


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 109 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group