🎓 BookMCQ
← Back to 14. Protection

📝 Hydra is an example of Capability Based Systems (22 MCQs)

Hydra's Capability Based Protection Architecture

Hydra was an experimental capability-based operating system designed to support flexible protection in a highly structured computing environment. It represented authority through capabilities that identified protected objects and the operations permitted on them. Kernel-managed protection mechanisms allowed applications and system components to share resources while restricting access to explicitly authorised operations.

Motivation for Fine Grained Capability Protection

Conventional protection systems can struggle to express complex sharing relationships among independently developed components. Hydra aimed to provide flexible control over objects without relying solely on broad user or group permissions. Capabilities allowed authority to be divided into precise rights and passed between components under controlled rules, supporting modular system construction.

Protected Objects, Capabilities and Operations

Hydra treated system resources and abstractions as protected objects accessed through capabilities. A capability specified the authority available for an object, while kernel mechanisms protected capability integrity and validated operations. Procedures could receive only the capabilities they needed. This approach supported controlled invocation and prevented ordinary components from fabricating arbitrary authority.

Example of Delegating a Restricted File Operation

Suppose a component needs to read a protected data object but must not modify it. A trusted component can provide a capability limited to the permitted read operation. The receiving component can invoke that operation without receiving write authority or unrestricted access to the object's internal representation.

Modular Security and Capability Management Costs

Hydra demonstrated how fine-grained capabilities can support modularity, controlled delegation, and protection of user-defined abstractions. This flexibility requires careful capability management and secure kernel support. The system is historically significant as a research design rather than a standard interface found in contemporary general-purpose operating systems, and its principles do not remove every application-level security risk.

Misconceptions About the Hydra System

'Hydra relies only on UNIX style permission bits' is incorrect because its design is capability centred. 'A capability grants unrestricted access to an object' is false because capabilities specify limited authority. 'Hydra proves all modern operating systems use its architecture' is inaccurate; it is an influential experimental system, not a universal implementation model.

Exam Focus: Hydra Capabilities and Protected Objects

Focus on the relationship between capabilities, protected objects, and permitted operations. Questions may ask how Hydra supports least privilege or controlled delegation between components. Explain why capability integrity matters and distinguish Hydra's research architecture from conventional access control based mainly on file ownership and permission bits.

Key Terms of Hydra Protection

  • Hydra - Experimental capability-based operating system.
  • Capability - Protected reference carrying specific authority.
  • Protected object - Resource accessed through controlled operations.
  • Delegation - Transfer of limited authority.
  • Least privilege - Restriction to necessary permissions.
4
Easy
11
Medium
7
Hard

📝 All Hydra is an example of Capability Based Systems MCQs

Q1. What is a lock in the lock–key mechanism?

A.A unique bit pattern attached to an object ✅
B.A secret password stored by the OS
C.A hardware token
D.A network address
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A lock is defined as a unique bit pattern that is stored with each object. When a process wants to use the object, the system checks whether the domain's key list contains a matching pattern. Option B describes a password, which is not part of the lock‑key scheme. Option C refers to a hardware token, unrelated to the bit‑pattern design. Option D mentions a network address, which has no role in capability protection. Therefore the correct answer is A.

Q2. What is a key in the lock–key mechanism?

A.A unique bit pattern held by a domain ✅
B.A cryptographic certificate
C.A file descriptor
D.An interrupt vector
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A key is a unique bit pattern that the operating system assigns to a domain. The domain can present this key when accessing objects whose locks contain the same pattern. Options B, C, and D describe unrelated concepts such as certificates, file descriptors, and interrupt vectors, none of which participate in the lock‑key protection model. Hence the correct answer is A.

Q3. Why must the operating system manage the list of keys for each domain?

A.To enforce security policies without user interference ✅
B.Because users need to edit keys
C.To speed up network routing
D.To allocate memory
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The OS controls key lists to guarantee that only authorized domains possess matching keys, preventing users from granting themselves extra privileges. Options B, C, and D describe purposes that are unrelated to security enforcement. By centralizing key management, the OS maintains the integrity of the protection mechanism, making A the correct choice.

Q4. How does the lock–key mechanism compare to pure capability lists regarding revocation of access rights?

A.It revokes rights instantly by removing matching keys ✅
B.It cannot revoke rights once granted
C.Revocation requires scanning all objects for the lock
D.Revocation is handled by the hardware
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: In a lock‑key system, taking a key away from a domain immediately blocks any future access to objects whose locks match that key, providing fast revocation. Pure capability lists often need to locate and invalidate each distributed capability, which can be slower. Options B, C, and D mischaracterize the revocation process or attribute it to hardware. Therefore A correctly describes the advantage.

Q5. What advantage does the lock–key scheme provide over access lists concerning search cost during an access check?

A.It requires a constant‑time key comparison ✅
B.It needs a linear search through all objects
C.It uses a binary tree lookup
D.It depends on network latency
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When a process presents its key list, the OS merely checks whether any key matches an object's lock, which is a constant‑time operation. Access lists, by contrast, often require scanning potentially long lists to find a matching domain, leading to higher computational cost. Options B, C, and D describe mechanisms that are not characteristic of the lock‑key approach. Hence A is correct.

Q6. In what way does the lock–key mechanism localize access information for a process?

A.The process carries its own key list
B.The process stores all object locks ✅
C.The process queries a remote server each time
D.The process has no information about access
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Each domain’s key list is maintained by the OS and effectively travels with the process, so the process knows which objects it may access without consulting a global structure. Storing all object locks (B) would be infeasible, while remote queries (C) add latency, and having no information (D) defeats the purpose of the mechanism. Thus A accurately reflects the localization benefit.

Q7. Why are users prohibited from examining or modifying keys and locks directly?

A.To prevent unauthorized privilege escalation ✅
B.Because it would improve performance
C.Because keys are encrypted
D.Because the OS cannot read them
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Allowing users to view or alter keys or locks would let them grant themselves access to objects they should not reach, breaking the security model. The other options either misstate performance effects or incorrectly claim technical limitations. Consequently, the prohibition exists to stop privilege escalation, making A the correct answer.

Q8. How does the lock–key scheme balance flexibility and security compared to pure access lists?

A.It offers selective matching while keeping management centralized ✅
B.It eliminates all security checks
C.It requires users to manage locks manually
D.It forces static permissions
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The lock‑key approach lets a domain obtain only the keys it needs, providing flexibility, while the OS retains control over key distribution, preserving security. Pure access lists give users the ability to set permissions directly, which can be less secure. Options B, C, and D describe extremes that do not capture the balanced nature of the lock‑key design. Hence A is correct.

Q9. Explain why a global access table can be less efficient than a lock–key system when the system contains millions of objects and domains.

A.The table grows quadratically, leading to high memory and lookup cost ✅
B.The table is stored on disk
C.The table uses compression
D.The table is encrypted
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: A global table must hold an entry for every domain‑object pair, so its size approaches the product of the number of domains and objects, causing massive memory consumption and long search times. In contrast, the lock‑key method stores only a small set of keys per domain and locks per object, enabling fast constant‑time checks. Options B, C, and D focus on storage details that do not address the fundamental scalability issue. Therefore A correctly explains the inefficiency.

Q10. What is the impact on system performance if each object access requires a linear search of an access list versus a constant‑time lock–key verification?

A.Linear search scales with number of entries, causing higher latency ✅
B.Both have the same cost
C.Constant‑time verification is slower
D.Linear search is faster for small lists
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When an access list is scanned, the time taken grows with the length of the list; as the system scales, this adds noticeable latency. A lock‑key check compares a key to a lock directly, which does not depend on list size, giving predictable low latency. Options B and C contradict basic algorithmic analysis, while D only applies to very short lists and does not reflect typical system behavior. Thus A is the accurate statement.

Q11. How does the lock–key mechanism support the principle of least privilege in a multi‑domain environment?

A.Domains receive only keys needed for specific objects ✅
B.All domains get all keys
C.Keys are shared globally
D.Locks are ignored
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: By granting each domain only the keys that correspond to the objects it must use, the lock‑key system ensures that a domain cannot accidentally or maliciously access unrelated resources, embodying least‑privilege. Options B, C, and D describe scenarios that would violate the principle, granting excessive or unrestricted access. Consequently, A correctly captures the mechanism’s support for least privilege.

Q12. A domain D has keys {K1, K2}. Object O has lock K2. Can the process in domain D access object O?

A.Yes, because a matching key exists ✅
B.No, because keys must be unique
C.Yes, but only after OS approval
D.No, because locks are immutable
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The lock‑key rule states that access is allowed when a domain possesses a key that matches one of the object's locks. Here D’s key set contains K2, which matches O’s lock, so access is granted. Options B, C, and D introduce incorrect constraints that do not apply to the mechanism. Therefore the correct answer is A.

Q13. Domain D1 has keys {A, B}; Domain D2 has keys {B, C}. Object O1 has locks {A}; Object O2 has locks {C, D}. Which objects can D1 access?

A.O1 only ✅
B.O2 only
C.Both O1 and O2
D.Neither
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: D1 possesses key A, which matches O1’s lock, so D1 can access O1. O2’s locks are C and D; D1 lacks both keys, so it cannot access O2. Hence only O1 is accessible. Options B, C, and D are inconsistent with the matching rule. The correct answer is A.

Q14. If a key K is removed from a domain’s key list, what happens to previously granted accesses?

A.All future accesses to objects with lock K are denied ✅
B.Existing accesses remain until process terminates
C.Access is still allowed for cached capabilities
D.System crashes
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Revocation in a lock‑key system is immediate: once the key is no longer present in the domain’s list, any subsequent attempt to use an object whose lock matches that key fails. Existing accesses that rely on cached capabilities may still work until they are refreshed, but the policy dictates denial for new attempts. Options B, C, and D describe behaviors that are not characteristic of the lock‑key revocation process. Thus A is correct.

Q15. A distributed file system requires fine‑grained read/write permissions across many nodes. Which mechanism offers the best trade‑off between revocation speed and scalability?

A.Lock‑key ✅
B.Capability list
C.Access list
D.None
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Lock‑key provides fast revocation by simply removing a key from a domain, and it scales well because each domain stores only its keys, not a copy of every capability. Capability lists can become large and costly to update, while access lists suffer from linear searches. Therefore the lock‑key approach best balances revocation speed and scalability in a distributed setting.

Q16. Suppose there are 128 possible bit patterns. Each domain receives 5 random keys and each object receives 3 random locks. What is the probability that a random domain can access a random object?

A.1−(1−5128)31 - (1 - \frac{5}{128})^{3} ✅
B.5128×3128\frac{5}{128} \times \frac{3}{128}
C.5+3128\frac{5+3}{128}
D.Zero
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The chance that a specific lock does not match any of the 5 keys is 1−5128=1231281 - \frac{5}{128} = \frac{123}{128}. For three independent locks, the probability that none match is (123128)3(\frac{123}{128})^{3}. Hence the probability of at least one match (access granted) is 1−(123128)31 - (\frac{123}{128})^{3}, which is exactly option A.

Q17. Domains: D1 keys {K1,K3}, D2 keys {K2}, D3 keys {K1,K2,K4}. Objects: O1 locks {K1}, O2 locks {K2,K3}, O3 locks {K4}. Which domain can access O2?

A.D1 only
B.D2 only
C.D3 only
D.All three domains ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: O2’s locks are K2 and K3. D1 has K3, D2 has K2, and D3 has K2, so each domain possesses at least one matching key. Therefore all three domains can access O2, making option D the correct choice. Options A, B, and C incorrectly limit access to a single domain.

Q18. If an attacker can read the key list of a domain but cannot modify it, which protection mechanism is most vulnerable?

A.Lock‑key ✅
B.Capability list
C.Access list
D.None
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Reading a domain’s keys reveals exactly which object locks the domain can match, giving the attacker a clear map of permissible accesses. This exposure is specific to the lock‑key model, whereas capability lists hide the capabilities themselves and access lists do not rely on keys. Hence the lock‑key mechanism is the most vulnerable under this scenario.

Q19. In a benchmark, checking access via lock‑key takes 0.2 µs, while scanning an access list of length 10 takes 1.5 µs. What is the speed‑up factor?

A.7.5× ✅
B.0.13×
C.1.3×
D.5×
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Speed‑up is calculated as the slower time divided by the faster time: 1.50.2=7.5\frac{1.5}{0.2} = 7.5. Therefore the lock‑key method is 7.5 times faster than the access‑list scan, corresponding to option A.

Q20. When a new object is created with lock L, what must the OS do to allow a specific domain D to access it?

A.Add L to D’s key list ✅
B.Remove L from D’s key list
C.Change D’s priority
D.Delete all other locks
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The OS must ensure that domain D possesses a key matching the new lock L. The straightforward way is to add L (or a corresponding key) to D’s key list, granting permission. Removing L, changing priority, or deleting other locks would not create the required match. Thus option A correctly describes the necessary action.

Q21. An OS must support both lock‑key and traditional access lists. Which architecture minimizes extra overhead?

A.Store locks and access entries in a unified table indexed by object ID ✅
B.Duplicate the information in separate structures
C.Use only lock‑key and ignore access lists
D.Convert all access lists to capabilities
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: A unified table allows the system to look up both locks and access‑list entries with a single index operation, avoiding redundant storage and extra lookup steps. Duplicating data (B) increases memory use, while discarding access lists (C) defeats the requirement, and converting to capabilities (D) adds conversion cost. Hence option A offers the most efficient design.

Q22. A system administrator prefers lock‑key because it reduces the number of permission checks. Which downside must they consider?

A.Revocation may require updating many domains
B.Keys must be distributed securely
C.Locks cannot be changed after object creation
D.All of the above ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: While lock‑key simplifies checks, it introduces challenges: removing a key can affect many domains (revocation overhead), keys need careful distribution to avoid leaks, and once a lock is set on an object it is typically immutable, limiting flexibility. All three issues are real concerns, making option D the comprehensive answer.

🔗 Related Topics (MCQs)