The I/O service provides controlled access to devices through operating-system interfaces and drivers.
Applications therefore avoid manipulating device registers and protocols directly.
The program-execution service prepares a program, starts it, and handles normal or abnormal completion.
The other services may be useful but do not define the act of starting a program.
A shell is a user-facing system program that interprets commands and requests operating-system services.
Interrupt handlers belong to kernel code, while the other choices are hardware components.
The bootstrap loader initializes enough hardware state to load the kernel into memory.
Schedulers and file tables are used after the operating system has already started.
Correct Answer: D. To regain control if the process runs too long
Explanation:
A timer interrupt prevents a user process from keeping the processor indefinitely.
When the timer expires, the operating system can preempt the process and schedule another task.
A divide-by-zero condition is a synchronous exception caused by the currently executing instruction.
The processor transfers control to an operating-system handler so the fault can be managed safely.
A hardware interrupt asynchronously notifies the processor that a device requires attention.
The other choices concern memory, scheduling, or program construction rather than device notification.
Correct Answer: A. To distinguish privileged kernel execution from restricted user execution
Explanation:
The mode bit tells the processor whether the current instruction stream has kernel or user privileges.
This separation protects the system from applications executing privileged instructions directly.
Kernel mode allows trusted operating-system code to execute privileged machine instructions.
User and workload modes do not grant direct control over protected hardware operations.
Ordinary applications execute in user mode with restricted access to critical hardware and memory structures.
Privileged changes such as modifying page tables require controlled entry into kernel mode.
The kernel is the privileged core that manages processors, memory, devices, and system calls.
Shells and libraries may request services, but they do not normally execute the core privileged functions.
Correct Answer: A. Software that manages hardware resources and provides services to programs
Explanation:
An operating system coordinates hardware and offers common services to application programs.
Compilers, databases, and antivirus utilities perform narrower tasks rather than managing the whole computer.