Access matrix workshop
Read, extend and implement an access matrix — with a quiz.
Module 5
Session 5.4
Lesson 2 of 2
Access matrix workshop
Read a matrix, apply copy and owner rights, then store it as lists.
| F1 | F2 | F3 | D1 | D2 | |
|---|---|---|---|---|---|
| D1 | owner, execute | write | switch | ||
| D2 | read*, owner | read*, write | |||
| D3 | execute | switch | control |
A process in D1 may switch to D2; one in D3 may switch to D1 (and, through D1, reach D2).
D2 holds read* on F2: it may copy read into another domain's F2 entry, e.g. give D3 read on F2.
D1 owns F1: it can add or remove any right in F1's column — e.g. give D2 write on F1.
D3 has control over D2: it can remove rights from D2's row, e.g. revoke D2's write on F3.
Column view — F3: [D1: write · D2: read*, write].
Row view — D2: [F2: read*, owner · F3: read*, write].
Quick check
Which domain can give D3 the right to read F2?
D2 holds read* (copy right) on F2 — and is also its owner.
Which implementation makes 'who can access F3?' easy to answer?
The access list is stored with the object.
A file descriptor returned by open() acts as a…
Holding it proves the right to read/write.