Google Search

Monday, November 2, 2015

EXECUTION OF THE OPERATING SYSTEM

 The OS functions in the same way as ordinary computer software in the sense that the OS is a set of programs executed by the processor.

The OS frequently relinquishes control and depends on the processor to re- store control to the OS.

If the OS is just a collection of programs and if it is executed by the processor just like any other program,is the OS a process? If so,how is it controlled? These in- teresting questions have inspired a number of design approaches.

Nonprocess Kernel:-
One traditional approach, common on many older operating systems, is to execute the kernel of the OS outside of any process .With this approach,when the currently running process is interrupted or issues a supervisor call,the mode context of this process is saved and control is passed to the kernel.The OS has its own region of memory to use and its own system stack for controlling procedure calls and returns.The OS can perform any desired functions and restore the context of the in- terrupted process,which causes execution to resume in the interrupted user process. Alternatively, the OS can complete the function of saving the environment of the process and proceed to schedule and dispatch another process.Whether this happens depends on the reason for the interruption and the circumstances at the time. In any case, the key point here is that the concept of process is considered to apply only to user programs.The operating system code is executed as a separate entity that operates in privileged mode.

Execution within User Processes :-
An alternative that is common with operating systems on smaller computers (PCs, workstations) is to execute virtually all OS software in the context of a user process.

The view is that the OS is primarily a collection of routines that the user calls to per- form various functions,executed within the environment of the user’s process.

No comments:

Post a Comment