Bird
Raised Fist0
Operating Systemsknowledge~10 mins

Access control matrix in Operating Systems - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the Access Control Matrix as a table of subjects and objects.

Operating Systems
access_control_matrix = {"subjects": ["Alice", "Bob"], "objects": ["File1", [1]]}
Drag options to blanks, or click blank then click option'
A"Folder1"
B"File3"
C"File2"
D"Printer1"
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a subject name instead of an object name.
Using a resource name that is not typical for access control.
2fill in blank
medium

Complete the code to assign read permission to Alice for File1.

Operating Systems
access_control_matrix["permissions"] = {"Alice": {"File1": [1]
Drag options to blanks, or click blank then click option'
A"write"
B"read"
C"execute"
D"delete"
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing read with write or execute permissions.
Using a permission that is not typical for file access.
3fill in blank
hard

Fix the error in the code to correctly represent the Access Control Matrix entry for Bob's execute permission on File2.

Operating Systems
access_control_matrix["permissions"]["Bob"]["File2"] = [1]
Drag options to blanks, or click blank then click option'
Aexecute
B"Execute"
C'execute'
D"execute"
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes around the permission string.
Using incorrect capitalization.
4fill in blank
hard

Fill both blanks to create a dictionary entry for Carol with write permission on Folder1.

Operating Systems
access_control_matrix["permissions"][[1]] = { [2]: "write" }
Drag options to blanks, or click blank then click option'
A"Carol"
B"Alice"
C"Folder1"
D"File1"
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping subject and object names.
Using a subject or object not defined in the matrix.
5fill in blank
hard

Fill all three blanks to define a new entry where Dave has read and execute permissions on Printer1.

Operating Systems
access_control_matrix["permissions"][[1]] = { [2]: ["read", [3]] }
Drag options to blanks, or click blank then click option'
A"Dave"
B"Printer1"
C"execute"
D"File3"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect object or subject names.
Not including both permissions correctly.

Practice

(1/5)
1. What does an access control matrix primarily represent in operating systems?
easy
A. Which users have what permissions on which resources
B. The order in which processes are executed
C. The memory allocation for each program
D. The list of installed software on a system

Solution

  1. Step 1: Understand the purpose of access control matrix

    An access control matrix is a table that shows permissions users have on resources.
  2. Step 2: Match the description to the options

    Only Which users have what permissions on which resources correctly describes permissions of users on resources.
  3. Final Answer:

    Which users have what permissions on which resources -> Option A
  4. Quick Check:

    Access control matrix = user permissions on resources [OK]
Hint: Think: Who can do what on which resource? [OK]
Common Mistakes:
  • Confusing access control matrix with process scheduling
  • Thinking it shows memory or software lists
  • Mixing permissions with system hardware details
2. Which of the following correctly represents a row in an access control matrix?
easy
A. Process1 -> Memory address 0x1000
B. User1: read, write
C. File size = 1024 bytes
D. CPU usage = 50%

Solution

  1. Step 1: Identify what a row in access control matrix shows

    A row lists a user and their permissions on various resources.
  2. Step 2: Check which option matches this format

    User1: read, write shows a user with permissions, matching the row concept.
  3. Final Answer:

    User1: read, write -> Option B
  4. Quick Check:

    Row = user permissions list [OK]
Hint: Rows list users and their permissions [OK]
Common Mistakes:
  • Confusing resource details with user permissions
  • Mixing process or CPU info with access control
  • Choosing options unrelated to permissions
3. Given the access control matrix below:

Users\Files | File1 | File2
---------|--------|-------
Alice | read | write
Bob | write | execute


What permission does Bob have on File2?
medium
A. execute
B. write
C. read
D. no permission

Solution

  1. Step 1: Locate Bob's row in the matrix

    Bob's permissions are listed in the second row.
  2. Step 2: Find the permission under File2 column for Bob

    Bob has 'execute' permission on File2.
  3. Final Answer:

    execute -> Option A
  4. Quick Check:

    Bob on File2 = execute [OK]
Hint: Find user row, then resource column [OK]
Common Mistakes:
  • Mixing up rows and columns
  • Choosing Alice's permissions instead of Bob's
  • Assuming default permissions if not listed
4. Identify the error in this access control matrix snippet:

Users\Resources | FileA | FileB
--------------|--------|-------
Carol | read | readwriteexecute


What is wrong with this matrix?
medium
A. The matrix must list users vertically, not horizontally
B. Carol cannot have read permission
C. Multiple permissions should be separated, not combined in one cell
D. FileB should not have any permissions listed

Solution

  1. Step 1: Check how permissions are listed in each cell

    Permissions should be clearly separated, usually by commas or listed distinctly.
  2. Step 2: Identify if combining multiple permissions in one cell is acceptable

    Combining multiple permissions in one cell without clear separation can cause confusion.
  3. Final Answer:

    Multiple permissions should be separated, not combined in one cell -> Option C
  4. Quick Check:

    Permissions must be clearly separated [OK]
Hint: Permissions must be clearly separated in matrix cells [OK]
Common Mistakes:
  • Thinking users must be listed horizontally
  • Assuming permissions can't be combined at all
  • Ignoring formatting clarity in matrix
5. You have an access control matrix with users and resources. If you want to quickly check which users can write to a resource named Report.doc, what is the best approach?
hard
A. Look across the row for Report.doc and note users with write permission
B. Check the entire matrix for any write permission
C. Check the diagonal cells only for write permission
D. Look down the column for Report.doc and note users with write permission

Solution

  1. Step 1: Understand matrix layout

    Rows represent users, columns represent resources.
  2. Step 2: To find users who can write to Report.doc, check the column for that resource

    Looking down the column shows which users have write permission.
  3. Final Answer:

    Look down the column for Report.doc and note users with write permission -> Option D
  4. Quick Check:

    Users with write on resource = column check [OK]
Hint: Check down the resource column for permissions [OK]
Common Mistakes:
  • Looking across a resource row instead of column
  • Checking only diagonal cells
  • Scanning entire matrix unnecessarily
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard