Implementing tasks

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
artrecks
Posts: 23
Joined: Wed Jul 11, 2007 8:24 pm

Implementing tasks

Post by artrecks »

I'm trying to implement task ( processes , threads, etc.. ) in my OS, but I got some doubts and I would be very happy if somebody helps me. I want to know if I need a thread for my kernel ( since it's the main console ) ??
LaurensR1983
Posts: 24
Joined: Wed Jun 27, 2007 10:34 am

Post by LaurensR1983 »

Well I'm pretty new to OS development, but after some reading it became clear to me that your kernel and your console should be 2 different things. A console is usually a seperate process that calls kernel functions for executing commands/programs.

I'm currently figuring out memory management stuff, which is one of the most important things you must do before implementing threads, etc.

So if you haven't done that already, I suggest you start working on a good memory manager that supports Segmentation and/or paging. These mechanisms help you protect one process from another + it gives you some flexibility in loading your application.
artrecks
Posts: 23
Joined: Wed Jul 11, 2007 8:24 pm

Post by artrecks »

ok, thx for the reply
so, I'll need to write a console in another file that can be loaded and executed by the kernel ?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

It is normal (I say normal here meaning UNIX-like) to spawn your first process, which will fork and spawn other processes (drivers, daemons etc) , one of which is a shell. That would provide console support by interacting with your kernel through syscalls.
Post Reply