📝 Domain structure for protection in Operating System (18 MCQs)
Organising Domains Across Processes and Users
Domain structure describes how an operating system organises protection domains and associates them with users, processes, or procedures. A domain contains rights over selected objects, but its relationship with other domains determines how authority can change during execution. Systems may use static assignments, controlled domain switching, or hierarchical arrangements. The structure determines how flexibly privileges can be separated and transferred.
Static Assignment and the Limits of Fixed Permissions
A simple design assigns each process one domain for its entire lifetime. This provides predictable access control but may grant more authority than a process needs during particular operations. More flexible systems allow a process to move between domains. Such movement must be controlled because unrestricted switching could let an ordinary process acquire administrator-level rights.
Domain Switching Through Controlled Transitions
In a domain-switching model, the operating system maintains rules specifying which domains may be entered from another domain. A transition may occur when a process invokes a protected service or performs an authorised role change. The kernel verifies the transition and updates the active protection context. The process then receives the rights associated with the destination domain.
Example of a Restricted Service Transition
Suppose an application normally runs in domain D1, which permits access to its own files. A printing operation requires access to a protected printer object available in D2. The system may allow a controlled transition to D2 for the printing service, then return execution to D1. The application does not receive unrestricted rights to all D2 resources.
Static, Dynamic and Hierarchical Organisation
Static domain assignment simplifies analysis but can limit flexibility. Dynamic switching supports temporary privileges, while hierarchical structures can express relationships between broader and narrower permission sets. The actual representation differs among operating systems. Incorrect transition rules can cause privilege escalation, and frequent switching may add management overhead or make protection policy harder to verify.
Misunderstandings About Domain Relationships
'A process can switch to any domain' is false because transitions require explicit authorisation. 'A domain switch changes the process identity' is misleading; it changes the protection context, not necessarily the authenticated user. 'A hierarchy automatically makes every lower domain safer' is incorrect because safety depends on the rights and transition rules actually enforced.
Exam Focus: Static Assignment and Domain Switching
Examinations may ask students to compare fixed-domain assignment with controlled switching or interpret a domain-transition diagram. Practise identifying source and destination domains, checking whether a transition is authorised, and listing the rights available afterward. Explain why transition restrictions prevent privilege escalation and how temporary privileges can reduce unnecessary access.
Key Terms of Domain Structure
- Static domain - Fixed protection context.
- Dynamic switching - Controlled change of domain.
- Transition rule - Permission to enter another domain.
- Privilege escalation - Gaining unauthorised higher authority.
- Protection context - Rights active during execution.
📝 All Domain structure for protection in Operating System MCQs
Q1. An operator needs to mount backup tapes for a single shift. Which method best follows the principle of least privilege?
📖 Explanation: The correct answer gives the operator only the specific permission needed and only for the required time, embodying least privilege. A permanent admin account (B) grants far more rights than necessary, increasing risk. Disabling all privileges (C) prevents the task from being done. Providing a full‑rights root account (D) is excessive and violates the principle. Limiting rights to the exact task and duration reduces attack surface and aligns with secure practice.
Q2. A company wants to limit remote access to a database service to only the finance team during business hours. Which control implements this most directly?
📖 Explanation: RBAC with time constraints (B) lets the organization assign the finance role the needed database permission and restricts it to business‑hour windows, matching the requirement. An ACL on IP (A) does not enforce time limits or role membership. Disabling the service (C) would prevent legitimate use. Encryption (D) protects data in transit but does not control who can connect or when.
Q3. If an audit log shows a privileged function was invoked without prior enablement, what is the most likely security issue?
📖 Explanation: The log indicates a privileged operation occurred unexpectedly, which most often points to a privilege‑escalation bug (C) that allowed a user to obtain rights they should not have. A misconfigured ACL (A) could block access but would not explain an unexpected invocation. Insufficient logging (B) would hide the event, not produce it. An unused service (D) is unrelated to the observed privileged call.
Q4. A server runs web, FTP, and email services. To reduce attack surface, which combination aligns with the principle of least privilege?
📖 Explanation: Disabling the unnecessary FTP service (D) removes a potential entry point while keeping needed web and email services operational, directly applying least privilege. Keeping all services (A) provides no reduction. Disabling FTP alone (B) is good but does not consider that the web service may also be unnecessary at certain times. Enabling only web during the day (C) neglects needed email functionality.
Q5. A system administrator creates a role that can only read system logs but not modify them. Which principle does this illustrate?
📖 Explanation: Granting a role only the read permission needed for its task exemplifies the principle of least privilege (B), ensuring users have no more access than required. Separation of duties (A) involves dividing responsibilities to prevent fraud, which is not the focus here. Defense in depth (C) refers to layered security controls, and fail‑safe defaults (D) describe secure default settings, neither of which directly describe the limited read‑only role.
Q6. During scheduled maintenance, a backup script requires root rights for ten minutes. Which mechanism should be used to grant these rights?
📖 Explanation: Sudo with a time‑limited rule (A) provides the needed elevated rights just for the short maintenance window, adhering to least privilege. A permanent root account (B) would give ongoing excessive rights. Disabling all privileges (C) would prevent the script from running. Changing file ownership permanently (D) gives ongoing elevated rights, violating the principle.
Q7. An ACL entry \userX:rw\ is added to a file. What does this permit?
📖 Explanation: The \rw\ notation in an ACL signifies both read and write permissions (C), allowing the user to view and modify the file. \Read only\ (A) would be represented by \r\ alone, while \write only\ (B) would be \w\ alone. Execute permission (D) is indicated by \x\ and is not included in the given entry.
Q8. Given two operating systems, one with 5 million lines of code and 30 services, another with 2 million lines and 12 services, which factor most likely contributes to a higher number of security vulnerabilities?
📖 Explanation: Both the larger code base and the greater number of services (D) increase the attack surface and the likelihood of bugs, leading to more vulnerabilities. Code size alone (A) ignores the impact of many services, while services alone (B) overlooks the complexity of extensive code. Stating only code size (C) is incomplete. The combination of both factors creates more opportunities for security flaws.
Q9. An audit system records every privileged function call but does not record the invoking user ID. What security risk does this create?
📖 Explanation: Without the user ID, it is impossible to attribute privileged actions to a specific individual, resulting in loss of accountability (A). Performance overhead (B) concerns system resources, not security. Data redundancy (C) is a storage issue, and weak encryption (D) relates to confidentiality, none of which address the missing user identification.
Q10. What is the main goal of the principle of least privilege?
📖 Explanation: The principle aims to give users only the minimal permissions required to perform their tasks (B), thereby reducing the chance of accidental or malicious misuse. Maximizing rights (A) does the opposite. Simplifying administration (C) may be a side effect but is not the primary goal. Improving performance (D) is unrelated to permission management.
Q11. How does role‑based access control help enforce least privilege?
📖 Explanation: RBAC groups related permissions into roles (C), allowing administrators to assign only the roles a user needs, thus limiting excess rights. Assigning many roles (A) would increase privileges. Removing all permissions (B) defeats functionality. Encrypting roles (D) protects data but does not control permission granularity.
Q12. Why might a system with many services be harder to secure than one with fewer services, even if both use similar access controls?
📖 Explanation: Each additional service adds new code paths and interfaces that attackers can target, making the system harder to secure (A). Processor speed (B) and storage size (C) are unrelated to security complexity. Better documentation (D) might aid security but does not explain increased difficulty.
Q13. In the context of domain protection, what does enabling a privilege mean?
📖 Explanation: Enabling a privilege activates the necessary rights only for the duration of a task (D), aligning with the principle of granting only what is needed when it is needed. Permanently granting (A) provides continuous rights, deletion (B) removes them, and encryption (C) addresses confidentiality, not activation.
Q14. Which statement best describes how audit trails complement the principle of least privilege in detecting policy violations?
📖 Explanation: Audit trails record each use of privileged functions, supplying concrete evidence when a violation occurs (B). They do not replace least privilege (A); instead, they verify its proper use. Automatic adjustment (C) is not typical of audit logs, and hiding actions (D) would undermine accountability.
Q15. Which of the following best illustrates a violation of least privilege?
📖 Explanation: Giving an administrator full root rights for a simple log view (C) greatly exceeds the necessary permission, violating least privilege. Providing only read access (A) respects the principle. A role with exact permissions (B) also follows it. Disabling unused services (D) is a security best practice.
Q16. When implementing time‑based access controls, which condition must be enforced to maintain least privilege?
📖 Explanation: Limiting access to authorized time windows (D) ensures users have privileges only when needed, embodying least privilege. Granting access at any time (A) removes temporal restrictions. Skipping authentication (B) eliminates verification. Allowing only weekend access (C) is a specific schedule but may not align with business needs.
Q17. What does RBAC stand for?
📖 Explanation: RBAC is an abbreviation for Role‑Based Access Control (B), a model that assigns permissions to roles rather than individuals. The other options are incorrect expansions that do not reflect the widely used security framework.
Q18. Which operating system mentioned is historically considered more secure despite being a UNIX variant?
📖 Explanation: Solaris is noted as relatively secure in the discussion, even though it descends from UNIX, which originally had limited protection features. Windows 2000 (B) is highlighted for its security holes, while Linux (C) and macOS (D) are not referenced in this context.>