TASKING PROBLEMS Help please

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
Divakar00100
Posts: 8
Joined: Wed Sep 17, 2014 11:42 am

TASKING PROBLEMS Help please

Post 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 ....
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: TASKING PROBLEMS Help please

Post by Combuster »

Why is each of this, this, and this relevant to your problem?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
alexfru
Member
Member
Posts: 1112
Joined: Tue Mar 04, 2014 5:27 am

Re: TASKING PROBLEMS Help please

Post by alexfru »

Please stop posting non-informative and non-specific questions. Respect others' time. Debug your stuff first, don't throw it at people.
User avatar
iansjack
Member
Member
Posts: 4709
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: TASKING PROBLEMS Help please

Post 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.
Divakar00100
Posts: 8
Joined: Wed Sep 17, 2014 11:42 am

Re: TASKING PROBLEMS Help please

Post by Divakar00100 »

sorry guys....I understood what you wanted to tell me....I would keep that in mind next time....
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: TASKING PROBLEMS Help please

Post 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.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Divakar00100
Posts: 8
Joined: Wed Sep 17, 2014 11:42 am

Re: TASKING PROBLEMS Help please

Post 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....
User avatar
iansjack
Member
Member
Posts: 4709
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: TASKING PROBLEMS Help please

Post 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.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: TASKING PROBLEMS Help please

Post by sortie »

Someone please link this guy to the jamesm erreta on our wiki.
Post Reply