Week 4 · Lesson 1 · 55 minutes

What an operating system does

I can connect an OS function to a user need.

Planned lesson. Follow your teacher’s teaching order.

Source workbook pages: 24.

Resources

Vocabulary

Vocabulary
operating system: software that manages resources and provides services; abstraction: hiding details behind a usable interface
55-minute lesson sequence
  1. 0–5 · Retrieve volatility.
  2. 5–15 · Model a file request through the four-layer diagram.
  3. 15–25 · Guide the saving and printing examples, naming more than one service.
  4. 25–45 · Students complete remaining matches and draw/explain the shared-file request.
  5. 45–50 · Each student checks the other’s separation of interface and OS.
  6. 50–55 · Collect the desktop-interface exit explanation.

Try before notes

Name one volatile and one non-volatile type of memory or storage.

Build the idea

The operating system manages resources and provides services that applications can request. An app can ask to open a file without directly controlling each storage operation. This is an abstraction: a useful interface hides hardware detail.

Memory management allocates and protects working memory. Scheduling shares processor time. File and device management coordinate storage and peripherals. Authentication and permissions limit who can do what. One action can require several services.

The desktop is one interface to the OS, not the whole OS. A computer can provide services without a graphical desktop. Explain a function by connecting it to a user action and the resource it manages.

user → application → OS services → hardware

See the method

An app can request a file without controlling each disk operation. The OS provides that abstraction. It manages memory, files, devices and process scheduling. It also supports security, accounting of resource use, a user interface, virtualization and networking. These functions cooperate; one action can use several services.

Predict then reveal

A music app plays while a document saves. Name two OS jobs and why each matters.

Reveal reasoning

Scheduling allocates CPU time so both processes can progress. File/device services arrange the storage write and audio output. Memory management also keeps their working data available and separated.

Why should a note-taking app not read a password manager’s memory freely?

Reveal reasoning

Memory protection should stop an unrelated process accessing another process’s private data. Without isolation, an app could expose secrets or corrupt another program’s state. The OS helps enforce access boundaries.

Work one step together

Read the first task. Each learner predicts the first step privately. Compare the method, then complete one intermediate row or one code iteration together. Do not display a finished workbook answer.

Practice

  1. Match each situation to OS functions and explain: saving a file; printing while editing; signing in; running a virtual machine; measuring CPU use. Use more than one function when needed.

Your turn

Complete the remaining steps of task 1 alone, then the next tasks. Predict before running code. Save your own evidence before comparing.

Practice

  1. Match each situation to OS functions and explain: saving a file; printing while editing; signing in; running a virtual machine; measuring CPU use. Use more than one function when needed.
  2. Draw user → application → OS → hardware. A photo app wants to open a file on a shared drive. Explain three jobs the OS could perform. Why should an app not freely read every other app’s memory?

Check and explain

A graphical interface is not the complete operating system.

Point to the first step, row, condition or requirement that supports your answer. If results differ, find the first different state and repair one cause.

Show what you know

Is the desktop interface the whole operating system?

HL challenge when ready

What is a benefit and a limit of virtualization?

Week 4 homework

Show working. Keep code and output. Stop at 25 minutes and mark where you reached.

  1. All jobs arrive at 0 in order A,B. A needs 5 units and B needs 2. Draw FCFS and round robin with quantum 2. Ignore switch cost. Give completion times. Python retrieval: start queue = ["A","B","C"]. Move unfinished A from front to back. Predict, then print the queue.
  2. A device generates rare events while its controller sleeps. Recommend polling or interrupts with one benefit and one limitation.
  3. Explain one deadlock using two processes and two resources. Give a change that breaks the problem.
  4. Explain why a bytecode interpreter and a compiler can both be part of one language implementation.

Source workbook pages: 29.

Weekly homework (Word)

Python practice · two short prompts

Spend about 3 minutes on each during practice time. Predict, run, change one thing, then explain. These prompts do not add homework.

A starter is runnable code to explore or complete. If the playground restores your saved code, the linked starter is selected in Example: use Load example when ready. Download your work before confirming replacement.

Prompt 1

Look up a user’s permission before allowing a write. Test a second user.

No imports needed.

Hint and starter code

A dictionary maps keys to values. This is a permission model, not an operating-system security control.

# A dictionary maps keys to values.
permissions = {"student": "read", "editor": "write"}
user = "student"
print(permissions[user] == "write")
Open this starter in Python playground →
Prompt 2

Choose the first ready process from a queue. Handle an empty queue safely.

No imports needed.

Hint and starter code

A process is a running program; pop(0) removes and returns the first item.

# A process is a running program; pop(0) removes and returns the first item.
ready = ["A", "B"]
if ready:
    print(ready.pop(0))
else:
    print("idle")
Open this starter in Python playground →