2.3 OPERATING SYSTEM SERVICES
In this section we consider basic services supported by an operating system. There
are many building blocks to be considered, not all of which will necessarily be
found in any particular operating system. Therefore, we will consider few
essential ones.
- Command processor and user interface
- File management system
- Input/output control system
- Process management
- Memory management
2.3.1 Command Processor and User Interface
To the user, the most important and visible services provided by the OS is the user
interface and the capabilities that it provides to execute commands which may not
be a part of OS. Instead these systems consider the user interface as a separate shell that is Operating System
provided with the operating system and that interacts with the kernel to provide
the necessary-user command capabilities. In UNIX, three different shells, the C
shell, the Bourne shell, and the Korn shell are in common use, and many other
shells for UNIX are available. Each of these shells provides different command
structures and different capabilities.
Different types of user interface exist. The most common are the graphical user
interface, or GUI, and the command line interface. The graphical user interface
accepts commands primarily in the form of drop-down menus, mouse movements,
and mouse clicks. The command line interface relies on typed commands which
provide direct access to various methods within operating system such as File
system, I/O system, and network services. UNIX allows certain class of users
called superusers to use some kind of commands for changing the platform or
access rights.
Command languages extend the power and flexibilities of the operating system
and simplify use of the system for less sophisticated users.
2.3.2 File Management
The concept of a file is central to the effective use of a computer system. A file is
generally loosely defined as a collection of related information such as students
records employee database. It might contain graphical usage. A file may be
organized internally into records or it may simply be a stream of bytes. A file
constitutes a logical unit of storage, that is, logical to the person or program using
the file.
The file management system provides and maintains the mapping between a file
logical storage needs and the physical location where it is stored. Users and
programs simply access the files by the name, and the file management system
handles the details The file management system identifies and manipulates files
by the names provided by their users determines the physical requirements of the
file, allocate space for it, stores it in that space, and maintains the information
about the file so that it may be retrieved partially or in full, later. The file
management system keeps track of the available space on each device connected
to the system. The user and the user’s program need not be aware of the
underlying physical storage issues.
The file management system allows the retrieval and storage of files by name,
keeps track of the mappings, allocates and frees space, allows the mounting and
unmounting of file structures, and provides other functions required to maintain
the structures of the file system.
- Directory structures for each I/O device in the system and tools to access and move around these structures. The directory structure provisions are made to move easily from one structure to another.
- It also protects files and limit file access to authorized users.
2.3.3 Input/Output Services
Every operating system, large or small, provides input/output services for each
device in the system. The operating system includes I/O device driver programs
for each device installed on the system. These drivers provide services to the file
management system and are also available, through the API, to other programs for
their use. The I/O device drivers accept I/O requests and perform the actual data
transfers between the hardware and specified areas of memory.
Devices drivers for newly installed devices are added and integrated into the
operating systems. In Windows, this capability is known as plug-and-play.
2.3.4 Process Control Management
A process is an executing program. It is considered the standard unit of work
within a computer system. Every executing program is treated as a process. This
includes not only application programs, but the programs within the operating
system itself. The process concept considers the program, together with the
resources that are assigned to it, including memory, I/O devices, time for
execution, and the like. When admitted to the system, each program is assigned
memory space and the various resources that it initially requires to complete its
work. As the process executes, it may require additional resources, or it may
release resources that it no longer needs. The operating system performs various
functions with processes, including scheduling and memory management, by
providing the various services. Processes must often be synchronized, so that
processes sharing a common resource do not step on each other’s toes by altering
critical data or denying each other needed resources. Systems also provide
communication capability between different processes. Processes may cooperate
with each other by sending messages back and forth using intercrosses
messaging services.
In multitasking operating system. OS determines which job will be admitted to
the system and in what order. This process is called job scheduling. Many modern
systems further break the process down into smaller units called threads. A
thread is an individually executable part of a process. It shares memory and other
resources with all other threads in the same process, but can be scheduled to run
separately from other threads.
2.3.5 Memory Management
The purpose of the memory management system is to load programs into memory
in such a way as to give each program loaded the memory that it requires for
execution. The purpose of the memory management system is to load programs into memory
in such a way as to give each program loaded the memory that it requires for
execution.
The memory management system has three primary tasks. It attempts to perform
these tasks in a way that is fair and efficient to the programs that must be loaded
and executed.
1. It keeps track of which parts of the memory are currently being used and by
which process into memory together with the space being used and also keeps
track of available space.
2. It maintains one or more queues of programs waiting to be loaded into
memory as space becomes available, based on such program criteria as
priority and memory requirements.
3. When space is available, it allocates memory to the programs that are next to
be loaded. It also de-allocates a program’s memory space when it completes
execution. The de-allocated space is made available for other programs.
Check Your Progress 2
1. What are the important components of an OS?
………………………………………………………………………………….
………………………………………………………………………………….
………………………………………………………………………………….
2. What is job scheduling?
………………………………………………………………………………….
………………………………………………………………………………….
………………………………………………………………………………….
3. What is a thread?
………………………………………………………………………………….
………………………………………………………………………………….
…………………………………………………………………………………
0 Comments