Who Called Supervisor? Understanding OS Traps and SVC Numbers

Who called supervisor?
Operating System is called a supervisor of computer activity.
Read more on www.examveda.com

The phrase “Who called supervisor?” is used frequently in the realm of operating systems (OS) to refer to the act of a program or process requesting the attention of the OS supervisor or kernel. This request is frequently brought about by a trap, which is a software interruption that happens when a program tries to carry out an operation that needs access to hardware resources or kernel-level privileges. The idea of traps, SVC numbers, and the function of the kernel in a computer system will all be discussed in this article.

An OS uses traps as a way to deal with mistakes, exceptions, and other events that necessitate the involvement of the kernel. The OS shifts the CPU from user mode to kernel mode and hands control to a preset trap handler code whenever a trap occurs. Before handing back control to the user program, this procedure takes care of the relevant tasks, such as recording the error, allocating memory, or making a system call. Traps are a crucial component of contemporary OS design since they enable for secure and effective application execution while prohibiting unauthorized access to system resources.

Implementing system calls—functions offered by the OS that let user programs communicate with the system’s hardware and services—is one frequent usage of traps. Typically, a program will call a system call by utilizing a special instruction, like the x86 INT instruction, which causes a trap to be triggered by a software interrupt. The operating system then picks up the interrupt, recognizes the requested system call, and runs the relevant kernel code. Opening and shutting files, starting and stopping processes, allocating memory, and transmitting data over a network are a few examples of system calls. In mainframe systems, system calls are identified by SVC (supervisor call) numbers. SVCs were first introduced in the 1960s with IBM’s OS/360 operating system and have since evolved into a mainframe OS standard. Each system call is given a specific number called an SVC, which serves as a rapid way for the operating system to recognize the requested action. As an illustration, SVC 1 may refer to a system call that allocates memory, but SVC 2 may refer to a call that dealslocates memory. SVC numbers are normally provided as a parameter to the system call instruction by the user program.

The core element of an OS that controls system resources and offers services to user programs is called the kernel. Memory management, process scheduling, device drivers, and security are all responsibilities of the kernel. User programs run in a restricted user mode, but the kernel runs in privileged mode, giving it complete access to the hardware and system resources. A monolithic or microkernel design is commonly used to implement the kernel; the former is more widespread in traditional desktop and server OSs, while the latter is more common in embedded systems and real-time OSs.

In conclusion, anyone interested in OS design and development needs to comprehend the ideas of traps, SVC numbers, and the kernel. Traps provide secure, effective program execution while guarding against unwanted access to system resources. The kernel is the core element of an operating system that controls system resources and offers services to user programs. SVC numbers are a means for mainframe systems to identify system calls. By learning these ideas, you may create OSs that are more versatile and effective in a variety of situations.

FAQ
And another question, what is supervisory signaling?

When a user program needs privileged access or services from the operating system, supervisory signaling is the process of communicating between the user program and the operating system. Typically, OS traps and SVC numbers are used for this messaging.