interrupts in a monotasking kernel only OS
-
GhostedGaming
- Member

- Posts: 35
- Joined: Wed Jul 02, 2025 11:46 pm
- Libera.chat IRC: GhostedGaming
Re: interrupts in a monotasking kernel only OS
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
- bellezzasolo
- Member

- Posts: 163
- Joined: Sun Feb 20, 2011 2:01 pm
Re: interrupts in a monotasking kernel only OS
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.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
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.
Whoever said you can't do OS development on Windows?
https://github.com/ChaiSoft/ChaiOS
https://github.com/ChaiSoft/ChaiOS
-
GhostedGaming
- Member

- Posts: 35
- Joined: Wed Jul 02, 2025 11:46 pm
- Libera.chat IRC: GhostedGaming
Re: interrupts in a monotasking kernel only OS
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
-
GhostedGaming
- Member

- Posts: 35
- Joined: Wed Jul 02, 2025 11:46 pm
- Libera.chat IRC: GhostedGaming
Re: interrupts in a monotasking kernel only OS
also thanks for the help I've learned some stuff just by reading this
-
Octocontrabass
- Member

- Posts: 6245
- Joined: Mon Mar 25, 2013 7:01 pm
Re: interrupts in a monotasking kernel only OS
You need multitasking in the kernel before you can have multitasking in user space.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
-
GhostedGaming
- Member

- Posts: 35
- Joined: Wed Jul 02, 2025 11:46 pm
- Libera.chat IRC: GhostedGaming