0 votes 0 votes When compiler finds there is a System Call then what are the activitites taking place ? Activities involved in Mode shifting process from user to kernal mode and back. Operating System operating-system interrupts + – pC asked Oct 7, 2016 pC 408 views answer comment Share Follow See 1 comment See all 1 1 comment reply mcjoshi commented Oct 7, 2016 reply Follow Share Compiler doesn't know about the System call, but linker knows. So, it replaces it with stub code, Now during run-time process wants to access the system call i.e., go to the address referred by stub code. Now, A context switch happens (Registers saved, Entire info. in PCB saved, and mode bit is changed to 1). The system call handler gains control(switch to protected mode). System call handler then calls the function supporting the system call. Loader maintains a table of the currently defined system calls for this purpose. The system call runs within the calling process, but with more privilege than the calling process. System call function returns to the system call handler when it has performed its operation. System call handler then restores the state of the process and returns to the user program using a non-priviledged instruction. 3 votes 3 votes Please log in or register to add a comment.