{"base":{"id":"cs10-18","subject":"Computer systems","title":"Operating systems and interrupts","scene":"mix","steps":[{"use":"sys9","mode":"os","eyebrow":"The operating system","title":"Managing everything","body":"The operating system sits between apps and hardware. It manages memory, files, devices, security and the user interface. Open, save and print a file and see who does what.","actions":[{"id":"open","label":"Open"},{"id":"save","label":"Save"},{"id":"print","label":"Print"}]},{"use":"chip","mode":"manage","eyebrow":"Multitasking","title":"Sharing memory and time","body":"The OS shares the processor between programs so fast that they all seem to run at once, and gives each its own part of memory. Launch and close apps.","actions":[{"id":"launch","label":"Launch an app"},{"id":"close","label":"Close an app"}]},{"use":"sys10","mode":"interrupt","eyebrow":"Interrupts","title":"Stop and deal with it","body":"An interrupt is a signal that needs the processor's attention right now: a key press, a printer out of paper, a timer. Send one and step through what happens.","actions":[{"id":"key","label":"Press a key"},{"id":"step","label":"Show the next step"}]},{"use":"sys9","mode":"utils","eyebrow":"Utility software","title":"Keeping the system working","body":"Utilities are small programs that maintain the computer: antivirus, backup, defragmentation and compression. Try each one.","actions":[{"id":"u0","label":"Antivirus"},{"id":"u1","label":"Backup"},{"id":"u2","label":"Defragment"},{"id":"u3","label":"Compress"}]},{"use":"sys10","mode":"quiz","look":"interrupt","eyebrow":"Check yourself","title":"What happens first?","body":"A printer runs out of paper while the CPU is running a game.","question":"What does the CPU do when the interrupt arrives?","options":["Stops instantly and loses the game","Finishes its current instruction, saves its state, then handles it","Ignores it until the game ends"],"answer":1,"right":"Correct. It completes the current instruction, saves the registers, runs the interrupt service routine, then restores and carries on.","wrong":"Not quite. The CPU must be able to return to exactly where it was."}],"more":[{"type":"cards","id":"worked","eyebrow":"Worked examples","title":"Step by step","items":[{"tag":"Interrupt steps","title":"Handling a keyboard interrupt","body":"1. device sends interrupt signal\n2. CPU finishes current instruction\n3. checks priority of the interrupt\n4. saves registers (state) on the stack\n5. runs the interrupt service routine\n6. restores registers, carries on","code":true},{"tag":"Apps vs OS","title":"Who does what?","body":"app: \"save my essay\"\nOS: finds space on disk, writes the file, updates the folder","code":true}]},{"type":"cards","id":"detail","eyebrow":"The ideas in detail","title":"The ideas in detail","items":[{"tag":"Memory management","title":"Space for every program","body":"Allocates RAM to programs, keeps them apart, and uses virtual memory when RAM is full."},{"tag":"File management","title":"Folders and permissions","body":"Names, saves, moves and deletes files; controls who can open them."},{"tag":"Peripheral management","title":"Drivers","body":"Uses device drivers to talk to printers, cameras and keyboards, and handles their interrupts."},{"tag":"Security and interface","title":"Users and screens","body":"User accounts and passwords; a graphical (GUI) or command-line interface."}]},{"type":"cards","id":"mistakes","eyebrow":"Common mistakes","title":"Watch out for these","items":[{"tag":"Mistake","title":"\"Apps talk to hardware directly\"","body":"Apps ask the OS, which uses drivers to control the hardware."},{"tag":"Mistake","title":"\"An interrupt stops the program for good\"","body":"The program is paused and resumes once the interrupt is handled."},{"tag":"Mistake","title":"\"Utility software is the OS\"","body":"Utilities are separate maintenance programs, often supplied with the OS."},{"tag":"Mistake","title":"\"Multitasking means two things at the same instant\"","body":"On one core the OS switches very quickly between tasks; it only looks simultaneous."}]},{"type":"cards","id":"deeper","eyebrow":"Go deeper","title":"More than the lesson","items":[{"tag":"Real world","title":"Phones are computers too","body":"Android and iOS are operating systems managing apps, battery, sensors and permissions just like desktop systems."},{"tag":"Real world","title":"Software interrupts","body":"Programs can trigger interrupts too, for example when dividing by zero or asking the OS for a file."},{"tag":"Careers","title":"Who builds operating systems?","body":"Systems programmers write kernels and drivers; IT support staff configure and troubleshoot operating systems daily."},{"tag":"Coming next","title":"Where this leads","body":"Next: the translators and tools programmers use to turn code into machine code."}]},{"type":"cards","id":"challenge","eyebrow":"Challenge yourself","title":"Stretch your brain","intro":"Try each one on paper before opening the card.","items":[{"tag":"Challenge","title":"Why do interrupts have priorities?","body":"Some events are more urgent: a power failure warning must be handled before a key press. The CPU deals with higher-priority interrupts first."},{"tag":"Challenge","title":"Explain why defragmentation helps hard disks but not SSDs.","body":"On a hard disk, scattered file pieces mean the head must move around; joining them speeds reading. SSDs have no moving parts, so scattered data is just as fast, and extra writing wears them out."}]},{"type":"activities","id":"try","eyebrow":"Try it at home","title":"Try it yourself","items":[{"title":"OS tour","time":"15 minutes","need":["A computer"],"steps":["Find where you can see running programs and memory use.","Find the list of installed drivers or devices.","Find user account settings.","Note which OS job each screen shows."],"why":"Every menu you explored is part of the OS doing memory, device, user or file management.","safety":"Look, don't change settings."},{"title":"Interrupt role-play","time":"10 minutes","need":["Three friends"],"steps":["One person reads a story aloud (the CPU).","Others ring a bell or hold up a card (interrupts) at random.","The reader must finish the sentence, note the page, deal with the interrupt, then continue.","Try giving some interrupts higher priority."],"why":"Finishing the sentence and noting the page is like completing the instruction and saving state.","safety":"No safety risks."}]},{"type":"quiz","id":"quiz","eyebrow":"Quiz","title":"Eight more questions","questions":[{"question":"Which is a job of the operating system?","options":["Writing essays","Designing logos","Managing memory"],"answer":2,"right":"Correct.","wrong":"Not quite."},{"question":"What is a device driver?","options":["Software that lets the OS control a device","A person who fixes PCs","A type of cable"],"answer":0,"right":"Correct.","wrong":"Not quite."},{"question":"An interrupt is…","options":["a virus","a signal needing the CPU's attention","a type of memory"],"answer":1,"right":"Correct.","wrong":"Not quite."},{"question":"Before handling an interrupt, the CPU…","options":["deletes the program","restarts","saves its current state"],"answer":2,"right":"Correct.","wrong":"Not quite."},{"question":"Which is utility software?","options":["Antivirus","A web browser","A game"],"answer":0,"right":"Correct.","wrong":"Not quite."},{"question":"A GUI is…","options":["a type of RAM","a graphical user interface","a network"],"answer":1,"right":"Correct.","wrong":"Not quite."},{"question":"Multitasking on one core works by…","options":["running all tasks at the same instant","using two screens","switching between tasks very quickly"],"answer":2,"right":"Correct.","wrong":"Not quite."},{"question":"Which can cause an interrupt?","options":["A printer running out of paper","A closed window","A long file name"],"answer":0,"right":"Correct.","wrong":"Not quite."}]},{"type":"checklist","id":"check","eyebrow":"Self-check","title":"I can…","items":["list the main jobs of an operating system","explain how the OS manages memory and files","explain the role of device drivers","explain multitasking","describe what an interrupt is, with examples","describe how the CPU handles an interrupt","give examples of utility software and their jobs","explain the difference between application, system and utility software"]},{"type":"keywords","id":"words","eyebrow":"Key words","title":"Words to know","items":[{"word":"operating system","meaning":"Software that manages hardware and runs applications."},{"word":"application software","meaning":"Programs for user tasks."},{"word":"utility software","meaning":"Programs that maintain the computer."},{"word":"device driver","meaning":"Software that controls a specific device."},{"word":"interrupt","meaning":"A signal requesting the CPU's attention."},{"word":"interrupt service routine","meaning":"The code that handles an interrupt."},{"word":"multitasking","meaning":"Running several programs apparently at once."},{"word":"GUI","meaning":"Graphical user interface."},{"word":"defragmentation","meaning":"Rearranging file pieces on a hard disk."},{"word":"kernel","meaning":"The core part of the operating system."}]},{"type":"sources","id":"sources","title":"Sources","items":["BBC Bitesize, GCSE Computer Science: Operating systems","Isaac Computer Science: Interrupts","Linux Foundation: What is the kernel?","Microsoft Learn: Device drivers overview"]}]},"overlay":null}