An operating system can be considered
as a set of components, each of
which is responsible for certain functions. The set of such components and
the order of their interaction with each other and with the external
environment is determined by the
architecture of the operating system.
Consider the basic concepts of operating system architecture, approaches to
them, features of OS interaction with the external environment. Let's
consider the implementation of the architecture on the example of Linux.
Basic Concepts Of Operating System Architecture
System Kernel - Privileged Mode And User Mode
The
basic components of the OS, which are responsible for its most
important functions, are usually in the memory constantly and are executed
in a privileged mode,
called the kernel of the operating system .
Current approaches to the design of OS architecture differently define the
functionality of the kernel. The most important functions of the OS, the
teaching of which, of course, lay in the core
include interrupt processing,
memory control, input-output control. The kernel's reliability and
performance make it more demanding.
The core feature of the kernel is that it runs in privileged mode. Consider
the features of this model. To ensure efficient resource management
computer’s memory operating system should
have certain privileges
regarding applications. It is necessary that applications do not operate the
OS, and simultaneous OS should be able to intervene in a program, such as
CPU or switching solution liabilities conflict in the struggle for resources.
Realizing these benefits requires hardware support for processors. They
must support at least two modes -
privileged (protected
mode kernel
mode, kernel mode ) and
user mode ( user mode ) in the invalid user
commands that are critical to system operation (switching tasks to appeal to
memory, given the limits access I / O devices, etc.).
Consider how different CPU modes are used when interacting with the
kernel and applications. After loading the kernel switches, the processor in
privileged mode and gets complete control of a computer. Each application
is started
and executed in user mode, where it does not have access to
kernel resources and other applications. When you need to perform an
action implemented in the kernel, the application makes
a system call . The
kernel intercepts it, switches the processor to privileged mode, performs an
action, switches the processor back to user mode and returns the result of
the application.
A system call is slower than a call to a user-implemented function because
the processor switches between modes twice. For some OSes, some of the
functionality is implemented in user mode, so you don't need to use system
calls to access it.