Apps never talk to hardware directly. They ask the operating system, and the OS uses a driver for each device, so one app works with any webcam or storage. Because every request goes through it, the OS can also decide which apps may use what.
There are thousands of different webcams, and your video call app works with all of them. How?
A computer runs many apps on many kinds of hardware. The operating system (OS: Windows, macOS, Android, iOS, ChromeOS) sits in between. Apps ask the OS to do things; the OS talks to each device through a driver, a small program that knows that one device.
Predict: Read the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.
Try: Try it on the board and compare the result with your prediction.
Investigate: Work out why it happens, one step at a time.
Modify: Change the problem on purpose and see what happens.
Practise: A few on your own, to check you have it.
Make: Make your own problem using what you have learned. Expect a few tries; that is normal.
Make your prediction first. Help opens once you've locked it in.
PredictRead the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.
A new webcam
TryTry it on the board and compare the result with your prediction.
Try: swap the hardware
Was your prediction right? Read the message under the layers after each press.
Try it yourselfYour edits are saved in this browser.
Start the camera, then swap the webcam and start it again. Save a file, swap the storage and save again. Did the apps change?
Use the board. This ticks when you get there.
InvestigateWork out why it happens, one step at a time.
Worked example: one request
Worked exampleBefore each step, say what you think comes next.
app: "start the camera"The app asks for a camera, not for a particular brand.
OS: is this app allowed?The OS checks its permissions for that app.
OS→driver for webcam BThe OS picks the driver for the webcam that is plugged in.
driver→webcam BThe driver sends that device's own commands.
picture→OS→appThe result comes back up the same way.
Now say what a driver is.
Sam explains why new hardware needs new apps. Click the line where it first goes wrong.
ModifyChange the problem on purpose and see what happens.
Vary: change one thing
Try it yourselfYour edits are saved in this browser.
Swap to webcam B and start the video call. Webcam B's driver is missing. What happens?
Use the board. This ticks when you get there.
Install the driver and try again.
Use the board. This ticks when you get there.
Press the Game's camera button. What does the OS do?
Use the board. This ticks when you get there.
Allow Game to use the camera and try again.
Use the board. This ticks when you get there.
PractiseA few on your own, to check you have it.
The OS
MakeMake your own problem using what you have learned. Expect a few tries; that is normal.
Set up a new computer
Then: on your own phone, find one app with a permission it doesn't need.
Try it yourselfYour edits are saved in this browser.
Need a hint?
The video call should work with webcam B.
Another hint
Webcam B needs its driver.
Another hint
Game doesn't need the camera: leave it off.
Set this computer up: webcam B plugged in and working for the video call, the game NOT allowed to use the camera, and a file saved to the USB stick.
Use the board. This ticks when you get there.
For teachers
Students swap webcams and storage under unchanged apps, install a missing driver and grant or refuse an app's camera permission, to explain how the operating system hides hardware from applications and controls access (AC9TDI10K01 node 1). About 35 minutes.
I can explain what the operating system does between apps and hardware.
I can say what a driver is for.
I can explain how the OS controls what apps may use.
Before class
Try the board yourself.
The one idea: the OS is a layer of abstraction (apps ask for "a camera"; drivers handle each device) and, because it is in the middle, it is the gatekeeper for access. The access idea returns in lesson 3.
Hands-on: show Device Manager (Windows) or System Information (macOS) on a school laptop, and a phone's app permission screen.
Running the lesson
Predict: students who chose "rewrite the app" hold Sam's misconception.
Try: ask what stayed the same and what changed each time.
Worked example: ask who checks the permission, the app or the OS.
Vary: ask why the OS refuses before the camera is even touched.
Make: compare: did anyone give the game camera access, and why not?
The hard part (on purpose)
The layers are invisible in everyday use. Keep pointing at the three rows on the board and ask "who is talking to whom?"
When students get stuck
A student says the app talks to the webcam (Sam's mistake). Ask: Which row does the app's request go to first? Fix: To the OS, which uses the driver.
A student confuses drivers and apps. Ask: Which one would you see on your home screen? Fix: Apps; drivers are hidden inside the OS.
Stretch and support
Stretch: Why can a phone app ask for the camera but not read another app's files? Look up what a sandbox is.
Support: A three-layer diagram card: Apps / Operating system (permissions, drivers) / Hardware.
Where it leads
Next: Names and addresses (DNS and IP).
Where it leads: Who are you, and what may you do? (sign-in and permissions on a shared system).
What each step is for
a new webcam: Committing to what a new webcam means for the app tests the new move: apps talk to the OS, the OS uses a driver, so hardware can change without changing the app.
Try: swap the hardware: Swapping the webcam and the storage and using the same apps settles the prediction: the apps don't change, only the driver the OS uses.
Worked example: one request: Following one request through the layers models the new move, including the OS deciding whether to allow it. Sam thinks apps talk straight to hardware, the misconception planted after the method.
Vary: change one thing: Each task changes one thing: a webcam with no driver, then its driver installed, then the OS refusing an app, then allowing it.
the OS: Spotting the OS's two jobs (hiding hardware, controlling access) in everyday devices, and a review of packets.
set up a new computer: Getting a new computer working with only the access each app needs reverses the process: students start from what should happen and set up drivers and permissions.
Now you can
Explain what the operating system does between apps and hardware.