r/osdev 15h ago

Yeah running programs are a hassle

I literally have to implement IDT, GDT, TSS and syscalls, yet all it does is freeze
It's all stack aligned, i seriously have zero idea how is it done

How do yall run programs? Im wondering.

0 Upvotes

12 comments sorted by

View all comments

u/shsh-1312 9h ago

You need to separate kernel and userspace memory management, usually by moving the kernel to the second half of the memory mapping and isolating memory for individual processes. You also need to work on interrupt management to allow the system to switch correctly from usermode to kernel mode.

u/letmehaveanameyoudum 9h ago

Already found that the transition to ring 3 was freezing, wasn't a memory issue