Multitasking

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator: Moderators

Post Reply
User avatar
XV8
Posts: 9
Joined: Tue Apr 06, 2010 10:47 am
Contact:

Multitasking

Post by XV8 » Tue Apr 06, 2010 11:02 am

I develop small os.I have a problem with multitasking. I search information of TSS but i not find anything.can you help me in this. possible you have documentation or tutorials.

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

Re: Multitasking

Post by Andyhhp » Tue Apr 06, 2010 6:40 pm

The best article I can point you at is http://wiki.osdev.org/Context_Switching

I know it isnt much but it does have the information you will need.

~Andrew
Image

Jarvix
Posts: 21
Joined: Mon Apr 06, 2009 6:08 am

Re: Multitasking

Post by Jarvix » Wed Apr 07, 2010 4:31 pm

The Intel IA-32 Manuals describe the TSS. You probably already have those documents on your computer.

// Jarvix
Jinix. Kernel programming is a black art that should be avoided if at all possible.

User avatar
XV8
Posts: 9
Joined: Tue Apr 06, 2010 10:47 am
Contact:

Re: Multitasking

Post by XV8 » Wed Apr 14, 2010 2:50 pm

I use Multitasking, Virtual Memory Manager and my os is microkernel oriented. So Keyboard driver is programm. How i can set interrupt vector for keyboard interrupt?

i know just this decision

-> Create small procedure
-> Set interrupt vector to this procedure
-> In procedure tell Process Manager to switch current task to Keyboard Task
-> End

but i think that is very bad decision.

User avatar
Mike
Site Admin
Posts: 465
Joined: Sat Oct 20, 2007 7:58 pm
Contact:

Re: Multitasking

Post by Mike » Fri Apr 16, 2010 12:16 am

Hello,

I am uncertain of what your "keyboard task" is.

Assuming your keyboard driver is in usermode (as you mentioned Microkernel), the driver would interface with the system to install its IRQ handler when the driver is initialized. Then when the system detects the IRQ is fired, it calls the installed IR in user land to notify the driver.

I hope this helps somewhat, If I misunderstood please describe.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

User avatar
XV8
Posts: 9
Joined: Tue Apr 06, 2010 10:47 am
Contact:

Re: Multitasking

Post by XV8 » Sat Apr 17, 2010 7:15 pm

you want to say that i create common IR for Keyboard interrupt, which just tell to Keyboard driver in user mode, that interrupt has occured?

But there two problem.
For each Keyboard interrupt i must switch current task to Keyboard Task. ( Keyboard driver run as a user programm).
Сan be that some interruptions will not have time to be processed?

and second problem.
Keyboard driver can send it result to certain programm (example Screen Driver which is also user programm).
This messages with information between process will be long.

and i have a third problem))
How i can realize System calls which send much information (example 10-20 lines of text) ?

i think that i must create packages on determined protocol which is written in share memory and all processes can read it.

Post Reply