Page 1 of 1

TASKING PROBLEMS Help please

Posted: Fri Sep 19, 2014 1:01 am
by Divakar00100
hi,
im currently using Multitasking Of Tutorial James Molly Make UNIX clone But i am unable to init Tasking.....
whenever i init tasking and their is a PAGE FAULT EXCEPTION..
this is my Tasking INIT code..

Code: Select all

void init_tasking()
{
    cli();

    //This is going to be our userland stack
    move_stack((void*)0x00100000, 0x2000);

    //kernel
    current_task = ready_queue = (task_t*)kmalloc(sizeof(task_t));
    current_task->id = next_pid++;
    current_task->thread = 0;
    current_task->esp = current_task->ebp = 0;
    current_task->eip = 0;
    current_task->priority = PRIO_LOW;
    current_task->time_to_run = 10;
    current_task->ready_to_run = 1;
    current_task->page_directory = current_directory;
    current_task->next = 0;

    sti();
}

im getting Very frustrated about That Please Help ....

Re: TASKING PROBLEMS Help please

Posted: Fri Sep 19, 2014 1:25 am
by Combuster
Why is each of this, this, and this relevant to your problem?

Re: TASKING PROBLEMS Help please

Posted: Fri Sep 19, 2014 1:29 am
by alexfru
Please stop posting non-informative and non-specific questions. Respect others' time. Debug your stuff first, don't throw it at people.

Re: TASKING PROBLEMS Help please

Posted: Fri Sep 19, 2014 2:24 am
by iansjack
I don't wish to appear rude, but I think you should scale down your ambitions somewhat. You are not ready for OS development.

Take time off to learn how to research information and how to write programs in C and assembler. More important, learn how to use a debugger - or some other technique - to track problems in your programs. Until you do that you will not be able to do any meaningful OS work.

Re: TASKING PROBLEMS Help please

Posted: Fri Sep 19, 2014 10:11 am
by Divakar00100
sorry guys....I understood what you wanted to tell me....I would keep that in mind next time....

Re: TASKING PROBLEMS Help please

Posted: Fri Sep 19, 2014 8:02 pm
by SpyderTL
Divakar00100 wrote:hi,
im currently using Multitasking Of Tutorial James Molly Make UNIX clone But i am unable to init Tasking.....
whenever i init tasking and their is a PAGE FAULT EXCEPTION..
Try running your OS in Bochs and let us know what error it gives you. We should be able to give you an idea where to look after that.

Thanks.

Re: TASKING PROBLEMS Help please

Posted: Sat Sep 20, 2014 12:50 am
by Divakar00100
hi,
so I tried to make Some Tweaks... I found the problem :lol: ...It is with line with move_stack function whenever i move stack i get a page fault
and if i remove move stack fault Then No Problem......
Now i wanna Know is Move Stack function very important function or I can just remove it....

Re: TASKING PROBLEMS Help please

Posted: Sat Sep 20, 2014 1:05 am
by iansjack
Well, what do you think?

What does the function do? Where is it used? Aren't you interested in discovering why it is causing problems?

It's really beginning to sound as if you are just following a tutorial parrot-wise without any understanding of what you are actually doing. That sounds to be a pretty pointless exercise. As I said before, learn how to debug before going any further.

Re: TASKING PROBLEMS Help please

Posted: Tue Sep 23, 2014 3:28 pm
by sortie
Someone please link this guy to the jamesm erreta on our wiki.