Operating Systems - System Call - Mechanism & Modes (User vs Kernel)
In the following pseudo-code snippet for a system call handler, which line contains a subtle bug related to mode switching?
1: save_user_state();
2: switch_to_kernel_mode();
3: perform_system_call();
4: switch_to_user_mode();
5: restore_user_state();
