2.Protection
2.Protection
Operating System Concepts – 7th Edition, Apr 11, 2005 14.2 Silberschatz, Galvin and Gagne ©2005
Objectives
Discuss the goals and principles of protection in a modern
computer system
Explain how protection domains combined with an access matrix
are used to specify the resources a process may access
Examine capability and language-based protection systems
Operating System Concepts – 7th Edition, Apr 11, 2005 14.3 Silberschatz, Galvin and Gagne ©2005
Goals of Protection
Operating system consists of a collection of objects, hardware or
software
Operating System Concepts – 7th Edition, Apr 11, 2005 14.4 Silberschatz, Galvin and Gagne ©2005
Principles of Protection
Operating System Concepts – 7th Edition, Apr 11, 2005 14.5 Silberschatz, Galvin and Gagne ©2005
Domain of protection
H/w objects (CPU, Memory, printers, disks ect.,) & S/w objects ( Files,
Programs, Semaphores ect.,).
Operating System Concepts – 7th Edition, Apr 11, 2005 14.6 Silberschatz, Galvin and Gagne ©2005
Domain Structure
To facilitate this scheme, a process operates within a Protection
Domain. (Specifies the resources the process may access).
The ability to execute an operation on an object is an Access
Rights.
Access-right = <object-name, rights-set>
where rights-set is a subset of all valid operations that can be
performed on the object.
Eg: Domain D has the access rights <File F, {read, write}>,
Then the process executing in that domain can perform read &
write operation on F.
Operating System Concepts – 7th Edition, Apr 11, 2005 14.7 Silberschatz, Galvin and Gagne ©2005
Domain Structure
Operating System Concepts – 7th Edition, Apr 11, 2005 14.8 Silberschatz, Galvin and Gagne ©2005
Access Matrix
View protection as a matrix (access matrix)
Operating System Concepts – 7th Edition, Apr 11, 2005 14.9 Silberschatz, Galvin and Gagne ©2005
Access Matrix
Operating System Concepts – 7th Edition, Apr 11, 2005 14.10 Silberschatz, Galvin and Gagne ©2005
Use of Access Matrix
Operating System Concepts – 7th Edition, Apr 11, 2005 14.11 Silberschatz, Galvin and Gagne ©2005
Use of Access Matrix (Cont.)
Access matrix design separates mechanism from policy.
Mechanism
Operating system provides access-matrix + rules.
It ensures that the matrix is only manipulated by authorized
agents and that rules are strictly enforced.
Policy
User dictates policy.
Who can access what object and in what mode.
Operating System Concepts – 7th Edition, Apr 11, 2005 14.12 Silberschatz, Galvin and Gagne ©2005
Implementation of Access Matrix
Each column = Access-control list for one object
Defines who can perform what operation.
Domain 1 = Read, Write
Domain 2 = Read
Domain 3 = Read
Each Row = Capability List (like a key)
For each domain, what operations allowed on what objects.
Object 1 – Read
Object 4 – Read, Write, Execute
Object 5 – Read, Write, Delete, Copy
Operating System Concepts – 7th Edition, Apr 11, 2005 14.13 Silberschatz, Galvin and Gagne ©2005
Access Matrix of Figure A With Domains as Objects
Figure B
Operating System Concepts – 7th Edition, Apr 11, 2005 14.14 Silberschatz, Galvin and Gagne ©2005
Access Matrix with Copy Rights
Operating System Concepts – 7th Edition, Apr 11, 2005 14.15 Silberschatz, Galvin and Gagne ©2005
Access Matrix With Owner Rights
Operating System Concepts – 7th Edition, Apr 11, 2005 14.16 Silberschatz, Galvin and Gagne ©2005
Modified Access Matrix of Figure B
Operating System Concepts – 7th Edition, Apr 11, 2005 14.17 Silberschatz, Galvin and Gagne ©2005
Crypto - Problems
Solution - ????
Operating System Concepts – 7th Edition, Apr 11, 2005 14.19 Silberschatz, Galvin and Gagne ©2005
Role-based Access Control in Solaris 10
Operating System Concepts – 7th Edition, Apr 11, 2005 14.20 Silberschatz, Galvin and Gagne ©2005
Revocation of Access Rights
Access List – Delete access rights from access list.
Simple
Immediate
Operating System Concepts – 7th Edition, Apr 11, 2005 14.21 Silberschatz, Galvin and Gagne ©2005
Capability-Based Systems
Hydra
Fixed set of access rights known to and interpreted by the
system.
Interpretation of user-defined rights performed solely by user's
program; system provides access protection for use of these
rights.
Operating System Concepts – 7th Edition, Apr 11, 2005 14.22 Silberschatz, Galvin and Gagne ©2005
Language-Based Protection
Specification of protection in a programming language allows the
high-level description of policies for the allocation and use of
resources.
Operating System Concepts – 7th Edition, Apr 11, 2005 14.23 Silberschatz, Galvin and Gagne ©2005
Protection in Java 2
Protection is handled by the Java Virtual Machine (JVM)
The protection domain indicates what operations the class can (and
cannot) perform.
Operating System Concepts – 7th Edition, Apr 11, 2005 14.24 Silberschatz, Galvin and Gagne ©2005
Stack Inspection
Operating System Concepts – 7th Edition, Apr 11, 2005 14.25 Silberschatz, Galvin and Gagne ©2005
End of Chapter 14