R19 CSE - OS - Unit V
R19 CSE - OS - Unit V
Need of Protection:
To prevent the access of unauthorized users and
To ensure that each active programs or processes in the system uses resources
only as the stated policy,
To improve reliability by detecting latent errors.
Role of Protection:
The role of protection is to provide a mechanism that implement policies which
defines the uses of resources in the computer system. Some policies are defined at
the time of design of the system, some are designed by management of the system
and some are defined by the users of the system to protect their own files and
programs.
Every application has different policies for use of the resources and they may
change over time so protection of the system is not only concern of the designer of
the operating system. Application programmer should also design the protection
mechanism to protect their system against misuse.
Policy is different from mechanism. Mechanisms determine how something will be
done and policies determine what will be done. Policies are changed over time
and place to place. Separation of mechanism and policy is important for the
flexibility of the system
1. Goals of protection
Operating system consists of a collection of objects, hardware or software. Each
object has a unique name and can be accessed through a well-defined set of
operations.
Protection problem - ensure that each object is accessed correctly and only by those
processes that are allowed to do so.
Obviously to prevent malicious misuse of the system by users or programs.
To ensure that each shared resource is used only in accordance with system policies,
which may be set either by system designers or by system administrators.
To ensure that errant programs cause the minimal amount of damage possible.
Note that protection systems only provide the mechanisms for enforcing policies
and ensuring reliable systems. It is up to administrators and users to implement
those mechanisms effectively.
2. Principles and domain of protection
Programs, users and systems should be given just enough privileges to perform
their tasks
The principle of least privilege dictates that programs, users, and systems be
given just enough privileges to perform their tasks.
This ensures that failures do the least amount of harm and allow the least of
harm to be done.
For example, if a program needs special privileges to perform a task, it is better
to make it a SGID program with group ownership of "network" or "backup" or
some other pseudo group, rather than SUID with root ownership. This limits the
amount of damage that can occur if something goes wrong.
Typically each user is given their own account, and has only enough privilege to
modify their own files.
The root account should not be used for normal day to day activities - The
System Administrator should also have an ordinary account, and reserve use of
the root account for only those tasks which need the root privileges
Domain Structure
A computer can be viewed as a collection of processes and objects ( both HW &
SW ).
The need to know principle states that a process should only have access to
those objects it needs to accomplish its task, and furthermore only in the modes
for which it needs access and only during the time frame when it needs access.
The modes available for a particular object may depend upon its type.
Access-right = <object-name, rights-set>
where rights-set is a subset of all valid operations that can be performed on the
object.
Domain = set of access-rights
System consists of 2 domains:
User
Supervisor UNIX
Domain = user-id
Domain switch accomplished via file system
Each file has associated with it a domain bit (setuid bit)
When file is executed and setuid = on, then user-id is set to owner of the file being
executed. When execution completes user-id is reset
Domain Implementation (MULTICS)
Let Di and Dj be any two domain rings
If j < I Þ Di Í Dj
Rings are numbered from 0 to 7, with outer rings having a subset of the privileges
of the inner rings.
Each file is a memory segment, and each segment description includes an entry
that indicates the ring number associated with that segment, as well as read, write,
and execute privileges.
Each process runs in a ring, according to the current-ring-number, a counter
associated with each process.
A process operating in one ring can only access segments associated with higher
( farther out ) rings, and then only according to the access bits. Processes cannot
access segments associated with lower rings.
Domain switching is achieved by a process in one ring calling upon a process
operating in a lower ring, which is controlled by several factors stored with each
segment descriptor:
An access bracket, defined by integers b1 <= b2.
A limit b3 > b2
A list of gates, identifying the entry points at which the segments may be
called.
If a process operating in ring i calls a segment whose bracket is such that
b1 <= i <= b2, then the call succeeds and the process remains in ring i.
Otherwise a trap to the OS occurs, and is handled as follows:
If i < b1, then the call is allowed, because we are transferring to a
procedure with fewer privileges. However if any of the parameters being
passed are of segments below b1, then they must be copied to an area
accessible by the called procedure.
If i > b2, then the call is allowed only if i <= b3 and the call is directed to
one of the entries on the list of gates.
Overall this approach is more complex and less efficient than other protection
schemes.
3. Access matrix
The model of protection that we have been discussing can be viewed as an
access matrix, in which columns represent different system resources and
rows represent different protection domains. Entries within the matrix
indicate what access that domain has to that resource.
View protection as a matrix (access matrix)
Rows represent domains
Columns represent objects
Access (i, j) is the set of operations that a process executing in Domaini can
invoke on Object j
Use of Access Matrix
If a process in Domain Di tries to do “op” on object Oj, then “op” must be in the
access matrix Can be expanded to dynamic protection Operations to add, delete
access rights
Special access rights:
Owner of Oi copy op from Oi to Oj
Control – Di can modify Dj access rights
Transfer – switch from domain Di to Dj
ACCESS MATRIX DESIGN SEPARATES MECHANISM FROM POLICY
Mechanism
There are many common threats to modern systems. Only a few are discussed
here.
#include
#define BUFFER_SIZE 256
2.Windows XP
Windows Operating System
The operating system window is the extension of the disk operating system.
It is the most popular and simplest operating system; it can be used by any person
who can read and understand basic English, as it does not require any special
training.
However, the Windows Operating System requires DOS to run the various
application programs initially. Because of this reason, DOS should be installed into
the memory and then window can be executed.
Elements of Windows OS
Following are the significant element of Windows Operating System (WOS) −
Graphical User Interface
Icons (pictures, documents, application, program icons, etc.)
Taskbar
Start button
Windows explorer
Mouse button
Hardware compatibility
Software compatibility
Help, etc.
versions of Windows Operating System
Following are the different versions of Windows Operating System −
Windows XP 2001
Windows XP
Windows XP was the next major version of Windows NT. It was first released on 25
October 2001. It was introduced to add security and networking features.
It was the first Windows version that was marketed in two main editions: the "Home"
edition and the "Professional" edition.
The "Home" edition was targeted towards consumers for personal computer use,
while the "Professional" edition was targeted towards business environments and
power users. It included the "Media Center" edition later, which was designed for
home theater PCs and provided support for DVD playback, TV tuner cards, DVR
functionality, and remote controls, etc.
Windows XP was one of the most successful versions of Windows.