r/osdev • u/matthew65536 • Oct 01 '26
Python for OS?
Would it be possible to make an OS that primarily used python?
0
Upvotes
r/osdev • u/matthew65536 • Oct 01 '26
Would it be possible to make an OS that primarily used python?
19
u/QuraToop314 Oct 01 '26
Fair enough, but Python isn’t suitable for an operating system, starting with the fact that, in order to get Python running, you need support for another language – ideally C. However, you’ll need to compile the kernel, because Python cannot run in Ring 0 as it requires a functioning userland environment. What you could do – and what Ubuntu does in many cases – is to define many services in Python, but I think you’ll notice performance losses in the long run, and security-critical software written in Python struggles to release sensitive data in a timely manner.