🎓 BookMCQ
← Back to 1. Introduction to Operating System

📝 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.
10
Easy
10
Medium
10
Hard

📝 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?

A.Availability
B.Confidentiality ✅
C.Integrity
D.Non-repudiation
💡 Difficulty: easy | ✅ Correct: B

📖 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?

A.Authentication
B.Encryption
C.Authorization ✅
D.Auditing
💡 Difficulty: easy | ✅ Correct: C

📖 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?

A.Least privilege ✅
B.Open access
C.Complete trust
D.Privilege inheritance
💡 Difficulty: easy | ✅ Correct: A

📖 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?

A.Capability list
B.Access control list ✅
C.Encryption key table
D.Password dictionary
💡 Difficulty: easy | ✅ Correct: B

📖 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?

A.Access control list
B.Audit record
C.Capability ✅
D.Password hash
💡 Difficulty: easy | ✅ Correct: C

📖 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?

A.Execute the instruction and record it later
B.Allow it only when the application has administrator credentials
C.Convert it into an ordinary file operation
D.Raise a protection exception or trap to the kernel ✅
💡 Difficulty: easy | ✅ Correct: D

📖 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?

A.Store passwords using a unique salt and a slow password-hashing function ✅
B.Store passwords as reversible plaintext
C.Encrypt every password with one hard-coded key stored beside the database
D.Save only the first four characters of each password
💡 Difficulty: easy | ✅ Correct: A

📖 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?

A.Read
B.Write
C.Read and write
D.Neither read nor write ✅
💡 Difficulty: easy | ✅ Correct: D

📖 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?

A.Confidentiality
B.Availability ✅
C.Authentication
D.Non-repudiation
💡 Difficulty: easy | ✅ Correct: B

📖 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?

A.File compression service
B.Command interpreter
C.Reference monitor ✅
D.Disk scheduler
💡 Difficulty: easy | ✅ Correct: C

📖 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?

A.Read and write
B.Read only ✅
C.Write only
D.No access
💡 Difficulty: medium | ✅ Correct: B

📖 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?

A.Permissions can be assigned to roles and changed by changing role membership ✅
B.Every user must receive a separate custom access list for every file
C.Users automatically gain all permissions held by their colleagues
D.Roles eliminate the need to authenticate users
💡 Difficulty: medium | ✅ Correct: A

📖 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?

A.Single sign-on
B.Data compression
C.Separation of duties ✅
D.Disk mirroring
💡 Difficulty: medium | ✅ Correct: C

📖 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?

A.The two passwords are always stored on separate servers
B.A fingerprint is a different authentication factor from something the user knows ✅
C.A fingerprint automatically encrypts the account database
D.The password is no longer needed for authentication
💡 Difficulty: medium | ✅ Correct: B

📖 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?

A.Symmetric encryption uses one shared secret key, while public-key encryption uses a related key pair ✅
B.Symmetric encryption requires no key, while public-key encryption uses one shared key
C.Both methods require the same public key to encrypt and decrypt
D.Public-key encryption cannot support confidentiality
💡 Difficulty: medium | ✅ Correct: A

📖 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?

A.That the update is hidden from everyone except the recipient
B.That the update was compressed without errors
C.That the signature corresponds to the signing key and the signed content has not changed ✅
D.That the update contains no software vulnerabilities
💡 Difficulty: medium | ✅ Correct: C

📖 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?

A.The account should have been locked after the third failure ✅
B.The account should have been permanently deleted after the first failure
C.The successful login should be recorded as another failure
D.No security action is justified because a later login succeeded
💡 Difficulty: medium | ✅ Correct: A

📖 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?

A.Replay attack
B.Time-of-check to time-of-use race ✅
C.Password spraying
D.Denial of service through flooding
💡 Difficulty: medium | ✅ Correct: B

📖 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?

A.Data compression
B.Automatic confidentiality of all database fields
C.Accountability and investigation of user actions ✅
D.Guaranteed prevention of every future attack
💡 Difficulty: medium | ✅ Correct: C

📖 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?

A.Buffer overflow ✅
B.DNS caching
C.File fragmentation
D.Symmetric encryption
💡 Difficulty: medium | ✅ Correct: A

📖 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?

A.Allow the request because D1 has write permission
B.Allow the request because all domains share the matrix
C.Deny the request because D2 has only read permission for File Y ✅
D.Allow the request after changing the process identifier
💡 Difficulty: hard | ✅ Correct: C

📖 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?

A.Capabilities are stored only in directory names
B.Previously issued copies may remain usable unless revocation is supported through indirection, versions, or another mechanism ✅
C.Capabilities cannot represent read permissions
D.Revocation is impossible in every capability-based design
💡 Difficulty: hard | ✅ Correct: B

📖 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?

A.Small enough to verify, tamper-resistant, and invoked for every relevant access ✅
B.Large, user-modifiable, and invoked only after suspicious events
C.Executed only when an administrator is logged in
D.Optional for trusted applications but mandatory for unknown applications
💡 Difficulty: hard | ✅ Correct: A

📖 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?

A.Cold-boot attack
B.Confused deputy problem ✅
C.Port scanning
D.Dictionary attack
💡 Difficulty: hard | ✅ Correct: B

📖 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?

A.No read down
B.No write down ✅
C.No read up
D.No execution in kernel mode
💡 Difficulty: hard | ✅ Correct: B

📖 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?

A.No read down and no write up ✅
B.No read up and no write down
C.No read down and no write down
D.No read up and no write up
💡 Difficulty: hard | ✅ Correct: A

📖 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?

A.640 ✅
B.650
C.660
D.627
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The umask removes permission bits from the default mode: 0666&∼0027=06400666 \& \sim0027=0640. 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?

A.The sender's public key
B.The recipient's private key ✅
C.The recipient's public key
D.A hash of the message
💡 Difficulty: hard | ✅ Correct: B

📖 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?

A.Give the account shared administrator credentials
B.Keep all permissions but increase audit frequency
C.Move the database to a larger disk
D.Create a restricted service identity with read access only to the required product data ✅
💡 Difficulty: hard | ✅ Correct: D

📖 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?

A.Use a larger encryption key without changing request validation
B.Require a fresh nonce or sequence number and reject previously processed requests ✅
C.Store the signature in a public directory
D.Disable audit logging after successful verification
💡 Difficulty: hard | ✅ Correct: B

📖 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.

🔗 Related Topics (MCQs)