Protection & Security MCQs for the NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Protection and security cover how an operating system controls which processes and users may use which resources, and how it defends itself against attacks. Silberschatz draws a clear line between the two. Protection is the internal mechanism (domains, access rights, the access matrix). Security adds authentication and defence against threats such as Trojan horses, buffer overflows and worms. This is topic 12 of the 12 in the Operating Systems area, which carries 5% of the NSCT according to HEC's Areas of Competencies.

Operating Systems had the lowest accuracy of any area in 2026, at 33.8%, per the HEC NSCT report. The same ideas also appear in the Cyber Security area (5%), so this topic pays off twice. For the wider security view, see Operating System Security in that area.

Access matrix

Here are the key terms:

Here is a small example:

F1 F2 Printer D2
D1 read read* switch
D2 write owner, read print
D3 execute

Silberschatz adds special rights that let the matrix change in a controlled way:

The matrix is rarely stored whole, because a global table is large and mostly empty. The two usual layouts are below.

Layout Stores Strength Weakness
Access list One column per object Easy to revoke rights on an object Slow to list everything a domain can do
Capability list One row per domain Fast checks; a capability is like a ticket Hard to revoke
Lock-key Locks on objects, keys in domains A compromise between the two Key management

UNIX permission bits (owner, group, others) are a condensed access list. Only one class applies to a user, checked in that order. A group member gets the group bits even if "others" has more rights.

Exam angle: expect lookups ("can D1 write F2?"), copy and owner tracing, and "which row or column is this?" questions.

Authentication

Authentication proves who a user is. Authorisation then decides what that user may do.

To size a brute-force search, raise the alphabet size to the power of the password length. Six characters from a-z plus 0-9 give 36^6 = 2,176,782,336 options. At 10^6 guesses per second, that is about 36 minutes.

Exam angle: salts increase the attacker's work per user. They do not make a weak password strong.

OS threats

Threat What it is
Trojan horse Useful-looking code that misuses the rights of the user who runs it
Trap door (back door) A hidden way past authentication, left in by a programmer
Logic bomb Code that does harm only when a condition, such as a date, is met
Stack/buffer overflow Unchecked input overwrites the return address, so the attacker's code runs
Virus Code that attaches to programs or files and spreads when they run
Worm A standalone program that copies itself across a network
Denial of service Overloads a system so that real users are shut out; DDoS uses many machines

Silberschatz's search-path example is a classic Trojan horse. If the current directory comes first in PATH, a fake ls in a shared folder runs with your rights.

Exam angle: a buffer overflow in a setuid-root program is a privilege escalation, because the injected code runs as root.

Common traps

Worked examples

1. Understanding. In the table above, is "F1: write; F2: owner, read; Printer: print" an access list or a capability list? Answer: a capability list, for D2. It is one row: everything a single domain may do.

2. Application. A file has mode 640 and is owned by user ali, group dev. User hina is in dev. Can she write the file? Answer: no. She is not the owner, so the group bits (4 = read only) apply. She can read but not write.

3. Analysis. Using the table above, D2 adds write on F2 to D3's entry. Is this allowed, and could D1 have done it instead? Answer: yes, because D2 holds owner on F2. D1 could not. Its read* lets it copy only read, not write, and it does not own F2.

Practise

The quiz below has 100 protection and security questions, filterable by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. Which principle says that programs, users and systems should be given just enough privileges to perform their tasks?

    1. Separation of mechanism and policy
    2. Defence in depth
    3. Security through obscurity
    4. The principle of least privilege
    Show answer

    Answer: D. The principle of least privilege

    The principle of least privilege limits each subject to the minimum rights it needs. If a process is compromised or buggy, the damage is limited to what those few rights allow. The need-to-know principle applies the same idea at any given moment.

  2. In the access-matrix model of protection, what do the rows and columns represent?

    1. Rows are users, columns are passwords
    2. Rows are objects, columns are processes, and each entry holds a page number
    3. Rows are domains, columns are objects, and each entry lists access rights
    4. Rows are files, columns are disk blocks
    Show answer

    Answer: C. Rows are domains, columns are objects, and each entry lists access rights

    Silberschatz's access matrix has one row per protection domain and one column per object. The entry access(i, j) is the set of operations a process running in domain Di may invoke on object Oj.

  3. An access list and a capability list are two ways to store the access matrix. Which is correct?

    1. An access list stores a row (per domain); a capability list stores a column (per object)
    2. Both store the whole matrix as one global table
    3. An access list stores passwords; a capability list stores encryption keys
    4. An access list stores a column (per object); a capability list stores a row (per domain)
    Show answer

    Answer: D. An access list stores a column (per object); a capability list stores a row (per domain)

    An access list belongs to an object and lists the (domain, rights) pairs with non-empty entries: one column. A capability list belongs to a domain and lists the objects it may use and how: one row.

  4. What is the difference between authentication and authorisation?

    1. Authentication decides what a user may access; authorisation checks who the user is
    2. They mean the same thing
    3. Authentication checks who a user is; authorisation decides what that user may access
    4. Authentication protects files; authorisation protects networks
    Show answer

    Answer: C. Authentication checks who a user is; authorisation decides what that user may access

    Authentication verifies identity, for example with a password, token or fingerprint. Only then can the system apply authorisation: looking up the rights that identity has, for example in an access list.

  5. A free game secretly copies the user's files to a remote server while it runs. What kind of threat is this?

    1. Worm
    2. Trojan horse
    3. Denial of service
    4. Port scan
    Show answer

    Answer: B. Trojan horse

    A Trojan horse is code that misuses its environment: it does something useful or appealing on the surface while carrying out hidden, harmful actions with the user's own rights. It does not need to replicate itself.

  6. How does a worm differ from a virus?

    1. A worm needs a host file; a virus does not
    2. A worm only deletes files; a virus only steals passwords
    3. A worm is a standalone program that spreads itself across networks; a virus attaches itself to other programs or files
    4. A worm affects hardware; a virus affects software
    Show answer

    Answer: C. A worm is a standalone program that spreads itself across networks; a virus attaches itself to other programs or files

    A virus is a fragment of code embedded in a legitimate program or file and spreads when that host is run or shared. A worm is a complete program that copies itself to other machines over a network without needing a host program.

  7. Why does an OS add a random salt to each password before hashing it?

    1. So users can recover forgotten passwords
    2. To make hashing faster
    3. So identical passwords produce different hashes and precomputed dictionary tables become useless
    4. To encrypt the password so it can be decrypted later
    Show answer

    Answer: C. So identical passwords produce different hashes and precomputed dictionary tables become useless

    The salt is stored with the hash and mixed into the input. Two users with the same password get different hashes, and an attacker cannot use one precomputed table of hashes for all users. They must attack each salt separately.

  8. In UNIX, how does a process temporarily switch to a domain with the file owner's privileges, as when an ordinary user runs passwd?

    1. The user types the root password before every command
    2. The kernel copies the program into the owner's home directory
    3. The process makes a capability list request to the printer daemon
    4. The program file has the setuid bit set, so the process runs with the file owner's user ID while it executes
    Show answer

    Answer: D. The program file has the setuid bit set, so the process runs with the file owner's user ID while it executes

    In UNIX a domain is tied to a user ID. If an executable has the setuid bit on, a process that runs it takes the file owner's ID as its effective user ID. That is how an ordinary user can run passwd, owned by root, to update the protected password file.

  9. In the access matrix, an entry of read* (read with an asterisk) means:

    1. The domain can read every object in the system
    2. The domain owns the object
    3. The domain can read the object and can also copy the read right to other domains for that object
    4. The domain can read the object only once
    Show answer

    Answer: C. The domain can read the object and can also copy the read right to other domains for that object

    The asterisk is the copy right. A process in a domain holding R* on an object can copy R into another domain's entry in the same column. In Silberschatz's limited copy variant, the copy is plain R, so it cannot be copied further.

  10. In the access matrix, what is the difference between the owner right and the control right?

    1. Owner lets a domain switch domains; control lets it copy rights
    2. Owner applies to domains; control applies to files
    3. They are identical
    4. Owner on an object lets a domain add or remove rights in that object's column; control on a domain lets a domain remove rights from that domain's row
    Show answer

    Answer: D. Owner on an object lets a domain add or remove rights in that object's column; control on a domain lets a domain remove rights from that domain's row

    The owner right on object Oj lets a process add and remove any right in column j. The control right applies only to domain objects: control in access(Di, Dj) lets a process in Di remove access rights from row Dj.

FAQs

Is NSCT cyber security the same as OS protection and security?

No. They are two separate areas in HEC's competency list. This OS topic covers protection mechanisms (domains, the access matrix and its implementations) and OS-level threats. The Cyber Security MCQs area goes wider, into cryptography, network security, web application security and incident response. Studying this topic first makes the OS-security questions there easier.

What is the difference between an access list and a capability list?

An access list belongs to an object and records which domains may use it and how: one column of the access matrix. A capability list belongs to a domain and records which objects it may use: one row. Access lists make revocation easy; capabilities make access checks fast.

Why are passwords salted?

A salt is a random value stored with each password and mixed into the hash. Users with the same password then get different hashes, and an attacker cannot reuse one precomputed table for every account. Each user must be attacked separately, which multiplies the work by the number of users.

What does the setuid bit do?

When an executable has the setuid bit set, a process running it takes the file owner's user ID as its effective user ID. The real user ID still records who started it. This is how ordinary users run passwd to change their own password in a root-owned file.

Next step

This is the last Operating Systems topic. The previous topic is Input / Output Systems. Revisit the Operating Systems MCQs hub, carry on into authentication and access control, or test yourself in an NSCT mock test.