Modern computer systems run multiple programs concurrently, alongside the critical Operating System (OS) itself. To prevent errors or malicious actions in one program from corrupting the OS or other programs, the CPU enforces different levels of privilege, known as execution…