Você está na página 1de 19

UNIT-1 (OS)

Introduction to Operating System:-


An operating system acts as an intermediary between the user of a computer and computer
hardware. The purpose of an operating system is to provide an environment in which a user
can execute programs in a convenient and efficient manner.

A computer system has many resources (hardware and software), which may be require to
complete a task. The commonly required resources are input/output devices, memory, file
storage space, CPU etc. The operating system acts as a manager of the above resources and
allocates them to specific programs and users, whenever necessary to perform a particular task.
Therefore operating system is the resource manager i.e. it can manage the resource of a
computer system internally.

System Software:-

System software refers to the files and programs that make up your computer's operating
system. System files include libraries of functions, system services, drivers for printers and
other hardware, system preferences, and other configuration files. The programs that are part
of the system software include assemblers, compilers, file management tools, system utilites,
and debuggers.
The system software is installed on your computer when you install your operating system.
You can update the software by running programs such as "Windows Update" for Windows or
"Software Update" for Mac OS X. Unlike application programs, however, system software is
not meant to be run by the end user. For example, while you might use your Web browser every
day, you probably don't have much use for an assembler program (unless, of course, you are a
computer programmer).

Since system software runs at the most basic level of your computer, it is called "low-level"
software. It generates the user interface and allows the operating system to interact with the
hardware. Fortunately, you don't have to worry about what the system software is doing since
it just runs in the background. It's nice to think you are working at a "high-level" anyway.

Application Software:-

An application is any program, or group of programs, that is designed for the end user.
Applications software (also called end-user programs) include such things as database
programs, word processors, Web browsers and spreadsheets.

Figuratively speaking, applications sit on top of systems software because they are unable to
run without the operating system and system utilities
EXAPMLE OF OPERATING SYSTEM

Microsoft Disk operating system ( Ms DOS)


Windows ( 98, 2000, XP, vista)
Linux
Unix
Operating System Objectives:-

The objectives of OS are:

(1) To make the computer system convenient and easy to use for the user.

(2) To use the computer hardware in an efficient way.

(3) To execute user programs and make solving user problems easier.

Operating System Function:-

Following are some of important functions of an operating System.

 Memory Management
 Processor Management
 Device Management
 File Management
 Security
 Control over system performance
 Job accounting
 Error detecting aids
 Coordination between other software and users

Memory Management

Memory management refers to management of Primary Memory or Main Memory. Main


memory is a large array of words or bytes where each word or byte has its own address.

Main memory provides a fast storage that can be accessed directly by the CPU. For a program
to be executed, it must in the main memory. An Operating System does the following activities
for memory management −
 Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are
not in use.
 In multiprogramming, the OS decides which process will get memory when and how
much.
 Allocates the memory when a process requests it to do so.
 De-allocates the memory when a process no longer needs it or has been terminated.

Processor Management

In multiprogramming environment, the OS decides which process gets the processor when and
for how much time. This function is called process scheduling. An Operating System does the
following activities for processor management −

 Keeps tracks of processor and status of process. The program responsible for this task
is known as traffic controller.
 Allocates the processor (CPU) to a process.
 De-allocates processor when a process is no longer required.

Device Management

An Operating System manages device communication via their respective drivers. It does the
following activities for device management −

 Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller.
 Decides which process gets the device when and for how much time.
 Allocates the device in the efficient way.
 De-allocates devices.

File Management

A file system is normally organized into directories for easy navigation and usage. These
directories may contain files and other directions.
An Operating System does the following activities for file management −

 Keeps track of information, location, uses, status etc. The collective facilities are often
known as file system.
 Decides who gets the resources.
 Allocates the resources.
 De-allocates the resources.

Other Important Activities

Following are some of the important activities that an Operating System performs −

 Security − By means of password and similar other techniques, it prevents


unauthorized access to programs and data.
 Control over system performance − Recording delays between request for a service
and response from the system.
 Job accounting − Keeping track of time and resources used by various jobs and users.
 Error detecting aids − Production of dumps, traces, error messages, and other
debugging and error detecting aids.
 Coordination between other software’s and users − Coordination and assignment of
compilers, interpreters, assemblers and other software to the various users of the
computer systems.

OPERATING SYSTEM EVOLUTION:-

Computer software is roughly divided into two main categories - application software and
operating system software. Applications are programs used by people to carry out various tasks,
such as writing a letter, creating a financial spreadsheet, or querying a customer database.
Operating systems, on the other hand, manage the computer system on which these applications
run. Without an operating system, it would be impossible to run any of the application software
we use every day, or even to boot up the computer.

The early computers of the late 1940s had no operating system. Human operators scheduled
jobs for execution and supervised the use of the computer’s resources. Because these early
computers were very expensive, the main purpose of an operating system in these early days
was to make the hardware as efficient as possible. Now, computer hardware is relatively cheap
by comparison with the cost of the personnel required to operate it, so the purpose of the
operating system has evolved to encompass the task of making the user as efficient as possible.

Batch Operating Systems:-

The first computers used batch operating systems, in which the computer ran batches of jobs
without stop. Programs were punched into cards that were usually copied to tape for processing.
When the computer finished one job, it would immediately start the next one on the tape.

Professional operators, not the users, interacted with the machine. Users dropped jobs off, then
returned to pick up the results after their jobs had run. This was inconvenient for the users, but
the expensive computer was kept busy with a steady stream of jobs.

Time-Shared:-

In the 1960s, time-shared operating systems began replacing batch systems. Users interacted
directly with the computer via a printing terminal like the Western Electric Teletype Several
users shared the computer at the same time, and it spent a fraction of a second on each one's
job before moving on to the next. A fast computer could work on many user's jobs at the same
time, while creating the illusion that they were receiving its full attention.

Printing terminals required that programs had character or command-line user interfaces (CLI),
in which the user typed responses to prompts or typed commands. The interaction scrolled
down a roll of paper.
Printing terminals were later replaced by video terminals that could only display fixed size
characters. Some could be used to create forms on the screen, but many simply scrolled like a
"glass Teletype."

Altair 8800:-

Personal computers became affordable in the mid 1970s. The Altair 8800, shown here, was the
first commercially viable personal computer marketed to individuals. Beginning in January
1975, the Altair was sold to hobbyists in kit form. The Altair did not have an operating system,
since it had only toggle switches and light-emitting diodes for input and output.

people soon connected terminals and floppy disk drives to Altairs. In 1976, Digital Research
introduced the CP/M operating system for the Altair and computers like it. CP/M and later
DOS had CLIs that were similar to those of the time-shared operating systems, but the
computer was dedicated to a single user, not shared.

Bit-Mapped:-

As hardware prices fell, personal computers with bit-mapped displays that could control
individual pixels were developed. These made personal computer with graphical user interfaces
(GUIs) possible.

The first commercial success was the Apple Macintosh which was introduced in 1984. The
initial Macintosh pushed the state of the hardware art, and was restricted to a small,
monochrome display.
As hardware continued to evolve, larger, color Macs were developed and Microsoft introduced
Windows, their GUI operating system.

Macintosh Operating System:-

The Macintosh operating system was based on decades of research on graphically-oriented


personal computer operating systems and applications.

This photo of shows Ivan Sutherland's pioneering program Sketchpad in the early 1960s.
Sketchpad foreshadowed many of the characteristics of a modern GUI, but the hardware cost
millions of dollars and filled a room. After many generations of research projects on large
computers and improvement in hardware, the Macintosh became economically feasible.

Research prototypes like Sketchpad are still being developed at universities and in research
labs. They will form the basis of future products.

TYPES OF OPERATING SYSTEM:

Many different types of operating systems are involved till date. The operating systems are
improved in terms of their capabilities. The modern days operating systems allows multiple
user to carry out multiple tasks simultaneously. Based on their capabilities and the types of
application supported, the operating systems can be divided into following six major
categories.
 Batch processing operating systems
 Multi user operating systems
 Multitasking operating systems
 Real time operating systems
 Multi processors operating systems
 Embedded operating systems

Batch processing operating system

The batch processing operating system is capable of executing one job at a time. In batch
processing operating system the jobs are combined in form of batch and then these batches are
given to system as an input data. The job in batches are processed on first com first serve basis.
After execution of one job operating system fetches another job from input data. There is no
need of human interaction before fetching the next job after completion of any job.

Multi user operating system

The multi user operating system uses to use a system by multiple users. In other word multi
user operating system allows a number of users to work simultaneously on a single computer
system. These types of operating systems are specially designed for the multi user system.

Examples of multi user operating systems includes Unix, Linux, Windows 2000 and VM - 386.

Multitasking operating system

The multitasking operating system allow a user to give multitask at a same time on a single
computer system multitasking operating system are also known as multiprocessing operating
system and multiprogramming operating system. The first multitasking operating system is
created in 1960s. The number of tasks processed simultaneously by this operating system is
depending upon speed of CPU, the capacity of memory and size of programs.

Examples of multitasking operating systems are Linux, Unix, windows 2000, windows XP,
windows 10.

Real time operating system

The real time operating system is similar as multitasking operating system. However, these
operating systems are specially designed to handle real time applications. Real time
applications are those applications which have to execute within a specific period of time.
Therefore, time is major constraint for these applications. The different examples of real time
applications are robots, machine learning etc.

There are mainly two types of real time operating system. Hard real time operating system and
soft real time operating system.

Examples of real time operating systems are MTOS, Lynx, RTX etc.

Multiprocessor operating system

The multiprocessor operating system allows the computer system to use more than one CPU
in a single system for executing more than one or multiple processes at a time. A computer
system having multiple CPU process faster than a system which contains a single CPU.

Examples of multiprocessor operating systems are Linux, Unix, windows 2000 etc.

Embedded operating system

The embedded operating system is similar to real time operating system. This operating system
is installed on an embedded computer system which is primary used to perform computational
tasks in electronic devices.

Examples of embedded operating systems are palm operating system, windows CE.

OPERATING SYSTEM PROTECTION:-

 Protection refers to a mechanism for controlling the access of programs, processes, or


users to the resources defined by a computer system.
 Protection ensures that the resources of the computer are used in a consistent way.
 It ensure that each object accessed correctly and only by those processes that are
allowed to do so.

Goals of Protection

 As computer systems have become more sophisticated and pervasive in their


applications, the need to protect their integrity has also grown.
 We need to provide protection for several reasons. The most obvious is the need to
prevent the mischievous, intentional violation of an access restriction by user.
 An unprotected resource cannot defend against use (or misuse) by an unauthorized or
incompetent user. A protection-oriented system provides means to distinguish between
authorized and unauthorized usage.
 The role of protection in a computer system is to provide a mechanism for the
enforcement of the policies governing resource use. These policies can be established
in a variety of ways. Some are fixed in the design of the system, while others are
formulated by the management of a system. Still others are defined by the individual
users to protect their own files and programs. A protection system must have the
flexibility to enforce a variety of policies.

Security refers to providing a protection system to computer system resources such as CPU,
memory, disk, software programs and most importantly data/information stored in the
computer system. If a computer program is run by an unauthorized user, then he/she may cause
severe damage to computer or data stored in it. So a computer system must be protected against
unauthorized access, malicious access to system memory, viruses, worms etc.

 Authentication
 One Time passwords
 Program Threats
 System Threats
 Computer Security Classifications

Authentication:-

Authentication refers to identifying each user of the system and associating the executing
programs with those users. It is the responsibility of the Operating System to create a protection
system which ensures that a user who is running a particular program is authentic. Operating
Systems generally identifies/authenticates users using following three ways −

 Username / Password − User need to enter a registered username and password with
Operating system to login into the system.
 User card/key − User need to punch card in card slot, or enter key generated by key
generator in option provided by operating system to login into the system.
 User attribute - fingerprint/ eye retina pattern/ signature − User need to pass
his/her attribute via designated input device used by operating system to login into the
system.
One Time passwords:-

One-time passwords provide additional security along with normal authentication. In One-
Time Password system, a unique password is required every time user tries to login into the
system. Once a one-time password is used, then it cannot be used again. One-time password
are implemented in various ways.

 Random numbers − Users are provided cards having numbers printed along with
corresponding alphabets. System asks for numbers corresponding to few alphabets
randomly chosen.
 Secret key − User are provided a hardware device which can create a secret id mapped
with user id. System asks for such secret id which is to be generated every time prior to
login.
 Network password − Some commercial applications send one-time passwords to user
on registered mobile/ email which is required to be entered prior to login.

Program Threats:-

Operating system's processes and kernel do the designated task as instructed. If a user program
made these process do malicious tasks, then it is known as Program Threats. One of the
common example of program threat is a program installed in a computer which can store and
send user credentials via network to some hacker. Following is the list of some well-known
program threats.

 Trojan Horse − Such program traps user login credentials and stores them to send to
malicious user who can later on login to computer and can access system resources.
 Trap Door − If a program which is designed to work as required, have a security hole
in its code and perform illegal action without knowledge of user then it is called to have
a trap door.
 Logic Bomb − Logic bomb is a situation when a program misbehaves only when
certain conditions met otherwise it works as a genuine program. It is harder to detect.
 Virus − Virus as name suggest can replicate themselves on computer system. They are
highly dangerous and can modify/delete user files, crash systems. A virus is generally
a small code embedded in a program. As user accesses the program, the virus starts
getting embedded in other files/ programs and can make system unusable for user.
System Threats:-

System threats refers to misuse of system services and network connections to put user in
trouble. System threats can be used to launch program threats on a complete network called as
program attack. System threats creates such an environment that operating system resources/
user files are misused. Following is the list of some well-known system threats.

 Worm − Worm is a process which can choked down a system performance by using
system resources to extreme levels. A Worm process generates its multiple copies
where each copy uses system resources, prevents all other processes to get required
resources. Worms processes can even shut down an entire network.
 Port Scanning − Port scanning is a mechanism or means by which a hacker can detects
system vulnerabilities to make an attack on the system.
 Denial of Service − Denial of service attacks normally prevents user to make legitimate
use of the system. For example, a user may not be able to use internet if denial of service
attacks browser's content settings.

Computer Security Classifications:-

As per the U.S. Department of Defence Trusted Computer System's Evaluation Criteria there
are four security classifications in computer systems: A, B, C, and D. This is widely used
specifications to determine and model the security of systems and of security solutions.
Following is the brief description of each classification.

Type A

Highest Level. Uses formal design specifications and verification techniques. Grants a high
degree of assurance of process security.

Type B

Provides mandatory protection system. Have all the properties of a class C2 system. Attaches
a sensitivity label to each object. It is of three types.

 B1 − Maintains the security label of each object in the system. Label is used for making
decisions to access control.
 B2 − Extends the sensitivity labels to each system resource, such as storage objects,
supports covert channels and auditing of events.
 B3 − Allows creating lists or user groups for access-control to grant access or revoke
access to a given named object.

Type C

Provides protection and user accountability using audit capabilities. It is of two types.

 C1 − Incorporates controls so that users can protect their private information and keep
other users from accidentally reading / deleting their data. UNIX versions are mostly
Cl class.
 C2 − Adds an individual-level access control to the capabilities of a Cl level system.

Type D

Lowest level. Minimum protection. MS-DOS, Window 3.1 fall in this category.

OPERATING SYSTEM STRUCTURE:-

An operating system is a construct that allows the user application programs to interact with
the system hardware. Since the operating system is such a complex structure, it should be
created with utmost care so it can be used and modified easily. An easy way to do this is to
create the operating system in parts. Each of these parts should be well defined with clear
inputs, outputs and functions.

Simple Structure

There are many operating systems that have a rather simple structure. These started as small
systems and rapidly expanded much further than their scope. A common example of this is
MS-DOS. It was designed simply for a niche amount for people. There was no indication that
it would become so popular.

An image to illustrate the structure of MS-DOS is as follows:-


It is better that operating systems have a modular structure, unlike MS-DOS. That would lead
to greater control over the computer system and its various applications. The modular structure
would also allow the programmers to hide information as required and implement internal
routines as they see fit without changing the outer specifications.

Layered Structure

One way to achieve modularity in the operating system is the layered approach. In this, the
bottom layer is the hardware and the topmost layer is the user interface.

An image demonstrating the layered approach is as follows:

As seen from the image, each upper layer is built on the bottom layer. All the layers hide some
structures, operations etc from their upper layers.

One problem with the layered structure is that each layer needs to be carefully defined. This is
necessary because the upper layers can only use the functionalities of the layers below them.

Operating System Components:-

A system component is a process, program, utility, or another part of a computer's operating


system that helps to manage different areas of the computer. Not to be confused with a
hardware component, a system component is similar to a computer program, but is not
something an end-user directly interact with when using a computer.
There are multiple system components at work in a computer operating system, each serving a
specific function. Together, they allow the operating system and computer to function correctly
and efficiently.

 Process management
 Memory management
 File management
 Secondary storage management
 Access management
 System resource management

Process management

The process management component is tasked with managing the many processes that are
running on the operating system. Software programs each have one or more processes
associated with them when they are running. For example, when you use an Internet browser,
there is a process running for that browser program. The operating system also has many
processes associated with it, each performing a different function. All of these processes are
managed by process management, which keeps processes in order, running efficiently, using
memory allocated to them, and shutting them down when necessary.

Memory management

The memory management component, also sometimes called main memory management or
primary memory management, handles primary memory, or RAM. When programs are
running, including the operating system, those programs store data in RAM for quick access at
any time. Memory management monitors and manages the memory and knows which blocks
of memory are in use, which programs are using memory, and which memory blocks are
available to be used.

File management

The file management component manages just about anything to do with computer files. When
a file is created, file management is involved in the creation of the file, including where it is
stored on a storage device. When a file is modified, file management helps with the
modification of the file. If a file is deleted, file management is there to help with deleting the
file and freeing up the space for another file to be stored there at a later time.
File management also handles tasks related to the creation, modification, and deletion of
folders, or directories, on a storage device.

Secondary storage management

The secondary storage management component works with storage devices, like a hard drive,
USB flash drive, DVD drive, or floppy disk drive. While the file management component takes
care of the actual files on the storage device, the secondary storage management component
manages the storage device itself. It manages the available space, or free space, on the storage
device and allocating space for new files to be stored there.

Requests for data on a storage device are handled by secondary storage management as well.
For example, when a user double-clicks on a file to open it, secondary storage management
receives that request and helps in the retrieval of that file from the storage device.

Access management

The access management component is tasked with managing user access to data on a computer.
User accounts provide each user with specific access to software, files, and functionality in an
operating system. The ability to install a software program is controlled by access management.
Access to view, edit, and delete a file is managed by access management. Changing settings in
the operating system is managed by access management. How a user interacts with the
computer operating system and uses software is handled by access management, in relation to
the permissions they have been granted through user accounts.

System resource management

The system resource management component is responsible for managing the allocation of
system resources, like memory and CPU time. When programs are running, they require the
use of memory and CPU time to function properly. System resource management determines
how much memory and CPU time that program is allowed to use at any given time.

Managing system resource usage is a big responsibility, as it can directly impact the
performance of the computer. If too many resources are allocated to one process, other
programs and processes may become slow or unresponsive. If the operating system does not
have enough resources allocated to it, the entire computer can run slow or stop working
altogether. System resource management ensures system resources are allocated properly.
Operating System Services:-

An Operating System provides services to both the users and to the programs.

 It provides programs an environment to execute.


 It provides users the services to execute the programs in a convenient manner.

Following are a few common services provided by an operating system −

 Program execution
 I/O operations
 File System manipulation
 Communication
 Error Detection
 Resource Allocation
 Protection

Program execution

Operating systems handle many kinds of activities from user programs to system programs like
printer spooler, name servers, file server, etc. Each of these activities is encapsulated as a
process.

A process includes the complete execution context (code to execute, data to manipulate,
registers, OS resources in use). Following are the major activities of an operating system with
respect to program management −

 Loads a program into memory.


 Executes the program.
 Handles program's execution.
 Provides a mechanism for process synchronization.
 Provides a mechanism for process communication.
 Provides a mechanism for deadlock handling.

I/O Operation

An I/O subsystem comprises of I/O devices and their corresponding driver software. Drivers
hide the peculiarities of specific hardware devices from the users.
An Operating System manages the communication between user and device drivers.

 I/O operation means read or write operation with any file or any specific I/O device.
 Operating system provides the access to the required I/O device when required.

Você também pode gostar