Please enable JavaScript.
Coggle requires JavaScript to display documents.
MODE OF EXECUTION, MODE SWITCHING, PROCESS SWITCHING, TRAP, INTERRUPT,…
MODE OF EXECUTION
USER MODE
OS allows only a few instructions to be executed (for eg. The instructions
that process data -- User applications)
User applications can't open files, send network packets, print to the
screen, or allocate memory
- If the user applications have to execute the privileged instructions, the
applications ask kernels to do the work (for eg. Via. a system call).
SYSTEM CALL
-
-
exec()
When the exec() system call is invoked, the program specified in the parameter will replace the entire process - including all the threads.
The new program has the same process ID as it has just replaced the old process
-
KERNEL MODE
system mode, control mode, or privileged mode.
OS allows all CPU instructions to execute on the underlying hardware
- Kernel processes run in the KERNEL mode with the supervisor privilege
or superuser privilege
-
-
PROCESS SWITCHING
- Process switching is the concept of switching the
processes of execution.
- the running process is interrupted and OS assigns the
running state to another processes.
TRAP
software-produced interrupt
A signal raised from a user program that indicates the operating system to perform some action or functionality immediately
- Synchronous: traps wait for OS functional activity
- System calls are a type of trap, it triggers the operating system to utilize the resources.
INTERRUPT
Hardware produced interrupt
A signal to the processor emitted by the hardware indicating an event that needs immediate attention
- Asynchronous: expects an immediate attention
- All traps are kind of interrupts but not all interrupts are traps.
ZOMBIE PROCESS
The process which has been terminated but whose PCB has not been cleaned up from the main memory because the Parent Process was not waiting for the child this occupies our precious memory in the RAM
ORPHAN PROCESS
The process that doesn't have a parent process because the parent got terminated before the completion of the child