C++ / a working model

156 / 163   ·   C11   ·   8 min

A Dialogue on Security

Keep this sentence

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
  1. Security Differs from Reliability
  2. The Three Security Properties
  3. Characteristics of Adversaries and Defense
  4. Example
  5. Exercise

Official chapter PDF

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 && ./example

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

Back to the catalog