The processes in an operating system must be protected from one another’s


Implementation of the Access Matrix



tải về 252.86 Kb.
Chế độ xem pdf
trang15/34
Chuyển đổi dữ liệu13.12.2022
Kích252.86 Kb.
#53970
1   ...   11   12   13   14   15   16   17   18   ...   34
Abraham Silberschatz-Operating System Concepts (9th,2012.12)-trang-649-679

14.5
Implementation of the Access Matrix
637
D
i
, we search the access list for object O
j
, looking for an entry <D
i
R
k
>
with
∈ R
k
. If the entry is found, we allow the operation; if it is not, we check the
default set. If is in the default set, we allow the access. Otherwise, access is
denied, and an exception condition occurs. For efficiency, we may check the
default set first and then search the access list.
14.5.3 Capability Lists for Domains
Rather than associating the columns of the access matrix with the objects as
access lists, we can associate each row with its domain. A
capability list
for
a domain is a list of objects together with the operations allowed on those
objects. An object is often represented by its physical name or address, called
a
capability
. To execute operation on object O
j
, the process executes the
operation M, specifying the capability (or pointer) for object O
j
as a parameter.
Simple
possession
of the capability means that access is allowed.
The capability list is associated with a domain, but it is never directly
accessible to a process executing in that domain. Rather, the capability list
is itself a protected object, maintained by the operating system and accessed
by the user only indirectly. Capability-based protection relies on the fact that
the capabilities are never allowed to migrate into any address space directly
accessible by a user process (where they could be modified). If all capabilities
are secure, the object they protect is also secure against unauthorized access.
Capabilities were originally proposed as a kind of secure pointer, to
meet the need for resource protection that was foreseen as multiprogrammed
computer systems came of age. The idea of an inherently protected pointer
provides a foundation for protection that can be extended up to the application
level.
To provide inherent protection, we must distinguish capabilities from other
kinds of objects, and they must be interpreted by an abstract machine on which
higher-level programs run. Capabilities are usually distinguished from other
data in one of two ways:

Each object has a
tag
to denote whether it is a capability or accessible
data. The tags themselves must not be directly accessible by an application
program. Hardware or firmware support may be used to enforce this
restriction. Although only one bit is necessary to distinguish between
capabilities and other objects, more bits are often used. This extension
allows all objects to be tagged with their types by the hardware. Thus,
the hardware can distinguish integers, floating-point numbers, pointers,
Booleans, characters, instructions, capabilities, and uninitialized values by
their tags.

Alternatively, the address space associated with a program can be split into
two parts. One part is accessible to the program and contains the program’s
normal data and instructions. The other part, containing the capability list,
is accessible only by the operating system. A segmented memory space
(Section 8.4) is useful to support this approach.
Several capability-based protection systems have been developed; we describe
them briefly in Section 14.8. The Mach operating system also uses a version of
capability-based protection; it is described in Appendix B.



tải về 252.86 Kb.

Chia sẻ với bạn bè của bạn:
1   ...   11   12   13   14   15   16   17   18   ...   34




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương