• Components of wasps. Purpose of the operating system. Linux operating system

    Operating systems occupy a special place among software of all types, being the kernel.

    operating system (OS) is a set of programs that provide:

    • resource management, i.e. coordinated operation of all computer hardware;
    • process management, i.e. execution of programs, their interaction with computer devices and data;
    • user interface, i.e. dialogue between the user and the computer, execution of certain simple commands - information processing operations.

    OS is an operating environment, a habitat (for programs), and has its own laws.

    OS is a set of programs that providesthe ability to use PC equipment, as well asensures the joint functioning of allPC devices and provides the user with access toits resources.

    The OS is a basic and necessary component of PC software

    operating system- the most machine-dependent type of software, focused on specific computer models, since they directly control their devices or provide an interface between the user and the computer hardware.

    OS is a set of software tools that enable the user to use the capabilities of the computer.

    The OS is the main software tool that “breathes life” into a computer. Without it, the computer simply will not work. The OS controls exchange operations with disks, organizes the display of information on the screen, “understands” the keyboard, etc.

    Tasks implemented by the OS

    1 . Supporting the operation of all programs and organizing their interaction with PC devices:

      ensuring the effective implementation of information input and output operations (communication with airborne devices);

      memory distribution and data storage organization;

      ensuring the interaction of programs and data, as well as the interaction of programs with each other;

      identification of various events that arise during the work process and the appropriate response to them.

    2. Providing the user with general control of the PC:

      defining the user interface, i.e. creating a convenient and comfortable environment for communication between a person and a PC;

      ensuring the division of hardware resources between users and tasks, planning user access to shared data and providing the ability to work with them in a shared mode (working in networks).

    Modern OS provide:

    1. friendliness, simplicity and naturalness of the interface;
    2. data encryption to protect against unauthorized access;
    3. automatic distribution of data processing capacity;
    4. support for computer networks and real-time data processing tools;
    5. the ability to use individual PCs as “intelligent” terminals of powerful computer networks;
    6. support for the operation of DBMS and other powerful application programs;
    7. the ability to simulate virtual machines (when the user works as if not with the machine itself, but with its model. Emulators are used for this).

    OS composition

    Currently, many types of different operating systems are used for computers of various types, but there are general principles in their structure. As part of many operating systems, one can distinguish a certain part, which is the basis of the entire system and is called core. The kernel includes the most frequently used modules, such as an interrupt system control module, and means for distributing such basic resources as OP and processor. When the OS boots, the programs that are part of the kernel are placed in RAM, where they are permanently located and used during the operation of the computer. Such programs are called resident programs.

    Kernel (resident part of the OS)– constantly occupies a section of RAM. In the OP it is loaded from the system disk when the computer is turned on. This procedure is called initial loading.

    The OS kernel provides basic functions for the surrounding software and allows for expansion of the operating part of the OS.

    The OS kernel environment includes utilities, editors, compilers and other software that make up the operating part of the OS.

    An important part of the OS is command processor– a program responsible for interpreting and executing simple commands given by the user and its interaction with the OS kernel.

    Command processor– a special program that requests and executes user commands.

    Functions performed:

    1. provides command input and analyzes it for correctness;
    2. ensures that the command is executed if it was entered correctly, or gives a message about a conflict situation that has arisen.

    In addition, the operating system should include a rich set of utilities– usually small programs that perform various service functions.

    A simplified OS structure can be represented as a diagram

    BDOS file system – a basic disk operating system that is managed using special software modules. Basic functions: working with files, memory allocation, support for program execution, loading data into memory, monitoring program execution, etc.

    Driver system BIOS – basic input-output system. It is a set of special programs called drivers.

    As you know, a PC can have a large variety of external devices. Each external device is characterized by its own bandwidth and structure of transmitted/received data. This is why each external device has its own driver.

    Drivers devices – special programs that provide control of the operation of devices and coordination of information exchange. Also allowing you to configure device parameters

    Driver – control program servicing the hardware module.

    Drivers for the most commonly used devices (display, keyboard, disk drives, and sometimes printer) make up the main part of the BIOS.

    If BDOS is an almost unchanged part of the OS for all PCs that work with it, then BIOS can vary significantly even on the same PC depending on the type of switched peripherals.

    So the structureoperating roomsystemsconsists of:

    Core– translates commands from a program language into a “machine code” language that is understandable to the computer (command interpreter).
    Drivers– programs that control devices.
    Interface– a shell through which the user communicates with the computer.

    OS boot files are stored in external memory. (floppy, hard, optical disks). However, any programs, like the OS itself, can only be executed in RAM. Therefore, they need to be loaded there.

    1. When you turn on the PC, the chip with BIOS (BasicInput/ Output System) basic input/output system. The BIOS runs the POST program, which tests the PC hardware. For setting the date and time, as well as for setting up the operation of the hardware, with using the Del key you can download the utility Setup.
    2. After testing, the BIOS begins searching for the OS boot loader ( Master BootRecord), turning to FDD, HDD, CD-ROM in turn.

      Having found a bootloader program on the system disk, it is loaded into RAM and control of the PC’s operation is transferred to it.

      The program searches for OS files on the system disk and loads them into RAM as program modules.
      After loading is complete, the OS transfers control to the command processor.

    Principles of operation of operating systems

    Concept process plays a key role and is introduced in relation to each individual user program. Managing processes (both as a whole and individually) is the most important function of the OS. When executing programs on the central processor, the following characteristic states should be distinguished:

    • generation – preparing conditions for execution by the processor;
    • active state (or “Account”) – direct execution by the processor;
    • expectation – due to the busyness of any required resource;
    • readiness – the program is not executed, but all the resources necessary for program execution, except the central processor, are provided;
    • ending – normal or abnormal termination of program execution, after which the processor and other resources are not provided to it.

    Physical resources– real computer devices.

    Modern operating systems can be used to create and use virtual (imaginary) resources, which are models of physical ones.

    In terms of importance, virtual resources are one of the most important concepts in building modern operating systems.

    Virtual resource is a model of a certain physical resource created using another physical resource. For example, a typical representative of a virtual resource is RAM. Computers, as a rule, have a limited (physical) operating system. Functionally, its volume can be increased by partially recording the contents of the OP on a magnetic disk. If this process is organized in such a way that the user perceives all extended memory as RAM, then such “RAM” memory is called virtual.

    Virtual memory– a portion of memory that exceeds the physical amount of RAM installed in the computer, and which the OS emulates using space on the hard drive (swap file). Programs running under Windows treat virtual memory as RAM.

    Swap file– a permanent or temporary file on the hard drive that is used by the OS to emulate RAM.

    The most complete manifestation of the concept of virtuality is the concept of a virtual machine, which is the starting point for programming in high-level languages, for example, Pascal. Virtual machine there is an idealized model of a real machine, isolating the user from the hardware features of a particular computer, reproducing the architecture of a real machine, but having improved characteristics:

    • infinite memory with randomly selected methods of accessing its data;
    • one (or more) processes described in a user-friendly programming language;
    • an arbitrary number of external devices of arbitrary capacity and access.

    Concept interrupts program execution is basic when building any operating system.

    Of all the diversity reasons There are two types of interruptions: the first and the second kind. System causes of interruptions of the first kind arise when a process that is in an active state has a need to either obtain or refuse a certain resource, or to perform some action on the resource. This group also includes the so-called internal interrupts CPU-related problems (for example, arithmetic overflow or floating point underruns). System reasons for interruptions of the second type are due to the need for synchronization between parallel processes.

    When processing each interrupt, the following sequence of actions must be performed:

    • perception of interrupt request;
    • storing the state of an interrupted process, determined by the value of the program counter and other processor registers;
    • transfer of control to the interrupting program, for which the address corresponding to this type of interrupt is entered into the program counter;
    • interrupt handling;
    • restoring an interrupted process.

    In most computers, the first three stages are implemented in hardware, and the rest are implemented by a block of interrupt handling programs in the operating system.

    OS classification

    1. By the number of concurrent users:

    • single-user;

      (intended to serve one client)

    • multi-user

      (designed for a group of users at the same time).

    The main difference between multi-user systems and single-user systems is the availability of means to protect each user’s information from unauthorized access by other users.

    2. By the number of tasks simultaneously executed under OS control:

    • single-tasking;
    • multitasking.

    In multitasking mode, each task (program, application) is alternately allocated a certain share of processor time. Since the switching process is very fast, and the shares of processor time allocated to tasks are quite small, the user gets the impression of simultaneous execution of several tasks.

    You can simultaneously run a mathematical system on your account, turn on the printer to print text, launch a music player, search for viruses and draw in a graphics editor or play solitaire.

    When multitasking:

    • there are several user tasks in RAM;
    • the processor's operating time is divided between programs located in RAM and ready to be serviced by the processor;
    • In parallel with the operation of the processor, information is exchanged with various external devices.

    Distinguish displacing And non-repressive multitasking.

    When operating a computer, the most important shared resource is processor time. Distributing processor time between several programs can be done in two ways.

    The main difference between preemptive and non-preemptive multitasking is degree of centralization of the mechanism for scheduling computing processes. At non-preemptive multitasking The active process runs until it, on its own initiative, gives control to the operating system so that it selects another process ready to run from the queue. At preemptive multitasking The decision to switch the processor from one process to another process is made by the operating system, not by the active process itself.

    Multitasking operating systems are divided into three types in accordance with the efficiency criteria used in their development:

    • batch processing systems;
    • time sharing systems;
    • real time systems.

    Batch processing systems are intended for solving problems mainly of a computational nature that do not require quick results. The main goal of such systems is to solve the maximum number of problems per unit of time. To achieve this goal, the following operating scheme is used.

    At the beginning of work, a package of tasks (multi-program mixture) is formed. It is desirable to have simultaneous presence of computational tasks and tasks with intensive input-output of information. The choice of a new task from the package depends on the internal situation in the system, i.e. a task that is “beneficial” for the OS is selected. Consequently, in such operating systems it is impossible to guarantee the completion of a particular task within a certain period of time.

    The interaction of a user with a computer on which a batch processing OS is installed boils down to the fact that the user brings a task, gives it to the dispatcher-operator, and at the end of the day receives the result. Obviously, this arrangement reduces the user's efficiency.

    Time sharing OS allow you to correct the main drawback of batch processing systems - isolating the user from the process of performing his tasks. Each user is provided with a terminal from which he can control the computing process. Because each task is allocated only a slice of CPU time, no task takes up the processor for long, and response times are acceptable. If the quantum is chosen small enough, then all users simultaneously working on the same computer have the impression that each of them is solely using the machine.

    Time-sharing operating systems have less throughput than batch processing systems because Every task launched by the user is accepted for execution, and not the one that is “beneficial” to the OS, and, in addition, there are overhead costs for more frequent switching of the processor from task to task. The criterion for the effectiveness of time sharing systems is not the maximum computer throughput (information processing speed), but the convenience and efficiency of the individual user.

    The most advanced and complex multi-user multitasking operating systems that allow many tasks to be performed simultaneously by many users provide separation computer resources according to user priorities and data protection each user from unauthorized access. In this case, the operating system runs in time sharing, i.e. serves many users, each working from their own terminal.

    The essence of the time sharing mode is as follows. Each program located in RAM and ready for execution is allocated for execution a fixed time interval (multiplexing interval), set in accordance with the user's priority. If the program is not completed to completion within this interval, its execution is forcibly interrupted and the program is moved to the end of the queue. The next program is retrieved from the beginning of the queue, executed during the corresponding multiplexing interval, then goes to the end of the queue, and so on. in accordance with the cyclic algorithm. If the multiplexing interval is small enough (~200 ms), and the average length of the queue of programs ready for execution is small (~10), then the next time slice is allocated to the program every 2 s. Under these conditions, none of the users experience virtually any delays, because... they are comparable to human reaction time.

    Priority(priority) – relative importance or urgency.

    Priority– this is having an advantage, i.e. a requirement for increased attention, which can be determined by a quantitative value taken into account when determining the order in which several demands for access to one resource are satisfied.

    Assign priorities - establish a sequence of actions according to the urgency or importance of the work. In multiprogram mode, programs are assigned priorities so that urgent work is not delayed by auxiliary tasks. Software interrupts should be handled similarly to multiprogram mode.

    One type of time-sharing mode is background mode when a program with a lower priority is running in the background of a program with a higher priority. Working in the background in real time is similar to the work of an executive secretary. The secretary deals with current affairs until the boss gives an urgent order.

    Real-time systems are used to control various technical objects (conveyor, machine tool, robot, spacecraft, scientific experimental installation, galvanic line, blast furnace, automatic machine for product quality control). There is a maximum permissible time during which a particular program that controls an object must be executed. The system must have guaranteed reaction time, i.e. The response delay should not exceed a certain time. Otherwise, an accident may occur (the satellite will go out of sight; experimental data coming from the sensors will be lost; the thickness of the galvanic coating will not correspond to the norm; defective products will end up in the receiver of suitable products).

    Thus, the efficiency criterion for real-time systems is their ability to withstand predetermined time intervals between launching a program and obtaining a result (control action).

    The computer controls some external process, processing data and information directly coming from the control object. Since the determining factor is the data actually coming from the control object, this mode is called real time, and its organization is entrusted to a specialized operating system.

    3. By the number of processors used:

    • single-processor;
    • multiprocessor.

    4. By processor bit size:

    • 8-bit;
    • 16-bit;
    • 32-bit;
    • 64-bit.

    OS bit depth – determined number of bits used for addressing (in RAM, on disks), (by the processor capacity of your PC).

    Windows OS has 32-bit and 64-bit, distributions are divided into x32 and x64, respectively, x86 is the designation of the 32-bit version.

    View the bit depth in the system:

    shortcut “My Computer” → RMB → Properties → System type

    5. By type of user interface:

    • command (text);
    • object-oriented (graphical).

    6.By type of use of shared hardware and software resources:

    • network;
    • local.

    Network operating systems are designed to effectively solve distributed data processing problems. Such processing is carried out not on a separate computer, but on several computers connected by a network. Network operating systems support the distributed execution of processes, their interaction, data exchange between computers, user access to shared resources and other functions that turn a spatially distributed system into an integral multi-user system.

    All network operating systems are divided into two groups: peer-to-peer OS and OS with dedicated servers.

    IN peer-to-peer In networks, each computer can perform both the functions of a server and a workstation. In networks with dedicated servers functions are more strictly defined: workstations do not provide their resources for other computers; this is only possible for servers.

    Characteristics that determine the choice of OS:

    • prevalence;
    • the presence of a large number of application software running under its control;
    • ease of development and interaction with users;
    • ease of transition from one OS version to another, more advanced one.

    OS examples

    1. MS- DOS - designed to work with 16- and 32-bit processors such as 80286, 80386, 80486 (Intel), 5×86 (AMD) - « disk OS » (DOS or DOS), the term developed historically and only means that the entire operating system or its main part is located on an external medium (hard drive, floppy disk or CD), from where it should be loaded into the computer’s RAM;
    2. Windows 95/98/XP, Windows Vista, Windows 7, W indows NT/2000, OS/2 Warp 4.0 — designed to work with 32- and 64-bit Pentium-type processors;
    3. UNIX — used to work with 32- and 64-bit processors such as: Pentium (Intel), Alpha AXP (DEC), P6 and PowerPC (IBM and Motorola), R4300i (MIPS);
    4. System( MacOS) — designed for Macintosh computers from Apple;
    5. Linux– Unix clone for running on PC.
      Linux is a freely distributed version of the Unix OS for the x86, Motorola 68k, Digital Alpha, Sparc, Mips and Motorola PowerPC platforms. Linux does not use any pieces of software owned by any commercial organizations. For this reason, it has become quite widespread.
      The first version of Linux OS was developed in 1991 by T. Linus (Finland), and then a large number of people from different parts of the world participated in its development. The latest versions are the product of the collective creativity of a large number of programmers.

    The most important advantage of most operating systems is modularity. This property allows you to combine certain logically related groups of functions in each module. If there is a need to replace or expand such a group of functions, this can be done by replacing or modifying only one module, rather than the entire system.

    Most operating systems consist of the following main modules:

      basic input/output system (BIOS – Basic Input Output System);

      operating system loader;

    • device drivers;

      command processor;

      external commands (files).

    Basic I/O system(BIOS) is a set of microprograms that implement basic low-level (elementary) input-output operations. They are stored in the computer's read-only memory (ROM) and written there when the motherboard is manufactured. This system is essentially “built-in” into the computer and is both its hardware and part of the operating system.

      The first function of the BIOS is to automatically test the main components of the computer when it is turned on. If an error is detected, a corresponding message is displayed on the screen and/or an audible signal is given.

      Next, the BIOS calls the initial boot block of the operating system located on the disk (this operation is performed immediately after testing is completed). Having loaded this block into random access memory (RAM), the BIOS transfers control to it, and it, in turn, loads other OS modules.

      Another important BIOS function is interrupt servicing. When certain events occur (pressing a key on the keyboard, clicking a mouse, an error in a program, etc.), one of the standard BIOS routines is called to handle the situation that has arisen.

    Operating system loader is a short program located in the first sector of any boot disk (floppy disk or disk with an operating system). The function of this program is to read the main OS disk files into memory and transfer further computer control to them.

    Core OS implements basic high-level services, is loaded into RAM and remains in it permanently. The OS kernel consists of several subsystems, each of which is responsible for performing a particular task:

      file system (responsible for placing information on storage devices);

      memory management system (places programs in memory);

      program management system (runs and executes programs);

      communication system with device drivers (responsible for interaction with external devices);

      error handling system;

      time service (provides information about the system time to all programs).

    The BIOS expansion module gives the operating system flexibility by allowing you to add drivers to support additional devices.

    Drivers – these are programs that control the operation of external (peripheral) devices at the physical level. They complement the OS I/O system and provide support for new devices or non-standard use of existing ones. They transmit or receive data from the hardware and make user programs independent of its features.

    Drivers are loaded into the computer's memory when the operating system boots; the necessity and order of their loading are indicated in special configuration files. This scheme makes it easier to connect new devices to the machine and allows you to do this without affecting the OS system files.

    Command processor- This a program whose functions are as follows:

      receiving and parsing commands received from the keyboard or from a batch file;

      execution of internal operating system commands;

      loading and execution of external commands (implemented as independent programs) of the operating system and user application programs (files with the extension COM, EXE or BAT).

      execution of command files (these are text files with a set of commands and the BAT extension). When a command is given the name of such a file, the shell begins to sequentially read and interpret the lines contained in it, each of which can contain one command, label, or comment. If the next line contains a command that calls a program, the execution of the batch file is suspended and the called program starts working. After its completion, the next command in the batch file is executed.

    The concept of an operating system (OS). Purpose, main functions and types of OS

    Operating system (OS) is a set of system and control programs designed for the most efficient use of all resources of a computer system (CS) (Computer system is an interconnected set of computer hardware and software designed for processing information) and the convenience of working with it.

    Purpose of OS

    The purpose of the OS is to organize the computing process in a computer system, rational distribution of computing resources between individual tasks; providing users with numerous service tools that facilitate the process of programming and debugging tasks. The operating system plays the role of a kind of interface (Interface is a set of hardware and software necessary to connect peripheral devices to a PC) between the user and the computer, i.e. The OS provides the user with a virtual aircraft. This means that the OS largely forms the user’s idea of ​​the capabilities of the aircraft, the ease of working with it, and its throughput. Different operating systems on the same hardware can provide the user with different opportunities for organizing the computing process or automated data processing.

    In computer software, the operating system occupies a central position because it plans and controls the entire computing process. Any software component must run under the OS.

    The function of the OS is to distribute processors, memory, devices, and data among processes competing for these resources.

    Main functions:

    Performing, at the request of programs, those fairly elementary (low-level) actions that are common to most programs and are often found in almost all programs (data input and output, starting and stopping other programs, allocating and freeing additional memory, etc.).

    Standardized access to peripheral devices (input/output devices).

    RAM management (distribution between processes, organization of virtual memory).

    Controlling access to data on non-volatile media (such as a hard drive, optical disks, etc.), organized in a particular file system.

    Providing a user interface.

    Network operations, support for the network protocol stack.

    Additional features:

    Parallel or pseudo-parallel execution of tasks (multitasking).

    Efficient distribution of computing system resources between processes.

    Differentiation of access of different processes to resources.

    The organization of reliable computing (the inability of one computing process to intentionally or mistakenly influence calculations in another process) is based on the delimitation of access to resources.

    Interaction between processes: data exchange, mutual synchronization.

    Protecting the system itself, as well as user data and programs, from actions of users (malicious or unknowing) or applications.

    Multi-user mode of operation and differentiation of access rights (see authentication, authorization

    Types of operating systems

    According to the application conditions, three OS modes are distinguished: batch processing, time sharing and real time. In batch processing mode, the OS sequentially executes tasks collected in a batch. In this mode, the user has no contact with the computer, receiving only the results of calculations. In time-sharing mode, the OS simultaneously performs several tasks, allowing each user to access the computer. In real time, the OS provides control of objects in accordance with the received input signals. The response time of a computer with a real-time OS to a disturbing influence should be minimal.

    There are several types of operating systems: DOS, Windows, UNIX of different versions, etc. The most common is the Windows operating system. There are several versions of Windows: Windows-3.1, Windows-95, Windows-98, Windows-2000, Windows NT. All of them are close in content, so in the future we will consider the DOS and Windows-9x operating systems

    The DOS operating system consists of the following parts:

    The basic input/output system (BIOS), located in the read-only memory (read-only memory, ROM) of the computer. This part of the operating system is "built into" the computer. Its purpose is to perform the most simple and universal operating system services related to I/O. The Basic I/O system also contains a computer performance test that checks the operation of the computer's memory and devices when the computer's power is turned on. In addition, the basic input/output system contains a program that calls the operating system loader.

    External DOS commands are programs supplied with the operating system as separate files. These programs perform maintenance actions, such as formatting floppy disks, checking disks, etc. Device drivers are special programs that complement the DOS input/output system and provide maintenance for new or non-standard use of existing ones.

    The key idea of ​​Windows is to ensure that programs are completely independent of the hardware. Windows 3.1 was originally designed to completely handle communication with a specific type of display or printer. Both the user and the programmer creating an application for Windows are provided with universal tools that eliminate the problem of ensuring compatibility with specific hardware (hardware compatibility) and software (software compatibility).

    A unified, single graphical user interface makes it easy to learn new software products.

    Windows not only allows you to work with a familiar software product, but also offers additional features (running several programs at the same time, quickly switching from one program to another, exchanging data between them, etc.). The ability to work with all MS-DOS application programs (word processors, DBMS, spreadsheets, etc.) is provided.

    Windows 3.1 can operate in one of three modes: Real, Standart, 386 Enhanced. During the installation process, Windows analyzes the available hardware resources and automatically sets the mode that makes the best use of the available hardware.

    Windows 3.1 allows you to run multiple programs at the same time (including the same program multiple times), with the ability to instantly switch from one program to another. This allows you to initiate a long process (printing, sorting and copying large amounts of data) and move on to other work rather than waiting for it to finish.

    Windows 95 is an evolutionary development of Windows 3.1x and does not represent a complete break with the past. Although it introduces many important changes from the 16-bit Windows architecture, it retains some of the most important features of its predecessor. The result was a hybrid OS capable of running 16-bit Windows applications, DOS-legacy applications, and legacy real-mode device drivers while being compatible with true 32-bit applications and 32-bit virtual device drivers.

    Among the most important improvements introduced in Windows 95 are its native ability to run 32-bit multithreaded applications, protected address spaces, preemptive multitasking, much greater and more efficient use of virtual device drivers, and increased use of 32-bit heaps for storing structures. system resource data. Its most significant drawback is its relatively weak protection against poorly functioning programs containing errors.

    Windows NT is essentially a server operating system designed for use on a workstation. This results in an architecture in which absolute protection of application programs and data takes precedence over considerations of speed and compatibility. Windows NT's extreme reliability comes at the cost of high system costs, so a fast processor and at least 16 Mb of RAM are required to obtain acceptable performance. As with OS/2 Warp, Windows NT achieves lower memory security by eliminating compatibility with real-mode device drivers. Windows NT runs native 32-bit NT applications, as well as most Windows 95 applications. Like OS/2 Warp and Windows 95, Windows NT allows you to run 16-bit Windows and DOS applications within its environment. programs.

    In April 1987, IBM and Microsoft announced joint plans to create a new operating system: OS/2. Several years passed, and the world witnessed a “divorce proceeding”, as a result of which OS/2 was left with one parent - IBM, and Microsoft gave all its sympathies to its beloved brainchild, whose name is Windows. It's important to remember that OS/2 is a new operating system with a graphical user interface (GUI), while Windows is a GUI running on top of DOS.

    OS/2 is a fully secure operating system, making memory conflicts between programs impossible. A multitasking OS/2 system can run multiple applications at the same time: for example, you can start recalculating a spreadsheet, start printing a document in a word processor, start a communications package for sending/receiving email messages, and then continue searching for records in a database.

    OS/2 supports multiprocess application programs that are designed to run multiple internal functions simultaneously. Examples include a word processor in which printing a document and checking spelling are carried out in parallel; a spreadsheet with the ability to simultaneously perform recalculation and viewing functions, or a database in which you can combine the functions of updating and searching for records.

    program interface operational computing

    Good day, dear user. On this page we will talk about topics such as: Purpose and main functions of operating systems. Composition of the operating system.

    Operating system (OS) is a set of interconnected system programs for organizing user interaction with a computer and executing all other programs. OS belong to the system software and are its main part. Operating systems: MS DOS 7.0, Windows Vista Business, Windows 2008 Server, OS/2, UNIX, Linux.

    Main OS functions:

    • management of computer devices (resources), i.e. coordinated operation of all PC hardware: standardized access to peripheral devices, RAM management, etc.
    • process management, i.e. execution of programs and their interaction with computer devices.
    • controlling access to data on non-volatile media (such as a hard drive, CD, etc.), usually using a file system.
    • maintaining the file structure.
    • user interface, i.e. dialogue with the user.

    Additional features:

    • parallel or pseudo-parallel execution of tasks (multitasking).
    • interaction between processes: data exchange, mutual synchronization.
    • protection of the system itself, as well as user data and programs from malicious actions of users or applications.
    • differentiation of access rights and multi-user mode of operation (authentication, authorization).

    Composition of the operating system

    In general, the composition OS includes the following modules:

    • A software module that manages the file system.
    • A command processor that executes user commands.
    • Device drivers.
    • Software modules that provide a graphical user interface.
    • Service programs.
    • Help system.

    Device Driver(device driver) is a special program that provides control over the operation of devices and coordination of information exchange with other devices.

    Command processor(command processor) – a special program that requests commands from the user and executes them (program interpreter).

    The command interpreter is responsible for loading applications and managing information flow between applications.

    To simplify the user's work, modern operating systems include software modules that provide a graphical user interface.
    The process of computer operation, in a certain sense, comes down to exchanging files between devices. The OS has a software module that manages the file system.

    Service programs allow you to maintain disks (check, compress, defragment, etc.), perform operations with files (copying, renaming, etc.), and work in computer networks.

    For user convenience, the OS includes help system, which allows you to quickly obtain the necessary information about the functioning of both the OS as a whole and the operation of its individual modules.

    Note

    The composition of OS modules, as well as their number, depends on the family and type of OS. For example, MS DOS does not have a module that provides a graphical user interface.

    The most common approach to structuring operating system is to divide all its modules into two groups:

    1. Core– these are modules that perform the main functions of the OS.
    2. Auxiliary modules, performing auxiliary OS functions. One of the defining properties of the kernel is working in privileged mode.

    Kernel modules perform the following basic OS functions: Process management, Interrupt system management, Memory management, I/O device management, Functions that solve intra-system problems of organizing the computing process: context switching, page loading/unloading, interrupt handling. These features are not available for apps. Functions that support applications, creating for them a so-called application software environment.

    Applications can make requests to the kernel − system calls– to perform certain actions: to open and read a file, display graphic information on the display, obtain system time, etc. Kernel functions that can be called by applications form the application programming interface - API ( Application programming interface.

    Example.
    Basic code Win32 API contained in three dynamic loading libraries (Dynamic Link Library, DLL): USER32, GDI32 And KERNEL32.

    Kernel is a Windows module that supports low-level functions for working with files and managing memory and processes. This module provides service for 16- and 32-bit applications.
    GDI(Graphics Device Interface) is a Windows module that provides the implementation of graphic functions for working with color, fonts and graphic primitives for the display and printers.
    User is a Windows module that is a window manager and is responsible for creating and managing windows, dialog boxes, buttons, and other user interface elements displayed on the screen.
    The kernel is the driving force behind all computing processes in a computer system, and the failure of the kernel is tantamount to the collapse of the entire system; without it, the OS is completely inoperable and will not be able to perform any of its functions. Therefore, operating system developers pay special attention to the reliability of kernel codes; as a result, the process of debugging them can last for many months.

    Typically, the kernel is designed as a software module of some special format that differs from the format of user applications.
    Auxiliary modules OSes perform auxiliary OS functions (useful, but less mandatory than kernel functions).

    Examples of auxiliary modules:

    • Data archiving program.
    • Disk defragmentation program.
    • Text editor.

    Auxiliary OS modules are designed either as applications or as libraries of procedures. Auxiliary OS modules are divided into the following groups:

    utilities– programs that solve problems of managing and maintaining a computer system: maintaining disks and files.

    system processing programs– text or graphic editors, compilers, linkers, debuggers.

    programs to provide the user with additional user interface services (calculator, games).

    libraries of procedures for various purposes, simplifying application development (library of mathematical functions, input-output functions).

    Like regular applications, utilities that handle OS programs and libraries access kernel functions through system calls to perform their tasks.
    The functions performed by kernel modules are the most frequently used functions of the operating system, so the speed at which they are executed determines the performance of the entire system. To ensure high operating speed of the OS, all kernel modules or most of them are permanently located in RAM, that is, they are resident.

    Auxiliary modules are usually loaded into RAM only for the duration of their functions, that is, they are transit. This organization of the OS saves computer RAM.

    Note

    The division of the operating system into a kernel and auxiliary modules ensures easy extensibility of the OS. To add a new high-level feature, you only need to develop a new application without having to modify the core functionality that forms the core of the system.

    OS kernel objects are:

    • Processes (discussed in topic 2.3).
    • Files.
    • Events.
    • Streams (discussed in topic 2.3).
    • Semaphores are objects that allow no more than n threads to enter a given section of code.
    • Mutexes are single-place semaphores used in programming to synchronize simultaneously executing threads.
    • Files projected into memory.

    An operating system (OS) is a software package that provides interaction between the user and the computer hardware. For example, Windows, Linux and Mac OSX. To put it a little more simply, the system is a set of program codes that allows you to run programs on your computer, display graphics on the monitor, perceive and interpret signals from the mouse and keyboard, print documents, access the Internet, and so on. However, this is not just a set of disparate utilities, but something more, but first things first

    Note: The article is intended for beginners and ordinary users.

    Note: The most popular operating systems are Windows, various builds of Linux and Mac OSX.

    Purpose and types of operating system

    Basically, the operating system has the following purpose:

    1. Controlling computer hardware devices, including transmitting and receiving information from peripheral devices. In other words, coordinates the functioning of all equipment, monitors implementation, etc.

    2. Providing interfaces or capabilities for transferring instructions from programs to hardware devices. For example, so that toys can use the video card

    3. Is a layer between the user and the computer

    4. Not a mandatory requirement, but today it is present in almost any operating system. Providing additional features for users. For example, organizing access control (security)

    Operating systems are usually divided into 4 types:

    1. Single-user, single-tasking. As the name suggests, the system is designed for one user and one task.

    2. Single-user single-tasking with an additional background task. Allows you to run another additional task in the background. Typically, the background task is printing

    3. Single-user multitasking. Supports only one user, but allows you to run multiple tasks at once

    4. Multi-user multitasking. Everything is simple here. There are many users who run many tasks.

    Please note that in principle there cannot be multi-user single-tasking systems, since each user on the computer represents a separate task in the operating system.

    In addition, operating systems are 32 and 64 bit.

    What does the operating system consist of?

    As already mentioned, an operating system is a software package that allows you to use the devices on your computer. Therefore, it is divided into several different levels.

    In short, an operating system usually consists of the following:

    2. Drivers

    3. Services or tool packages

    4. Shell

    5. Command module

    Note: It is worth knowing that operating systems for microcontrollers may not contain all of the above (there is simply no need).

    Now, let's look at it in order:

    The kernel is the most important part of the operating system. It contains all the necessary mechanisms to coordinate and manage all other components.

    Drivers are software codes (not necessarily a program or library) that allow the operating system kernel to interact correctly with hardware devices. It is worth knowing that there are standard drivers that provide a minimum set of capabilities, and drivers from manufacturers that allow you to use the device to the maximum.

    Services or tool packages are separate programs that allow the operating system to provide additional capabilities.

    The shell is the interface that the user sees. It is thanks to him that the user can launch programs and perform other actions.

    A command module is a user program that runs on the operating system.

    What happens inside the operating system

    All interaction within the operating system is based on so-called system calls, which represent a layer between requests from user programs and computer devices. How it happens. The user launches the program, which in turn sends a system call to the operating system services. For example, "open the file for reading." Services access the system kernel, which then accesses computer devices through drivers. In the case of the example, to the hard drive driver, which subsequently sends commands to the device.

    Computer hardware devices have a similar principle, only they are all built on interrupts, which are special signals indicating certain actions. For example, completing a task, preparing before transferring data, etc.

    This approach allows the operating system to provide resilience when errors occur. However, if errors occur at the kernel level, the system usually crashes. For example, in Windows this is the blue screen of death.

    How the operating system boots

    The operating system loads in several stages:

    1. First, the computer's embedded system (