You are on page 1of 25

Operating System-As

a Service Provider
PROF. HEMA G AIKWAD
Introduction
An Operating System supplies different kinds of services to both the users and to the
programs as well. It also provides application programs (that run within an Operating
system) an environment to execute it freely. It provides users the services run various
programs in a convenient manner.
Here is a list of common services offered by an almost all operating systems:
User Interface
Program Execution
File system manipulation
Input / Output Operations
Communication
Introduction
Here is a list of common services offered by an almost all operating systems:
Resource Allocation
Error Detection
Accounting
Security and protection
Application execution
Application execution services---
Program- It is a collection of Instructions that performs a specific task when executed by a
computer.
A process is basically a program in execution. The execution of a process must progress in a
sequential fashion. When we compare a program with a process, we can conclude that a
process is a dynamic instance of a computer program.

Process Life Cycle--When a process executes, it passes through different states. These stages
may differ in different operating systems, and the names of these states are also not
standardized.
In general, a process can have one of the following five states at a time.
Application execution services---
Start
This is the initial state when a process is first started/created.
Ready
The process is waiting to be assigned to a processor. Ready processes are waiting to
have the processor allocated to them by the operating system so that they can run.
Process may come into this state after Start state or while running it by but interrupted
by the scheduler to assign CPU to some other process.
Running
Once the process has been assigned to a processor by the OS scheduler, the process
state is set to running and the processor executes its instructions.
Application execution services---
Waiting
Process moves into the waiting state if it needs to wait for a resource, such as waiting
for user input, or waiting for a file to become available.
Terminated or Exit
Once the process finishes its execution, or it is terminated by the operating system, it is
moved to the terminated state where it waits to be removed from main memory.
Application execution services---
Process Life Cycle
Application execution services---
Process execution--A process is basically a program in execution. The execution of a
process must progress in a sequential fashion. To put it in simple terms, we write our
computer programs in a text file and when we execute this program, it becomes a
process which performs all the tasks mentioned in the program. Steps-Preprocessing,
Compiler/Assembler, Linker, Loader and Memory
Application execution services---

Linker
Linker is a computer program that links and merges various object files together in order
to make an executable file. All these files might have been compiled by separate
assemblers. The major task of a linker is to search and locate referenced
module/routines in a program and to determine the memory location where these codes
will be loaded, making the program instruction to have absolute references.
Application execution services---

Loader
Loader is a part of operating system and is responsible for loading executable files into
memory and execute them. It calculates the size of a program (instructions and data)
and creates memory space for it. It initializes various registers to initiate execution
Application execution services---
Dynamic Link Library (DLL) is Microsoft's implementation of the shared library concept. A DLL file
contains code and data that can be used by multiple programs at the same time, hence it promotes
code reuse and modularization. This brief tutorial provides an overview of Windows DLL along with
its usage. DLL files use languages like C or C++.
Reuse-In computer science and software engineering, reusability is the use of existing assets in
some form within the software product development process; these assets are products and
by-products of the software development life cycle and include code, software components, test
suites, designs and documentation.
Modularization-Modularization is a process that breaks down complex systems into small and
solvable parts. By dividing the product structure into modules, companies seek to optimize the way
they function and operate in terms of transforming their products in a more flexible and accurate way.
Application execution services---
Important DLL Files
Mentioned below are some important dll files which user should know for programming

COMDLG32.DLL − Controls the dialog boxes.
GDI32.DLL − Contains numerous functions for drawing graphics, displaying text, and
managing fonts.
KERNEL32.DLL − Contains hundreds of functions for the management of memory and
various processes.
USER32.DLL − Contains numerous user interface functions. Involved in the creation of
program windows and their interactions with each other
Application execution services---

Inter process communication is the mechanism provided by the operating system that
allows processes to communicate with each other. This communication could involve a
process letting another process know that some event has occurred or the transferring
of data from one process to another.
Process Communication
Input Output Services---
A magnetic disk is a storage device that uses a magnetization process to write, rewrite
and access data. It is covered with a magnetic coating and stores data in the form of
tracks, spots and sectors.
Input Output Services---

Spooling is an acronym for simultaneous peripheral operations on line. Spooling refers to putting
data of various I/O jobs in a buffer. This buffer is a special area in memory or hard disk which is
accessible to I/O devices.
Printer spooling enables you to send large document files or a series of them to a printer, without
needing to wait until the current task is finished. Think of it as a buffer or cache. It's a place that your
documents can “line up” and get ready to be printed after a previous printing task is completed.
Input Output Services---
Racing--A race condition is an undesirable situation that
occurs when a device or sy stem attempts to perform two
or more operations at the same time, but because of the
nature of the device or system, the operations must be
done in the proper sequence to be done correctly.
Input Output Services---
Device drivers—In computing, a device driver is a computer program that operates or
controls a particular type of device that is attached to a computer. ...
Drivers are hardware dependent and operating-system-specific. They usually provide
the interrupt handling required for any necessary asynchronous
time-dependent hardware interface.
Input Output Services---
External devices--Any peripheral device that is not housed inside the computer cabinet.
Monitors, keyboards, mice and printers are inherently external devices; however, drives,
network adapters and modems may also be external.
See external drive, external modem and USB adapter.
File Services
File- A file is a named collection of related information that is recorded on secondary
storage such as magnetic disks, magnetic tapes and optical disks. In general, a file is a
sequence of bits, bytes, lines or records whose meaning is defined by the files creator
and user.
File Structure
A File Structure should be according to a required format that the operating system can
understand.
A file has a certain defined structure according to its type.
A text file is a sequence of characters organized into lines.
File Services
A source file is a sequence of procedures and functions.
An object file is a sequence of bytes organized into blocks that are understandable by the
machine.
When operating system defines different file structures, it also contains the code to support
these file structure. UNIX, MS-DOS support minimum number of file structure.
File Access Mechanisms
File access mechanism refers to the manner in which the records of a file may be accessed.
There are several ways to access files −
Sequential access
Direct/Random access
Indexed sequential access
File Services
Sequential access
A sequential access is that in which the records are accessed in some sequence, i.e., the
information in the file is processed in order, one record after the other. This access
method is the most primitive one. Example: Compilers usually access files in this
fashion.
Direct/Random access
Random access file organization provides, accessing the records directly.
Each record has its own address on the file with by the help of which it can be directly
accessed for reading or writing.
The records need not be in any sequence within the file and they need not be in adjacent
locations on the storage medium.
File Services
Indexed sequential access
This mechanism is built up on base of sequential access.
An index is created for each file which contains pointers to various blocks.
Index is searched sequentially and its pointer is used to access the file directly.
File Services
File Sharing—

You might also like