CSE Roadmap

Core tier · about 3 hours · 7 parts

Part 2 of 7 · 2 min read

Protection and security

Think of a building with locks on the doors. Locks are a mechanism, and the decision of who gets a key is a policy. A thief may still enter by a window, bribe a guard, or copy a key. The analogy stops in one place: a building's guards are people who can use judgement, while the OS follows rules without judgement.

In plain words: Protection is the set of mechanisms that control which processes and users may use which resources. Security is the larger goal of defending a system against misuse, which includes protection and also passwords, networks, people and physical access. Three goals are usual. Confidentiality means that data is read only by those allowed. Integrity means that data is changed only by those allowed. Availability means that the system stays usable. Protection supports all three. Level 0 already separated policy from mechanism: the OS offers the mechanism, and an administrator sets the policy.

A worked example (made up to show the idea). A payroll file must be read and written by the payroll clerk (integrity and confidentiality), read by the auditor (confidentiality), and be available when salaries are paid (availability). If any user could write it, integrity would fail. If a program filled the disk with junk, availability would fail even though no one read or changed the file.

The key lines. The OS cannot know the purpose of each user. It enforces the rules that were set, and the rules must be right. Most real incidents come from wrong rules or from software that has more rights than it needs, and the rest of this level is about both.

Protection

Protection is the set of kernel mechanisms that decide whether a given process or user may use a given resource, such as a file, a region of memory or a device. The mechanisms enforce a policy that is set outside them.

Example: the kernel refuses a read of a file when the process's user has no read right on it.

Check yourself: 1. What is the difference between protection and security? 2. Name the three goals of security. 3. Which goal fails when a program fills the disk with junk?