Page 2 of 2
Re: interrupts in a monotasking kernel only OS
Posted: Wed Jan 07, 2026 11:42 am
by GhostedGaming
Holy I just realized what you said about the iretq instruction but since its an interrupts dont I need is to return from the interrupt
Re: interrupts in a monotasking kernel only OS
Posted: Thu Jan 08, 2026 4:01 am
by bellezzasolo
GhostedGaming wrote: ↑Wed Jan 07, 2026 11:42 am
Holy I just realized what you said about the iretq instruction but since its an interrupts dont I need is to return from the interrupt
You do, and iretq is the correct way to do it. But if the interrupt was software-triggered from a context with interrupts disabled, when you return, interrupts will be disabled once more.
Generally, general execution contexts should always have interrupts enabled. Certainly for user mode, but also for kernel mode. The only exception is when holding a spinlock, typically when enforcing mutual exclusion on data shared between an interrupt handler and the driver for that device (top and bottom halves, etc).
Interrupt contexts can be interrupts-enabled or disabled, depending on whether you want to handle reetrancy and avoid priority inversion.
Re: interrupts in a monotasking kernel only OS
Posted: Thu Jan 08, 2026 11:44 am
by GhostedGaming
Ive came to the conclusion that I should just make a multitasking os that actually has a user space and isn't just kernel only I wanna make something that people will use I think I'll take inspiration from the Unix standards and what ever NT standards are
Re: interrupts in a monotasking kernel only OS
Posted: Thu Jan 08, 2026 11:50 am
by GhostedGaming
also thanks for the help I've learned some stuff just by reading this
Re: interrupts in a monotasking kernel only OS
Posted: Thu Jan 08, 2026 10:46 pm
by Octocontrabass
GhostedGaming wrote: ↑Thu Jan 08, 2026 11:44 amIve came to the conclusion that I should just make a multitasking os that actually has a user space and isn't just kernel only
You need multitasking in the kernel before you can have multitasking in user space.
Re: interrupts in a monotasking kernel only OS
Posted: Sat Jan 31, 2026 11:08 pm
by GhostedGaming