📝 Introduction to Protection and Security in Operating System (30 MCQs)
Protection Domains and Controlled Resource Access
Protection and security mechanisms control how users and processes access operating system resources. Protection governs authorised operations on objects such as files, memory regions, and devices, whereas security addresses broader threats, including unauthorised access, malicious activity, and information disclosure. The kernel enforces access restrictions through privilege levels, authentication, permissions, access-control mechanisms, and isolation boundaries.
Why Resource Isolation and Security Policies Are Necessary
Multiple users and applications share processors, memory, storage, and network facilities, creating opportunities for accidental interference and deliberate attacks. Unrestricted access could allow one process to modify another process's memory, read confidential files, or execute privileged instructions. Protection policies define permitted operations, while security mechanisms verify identities, enforce permissions, and defend system resources against unauthorised activity.
Access Control, Authentication, and Privilege Enforcement
Authentication establishes the identity of a user or service, while authorisation determines which operations that identity may perform. Access-control lists associate permissions with protected objects, and capability-based systems provide unforgeable references carrying specific rights. Hardware privilege modes restrict kernel operations, while mechanisms such as address-space isolation and system-call validation prevent applications from bypassing these boundaries.
Evaluating File Permissions for Two Different Users
Consider a file owned by user Ali with permissions rw-r----- under a traditional Unix permission model. Ali can read and modify the file, members of its assigned group can read it, and other users have no access. A process running under an unrelated user account cannot modify the file unless additional permissions or privileges authorise that operation.
Confidentiality, Integrity, Availability, and Security Limitations
Effective protection reduces unauthorised disclosure, modification, and disruption of system resources. The confidentiality, integrity, and availability principles guide security design across personal computers, servers, and multiuser environments. However, permissions alone cannot prevent every attack. Weak authentication, software vulnerabilities, excessive privileges, stolen credentials, and incorrect configurations can undermine otherwise effective protection mechanisms.
Misconceptions About Permissions and Security Controls
'Authentication automatically grants every requested permission' is incorrect because authorisation separately determines access rights. 'Kernel mode makes software completely secure' is incorrect because privileged code can contain exploitable vulnerabilities. 'File permissions prevent every form of unauthorised access' is incorrect because compromised accounts, application vulnerabilities, and misconfigured services can bypass intended restrictions.
Exam Focus: Access Rights and Protection Mechanisms
Practise interpreting permission strings, access-control lists, and protection-domain relationships. Distinguish authentication from authorisation, protection from security, and access-control lists from capability systems. Examination questions may test user and kernel privileges, file access rights, least privilege, isolation, and the confidentiality, integrity, and availability principles.
Key Terms of Protection and Security
- Authentication - Verification of an identity.
- Authorisation - Determination of permitted operations.
- ACL - Object-associated access permission list.
- Capability - Protected reference carrying access rights.
- Least privilege - Minimum necessary access rights.
- Integrity - Protection against unauthorised modification.
📝 All Introduction to Protection and Security in Operating System MCQs
Q1. A hospital system stores patient records. Unauthorized staff must not read confidential diagnoses, while authorized clinicians must access records needed for treatment. Which security objective primarily prevents unauthorized disclosure?
📖 Explanation: Confidentiality prevents information disclosure to unauthorized people, directly protecting private diagnoses in this hospital example. The tempting integrity option concerns unauthorized modification, not reading; availability instead concerns keeping services accessible when needed.
Q2. A user signs in successfully to a university portal, but the system refuses access to the examination-results page because the user is not an examiner. Which security step made that decision?
📖 Explanation: Authentication establishes who the user is, while authorization decides which resources that identity may access. The tempting authentication option has already succeeded; the denial concerns permissions rather than identity verification.
Q3. A payroll application runs under a service account that needs to read salary records and generate payslips, but does not need permission to change employee bank details. Which principle should guide its permissions?
📖 Explanation: Least privilege grants an account only the permissions required for its legitimate tasks. The tempting open-access choice increases exposure unnecessarily; permission to change bank details is unrelated to generating payslips and should be withheld.
Q4. A file server stores, with each file, a list of users and the operations each user may perform. What protection mechanism is this?
📖 Explanation: An access control list associates a protected object with identities and their permitted operations. The tempting capability-list option is organized around the rights held by subjects, rather than permissions attached to each object.
Q5. A process receives an unforgeable token that identifies a file and grants read access. The process presents this token when requesting the file. Which protection mechanism does the token represent?
📖 Explanation: A capability is an unforgeable reference that combines an object designation with specified access rights. The tempting access-control-list option stores permissions with the object; this scenario instead gives the subject a transferable authority token.
Q6. A user-mode application attempts to execute an instruction that disables interrupts. How should hardware protect the operating system?
📖 Explanation: Disabling interrupts is privileged because unrestricted applications could prevent the kernel from handling essential events. Hardware traps the attempt; the tempting administrator-login option does not itself change the processor's execution privilege level.
Q7. A web service stores account passwords. Which approach best limits damage if an attacker obtains the password database?
📖 Explanation: A unique salt and slow password hash make large-scale guessing more expensive and prevent identical passwords from sharing the same hash. The tempting reversible-encryption option creates a decryption risk if its key is also compromised.
Q8. A system uses this access matrix: File A: Alice=read, Bob=read/write ; File B: Alice=none, Bob=read. Which operation can Alice perform on File B?
📖 Explanation: The matrix gives Alice no rights on File B, so neither reading nor writing is permitted. The tempting read option belongs to Bob's entry; permissions must be checked for the correct subject-object pair.
Q9. A cloud service replicates customer records across two data centers and automatically switches to the second site when the first becomes unavailable. Which security objective is most directly supported?
📖 Explanation: Replication and failover help keep the service accessible when one site fails, supporting availability. The tempting confidentiality option prevents unauthorized disclosure; redundancy alone does not control who can read the replicated records.
Q10. A security component checks every request to access a protected object, cannot be modified by ordinary users, and is small enough for careful verification. Which mechanism is being described?
📖 Explanation: A reference monitor mediates access to protected objects and must be tamper-resistant and sufficiently small to verify. The tempting command-interpreter option processes commands; it does not necessarily enforce every security-sensitive access.
Q11. A Linux file has permissions 640. What access does a user in the file's group receive, assuming the user is not the owner?
📖 Explanation: Permission 640 gives the owner read/write, the group read, and others no permissions. The tempting read-and-write option confuses the group digit 4 with the owner's digit 6; group members receive read only.
Q12. A payroll system uses role-based access control. An employee changes from the Auditor role to the Payroll Clerk role. What is the main administrative advantage of this model?
📖 Explanation: Role-based access control assigns permissions to job roles and users acquire them through role membership. The tempting per-user configuration option duplicates administration and makes permission changes harder across a large workforce.
Q13. A security administrator wants to prevent one employee from both creating a supplier account and approving payments to that supplier. Which control most directly addresses this risk?
📖 Explanation: Separation of duties divides sensitive responsibilities so one person cannot complete the entire risky transaction alone. The tempting single sign-on option simplifies authentication but does not separate the authority to create suppliers from payment approval.
Q14. A bank requires a password and a fingerprint before allowing an administrator to change account limits. Why is this stronger than requiring two passwords?
📖 Explanation: A password is something known, while a fingerprint is something possessed biologically, so the pair uses distinct factor categories. The tempting two-password approach still relies on knowledge factors and is not true multifactor authentication.
Q15. A company encrypts customer records before storing them in cloud storage. Which statement correctly distinguishes symmetric encryption from public-key encryption?
📖 Explanation: Symmetric encryption uses a shared secret for encryption and decryption, while public-key systems use related public and private keys. The tempting no-key description is wrong because both methods depend on cryptographic keys.
Q16. A company digitally signs a software update using its private signing key. What can a recipient primarily verify using the corresponding public key?
📖 Explanation: A valid digital signature supports origin authentication and integrity of the signed content. The tempting confidentiality option is wrong because signatures do not hide data; encryption is needed to keep content secret.
Q17. A security analyst reviews this login log: 09:00 failed ; 09:01 failed ; 09:02 failed ; 09:03 success. The account policy locks an account after three consecutive failures. What should have happened before the successful login?
📖 Explanation: The third consecutive failure at 09:02 reaches the configured lockout threshold, so the account should be locked before 09:03. The tempting no-action option ignores the policy and the earlier suspicious attempts.
Q18. A file-upload service checks that a user may write to a destination directory, then waits before opening the file. During the delay, an attacker replaces the destination with a symbolic link to a protected file. Which vulnerability is illustrated?
📖 Explanation: The permission check and later file operation use a path that an attacker changes between the two moments. This is a time-of-check to time-of-use race; the tempting replay attack resends previously captured data instead.
Q19. A system administrator reviews security logs after an unauthorized database change. Which property do reliable, time-stamped, access-controlled audit logs primarily support?
📖 Explanation: Protected audit logs associate events with identities and times, supporting accountability and incident investigation. The tempting prevention option overstates logging: records help detect and reconstruct actions but do not themselves stop every malicious operation.
Q20. A server process handles requests from many customers. A bug allows a request to overwrite memory beyond its allocated buffer and alter a return address. Which attack technique may exploit this flaw?
📖 Explanation: A buffer overflow occurs when data exceeds a memory buffer's bounds and corrupts adjacent memory, potentially changing control flow. The tempting fragmentation option concerns storage layout and does not explain overwriting a return address.
Q21. A company's access matrix contains these entries: Domain D1: File X=read, File Y=read/write ; Domain D2: File X=none, File Y=read. A process running in D2 requests write access to File Y. What should the system do?
📖 Explanation: Access rights are evaluated for the active domain and requested object. D2 has only read permission on File Y, so writing must be denied; the tempting D1 permission cannot be borrowed automatically by a process in D2.
Q22. A file server grants access through capability tokens copied to several client processes. An administrator revokes one client's access. Why can immediate revocation be difficult in a basic capability system?
📖 Explanation: Copied capabilities may remain valid after the original is withdrawn, so simple deletion may not revoke every copy. The tempting claim that revocation is universally impossible is too strong; indirection or version checks can support it.
Q23. A security-critical operating-system component mediates access to files, memory, and devices. Which combination best describes the essential design requirements of a reference monitor?
📖 Explanation: A reference monitor must be tamper-resistant, small enough to analyze, and provide complete mediation of protected accesses. The tempting optional-check design is unsafe because trusted applications can still contain defects or be compromised.
Q24. A privileged accounting service can read customer records and issue refunds. An untrusted user tricks it into using its authority to access a record the user could not access directly. Which security flaw is this?
📖 Explanation: The service is a confused deputy because it misuses its legitimate authority on behalf of a less-privileged caller. The tempting dictionary-attack option guesses passwords and does not explain misuse of delegated authority.
Q25. A classified system follows a confidentiality policy in which a Secret-level user may read Confidential data but cannot write information to a Confidential destination. Which rule explains the restriction?
📖 Explanation: The no-write-down rule prevents information from a higher classification flowing into a lower one. The tempting no-read-up rule blocks reading higher-classified information, but it does not explain the prohibited write to Confidential data.
Q26. A laboratory uses an integrity policy where a high-integrity process must not read untrusted low-integrity data or write to a higher-integrity object. Which pair of restrictions matches this policy?
📖 Explanation: The stated integrity policy prevents high-integrity subjects from reading lower-integrity data and from writing upward. The tempting confidentiality-style restrictions reverse the intended integrity flow and would not enforce the described policy.
Q27. A web application creates files with default mode 666. The process has umask 027. What permissions result for a newly created regular file?
📖 Explanation: The umask removes permission bits from the default mode: . The tempting 0650 incorrectly adds group execute permission, which is not present in the default mode for a newly created regular file.
Q28. A remote service encrypts a message using the recipient's public key. Which key should the recipient use to recover the plaintext in a conventional public-key encryption scheme?
📖 Explanation: Public-key confidentiality uses the recipient's public key for encryption and the matching private key for decryption. The tempting recipient-public-key option is used to encrypt, not recover plaintext, while a hash cannot decrypt ciphertext.
Q29. A compromised web server account has permission to read every database table, modify user roles, and administer backups, although the service only needs to read product prices. Which redesign best reduces future damage?
📖 Explanation: The service identity needs only read access to product prices, so restricting its scope limits damage after compromise. The tempting audit-only response detects activity but leaves excessive permissions available to an attacker.
Q30. A payment API verifies a valid digital signature on every transfer request. An attacker captures a signed request and submits the identical request again later. Which additional control best prevents this replay?
📖 Explanation: A valid signature proves origin and integrity but does not establish freshness. A unique nonce or sequence number lets the server reject duplicates; the tempting larger-key option does not prevent replaying an authentic request.