156 / 163 · C11 · 8 min
A Dialogue on Security
This dialogue introduces operating system security, highlighting differences from reliability due to intentional adversaries. It covers the need to protect confidential, intact, and available resources, plus the challenges of dealing with intelligent persistent attackers.
In this lesson
Security Differs from Reliability
Reliability deals with accidental failures or design flaws, such as system crashes. Security must counter opponents who intend to cause damage. These adversaries are intelligent, hostile, tenacious, adaptable, and deceptive, using any means to harm your computer resources.
The Three Security Properties
Confidentiality protects information from unauthorized viewing, for example preventing private notes from leaking. Integrity ensures data is not tampered with, such as stopping a report from being secretly modified. Availability lets you use resources anytime, avoiding being locked out during an important presentation.
Characteristics of Adversaries and Defense
Adversaries are not random; they plan, adapt, and hide their tracks. Operating system security requires comprehensive, ongoing protective measures because attackers continually seek new vulnerabilities to steal, damage, or block resources.
Pitfalls
- Confusing security with reliability, thinking failure prevention is enough.
- Ignoring the adaptability and persistence of adversaries.
Run an example
Minimum C11 · complete program · Download .c
#include <stdio.h>
int main(void) {
printf("OS security goals:\nConfidentiality\nIntegrity\nAvailability\n");
return 0;
}
Compile locally
gcc -std=c11 -Wall -Wextra -Wpedantic -Werror ostep-52-dialogue-security.c -o example && ./exampleExpected result
OS security goals:
Confidentiality
Integrity
Availability
CHECK YOUR UNDERSTANDING
Close the answer. Explain it.
Invent an original scenario with a personal photo collection and describe how the OS can provide confidentiality, integrity, and availability.
Show a reference answer
In a digital photo library, the OS can restrict file reads to the owner via permissions (confidentiality), use cryptographic hashes to detect any changes to images (integrity), and implement backups plus fair scheduling so photos can always be viewed even if the disk is busy (availability).
Check the sources
Drafts and official chapters change. The version mark is only the example’s minimum.