System calls & task switching
Posted: Sat Jul 12, 2003 11:37 am
Hi there. I've got a few questions on stuff I've been wondering about.
What do you consider to be the best way to do multitasking? Should I use the TSS stuff or do it in software? And what's this stuff about ESP0 and SS0 and automatic stack switching when changing rings? How do I handle that?
And about system calls, should the system call disable interrupts while it executes? What happens if an app calls the system and the scheduler kicks in, isn't there a risk that apps stack get lost since when the scheduler kicks in the current stack could be the kernels, right?
Hmm I'm a bit confused on this stuff. Any clarification would be great.
Thanks in advance,
Lantz
What do you consider to be the best way to do multitasking? Should I use the TSS stuff or do it in software? And what's this stuff about ESP0 and SS0 and automatic stack switching when changing rings? How do I handle that?
And about system calls, should the system call disable interrupts while it executes? What happens if an app calls the system and the scheduler kicks in, isn't there a risk that apps stack get lost since when the scheduler kicks in the current stack could be the kernels, right?
Hmm I'm a bit confused on this stuff. Any clarification would be great.
Thanks in advance,
Lantz