OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 27, 2024 4:35 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject: Re: Confused about context switch
PostPosted: Fri Nov 10, 2023 1:29 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
KrotovOSdev wrote:
I put stack to 0x4500 during the init process, when paging is not enabled. Should I put it to another address?

It's fine where it is now, as long as you've set up enough memory to hold it. You can always change it later.

KrotovOSdev wrote:
If kmain() function returns, my code just execute "cli; hlt".

You shouldn't receive any interrupts after that.


Top
 Profile  
 
 Post subject: Re: Confused about context switch
PostPosted: Wed Nov 15, 2023 1:02 pm 
Offline
Member
Member

Joined: Sat Aug 12, 2023 1:48 am
Posts: 40
Location: Nizhny Novgorod, Russia
Octocontrabass wrote:
It's fine where it is now, as long as you've set up enough memory to hold it. You can always change it later

You shouldn't receive any interrupts after that.

Ok, thanks. I do not receive interrupts after the "cli" instruction, of course.


Top
 Profile  
 
 Post subject: Re: Confused about context switch
PostPosted: Thu Nov 23, 2023 1:24 pm 
Offline
Member
Member

Joined: Sat Aug 12, 2023 1:48 am
Posts: 40
Location: Nizhny Novgorod, Russia
Looks like I solved this problem by using interrupt or interrupt-like stack for task switching.
Thanks for your help.


Top
 Profile  
 
 Post subject: Re: Confused about context switch
PostPosted: Thu Nov 23, 2023 1:40 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
Interrupts are not necessary for task switching, so I really have to wonder why it didn't work for you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], SemrushBot [Bot] and 23 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