13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

198 File Structures Chapter 6Whenever a process attempts to access a file, the file manager can refer to theaccess matrix (however it is stored) to validate the access. In keeping with the CachePrinciple, the file manager might check for privileges only when the file is opened. Wesaw in Chapter 5 that a process indicates its intent when it opens a device. Similarly,when a process uses the Open service call to access a file, it indicates the sort of access itintends. At this point the file manager checks that the access meets the restrictions in theaccess matrix. After the file is opened, the only check that needs to be made on everyaccess is that the access matches the declared intent. One effect of this design is thatmodifications to the access matrix while files are open will not affect processes thatalready have the file open.2.2 Capability listsIf we partition the access matrix into separate rows, we have all the information for onesubject together. We might store that information in a data structure associated with thesubject. This sort of data structure is called a capability list, because it lists all the capabilitiesthat a subject has. Capability lists associated with the access matrix of Figure 6.4are pictured in Figure 6.5. For our file example, we might keep a capability list of all thefiles that any user may access in a special ‘‘capability file’’ in the user’s logon directory.When a process tries to open a file, the file manager can check the appropriate capabilitylist and make sure that the file is listed with the necessary privilege.fred/mailnewsletters/love.texteditorprog.textfredRWDREmuraliARERramonARRWEcheriARRDElottaAREmottlREmardukRWDRWDRWDRWEDRWDkealohaARERWDFigure 6.5 Capability lists from Figure 6.4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!