OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Aug 05, 2020 2:31 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: User mode scheduling
PostPosted: Wed Mar 11, 2020 10:46 am 
Offline

Joined: Fri Nov 01, 2019 1:17 am
Posts: 13
How to enable preemptive multitasking in user mode..any source ?? Plz help...


Top
 Profile  
 
 Post subject: Re: User mode scheduling
PostPosted: Wed Mar 11, 2020 11:18 am 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 315
Clarification required. ;) You need interrupts for preemptive multitasking; I don't think it's possible to configure and handle interrupts in user mode, so what do you want? Do you mean the normal case, where you want to implement preemptive multitasking in your kernel so that your user-mode programs may be multi-tasked? Multi-threading is an extension of the latter, if I understand right.

The basic idea is to have a timer interrupt. When it fires, save the state of the currently runnning process, decide which process to run next, restore its state, and return to it. EDIT: huh... you could do this in userspace if you can get a regular signal and can save state. The latter may be the hard part.


Top
 Profile  
 
 Post subject: Re: User mode scheduling
PostPosted: Wed Mar 11, 2020 11:46 am 
Offline

Joined: Fri Nov 01, 2019 1:17 am
Posts: 13
eekee wrote:
Clarification required. ;) You need interrupts for preemptive multitasking; I don't think it's possible to configure and handle interrupts in user mode, so what do you want? Do you mean the normal case, where you want to implement preemptive multitasking in your kernel so that your user-mode programs may be multi-tasked? Multi-threading is an extension of the latter, if I understand right.

The basic idea is to have a timer interrupt. When it fires, save the state of the currently runnning process, decide which process to run next, restore its state, and return to it. EDIT: huh... you could do this in userspace if you can get a regular signal and can save state. The latter may be the hard part.


Thanks for your guidance...
My os support multi threading in kernel mode..now I want to multithread in user mode.. I am confused, how to set up the stack and how to tell the tss to point my user stack...


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 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