Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
OS 1-32.docx
Скачиваний:
0
Добавлен:
01.03.2025
Размер:
300.04 Кб
Скачать

7)Process Description. Operating System Control Structures.Process Switching.

A process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently.[1][2]

A computer program is a passive collection of instructions; a process is the actual execution of those instructions. Several processes may be associated with the same program; for example, opening up several instances of the same program often means more than one process is being executed.

Multitasking is a method to allow multiple processes to share processors (CPUs) and other system resources. Each CPU executes a single task at a time. However, multitasking allows each processor to switch between tasks that are being executed without having to wait for each task to finish. Depending on the operating system implementation, switches could be performed when tasks perform input/output operations, when a task indicates that it can be switched, or on hardware interrupts.

The operating system may also maintain file tables, which provide information about the existence of files, their location on secondary memory, their current status, and other attributes. Much, if not all, of this information may be maintained and used by a file management system, in which case the operating systems has little or no knowledge of files. In other operating systems much of the detail of file management is managed by the operating system itself.

In multitask OS and, process of the termination of performance by the processor of one task (process, a stream, a thread) with saving of all necessary information and the condition, necessary for the subsequent continuation from the interrupted place, and restoration and loading of a condition of a task to which performance passes the processor.

Procedure of switching of a context includes so-called planning of a task — decision-making process to what task to transfer control.

8)Memory Management

In a uni programming system, main memory is divided into two parts: one part for the operating system (resident monitor, kernel) and one part for the program currently being executed. In a multiprogramming system, the “user” part of memory must be further subdivided to accommodate multiple processes.The task of subdivision is carried out dynamically by the operating system and is known as memory management. Effective memory management is vital in a multiprogramming system. If only a few processes are in memory, then for much of the time all of the processes will be waiting for I/O and the processor will be idle.Thus memory needs to be allocated to ensure a reasonable supply of ready processes to consume available processor time. While surveying the various mechanisms and policies associated with memory management,it is helpful to keep in mind the requirements that memory management is intended to satisfy.Has five requirements:

• Relocation • Protection• Sharing• Logical organization• Physical organization

Memory Management has main terms what we must know to have observation about this:

Frame A fixed-length block of main memory.

Page A fixed-length block of data that resides in secondary memory (such as disk). A page of data may

temporarily be copied into a frame of main memory.

Segment A variable-length block of data that resides in secondary memory. An entire segment my temporariliy

be copied into a an available region of main memory (segmentation) or that segment

may be divided into pages which can be individually copied into main memory. Relocation In a multiprogramming system, the available main memory is generally shared among a number of processes. Protection Each process should be protected against unwanted interference by other processes, whether accidental or intentional. Thus, programs in other processes should not be able to reference memory locations in a process for reading or writing purposes without permission. Sharing Any protection mechanism must have the flexibility to allow several processes to access the same portion of main memory. For example, if a number of processes are executing the same program, it is advantageous to allow each process to access the same copy of the program rather than have its own separate copy

9)File Management In most applications, the file is the central element.With the exception of real-time applications and some other specialized applications, the input to the application is by means of a file, and in virtually all applications, output is saved in a file for long-term storage and for later access by the user and by other programs. The file system provides the resource abstractions typically associated with secondary storage. The file system permits users to create data collections, called files, with desirable properties, such as: Long-term existence: Files are stored on disk or other secondary storage and do not disappear when a user logs off. Sharable between processes: Files have names and can have associated access permissions that permit controlled sharing. Structure: Depending on the file system, a file can have an internal structure is convenient for particular applications. In addition, files can be organized into hierarchical or more complex structure to reflect the relationships among files. A file management system is that set of system software that provides services to users and applications in the use of files.Typically, the only way that a user or application may access files is through the file management system.This relieves the user or programmer of the necessity of developing special-purpose software for each application and provides the system with a consistent, well-defined means of controlling its most important asset. Objectives for a file management system:

• To meet the data management needs and requirements of the user, which include

storage of data and the ability to perform the aforementioned operations

• To guarantee, to the extent possible, that the data in the file are valid

• To optimize performance, both from the system point of view in terms of overall

throughput and from the user’s point of view in terms of response time

• To provide I/O support for a variety of storage device types

• To minimize or eliminate the potential for lost or destroyed data

• To provide a standardized set of I/O interface routines to user processes

• To provide I/O support for multiple users, in the case of multiple-user systems

device drivers communicate directly with peripheral devices or their controllers or channels. A device driver is responsible for starting I/O operations on a device and processing the completion of an I/O request.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]