OS function: providing a platform for running applications

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

OS function: providing a platform for running applications

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which statement describes how an application uses the printer?
A It controls the printer hardware directly without the OS
B It asks the operating system to print, and the OS controls the printer
2. What does it mean when the OS provides a 'platform' for applications?
A It gives apps a standard environment and shared services to run on
B It turns every app into part of the hardware
3. A word processor needs to save a file. What does it do?
A It sends a request to the OS to save the file
B It writes straight to the storage device's circuits
4. Why can the same app run on computers with different hardware?
A The OS handles the hardware differences, so the app only deals with the OS
B The app contains code for every possible hardware device
5. A game is written for Windows. What is likely to happen if you try to install it on macOS?
A It will always run, because all operating systems work the same way
B It may not run, because it was written for a specific operating system

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1platform Aapp -> OS -> hardware
2app asks OS to save file BThe OS gives a standard environment, so one app can run on different hardware. The OS and its drivers deal with the printer differences.
3An application does not control hardware directly: it sends a request to the OS and the OS uses the hardware CThe application requests a service from the OS, which then uses the storage hardware on its behalf
4Applications written for a specific operating system will only run on that OS, for example a Windows app on Windows Dapp_for_Windows.exe runs on Windows
5Application -> hardware (no OS involved) EThe standard environment and shared services the OS provides so applications can run without controlling hardware themselves
6Each app needs its own code for every brand of printer FApplications do not control hardware directly. The request must go through the OS: Application -> OS -> hardware.

Definitions

platform

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
Application -> OS -> ________
2.
document = "report.docx" __.Print(document)
3.
app.requires = "Windows" IF OS.name _ app.requires THEN RUN app
4.
app.directAccess = _____ app.requestVia = OS
5.
app = "Browser" hardware = "tablet" OS.Run(___, hardware)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A disk.openFile("a.txt")
B OS controls the disk drive
C OS returns data to the app
Question 2
A app <- WordProcessor
B request OS.print(doc)
C app sends data to the printer
Question 3
A PC1 <- Windows, 8GB RAM
B PC2 <- macOS, 16GB RAM
C app runs on PC1 and PC2
Question 4
A IF appOS <> userOS THEN
B RUN app
C ELSE
D OUTPUT "Not compatible"
E ENDIF
Question 5
A request OS.allocateMemory(5)
B request OS.readKeyboard()
C GPU.drawWindow(app)

Answer Key

OS function: providing a platform for running applications
Section A: Quick Questions
Q1
B — It asks the operating system to print, and the OS controls the printer
Q2
A — It gives apps a standard environment and shared services to run on
Q3
A — It sends a request to the OS to save the file
Q4
A — The OS handles the hardware differences, so the app only deals with the OS
Q5
B — It may not run, because it was written for a specific operating system
Section B: Match the Pairs
Q1
platform → The standard environment and shared services the OS provides so applications can run without controlling hardware themselves
Q2
app asks OS to save file → The application requests a service from the OS, which then uses the storage hardware on its behalf
Q3
An application does not control hardware directly: it sends a request to the OS and the OS uses the hardware → app -> OS -> hardware
Q4
Applications written for a specific operating system will only run on that OS, for example a Windows app on Windows → app_for_Windows.exe runs on Windows
Q5
Application -> hardware (no OS involved) → Applications do not control hardware directly. The request must go through the OS: Application -> OS -> hardware.
Q6
Each app needs its own code for every brand of printer → The OS gives a standard environment, so one app can run on different hardware. The OS and its drivers deal with the printer differences.
Section C: Definitions
Q1
platform — The OS provides a platform: a standard environment and shared services that apps ask for, so a program uses hardware through the OS instead of controlling it directly.
Section D: Fill in the Blanks
Q1
Application -> OS -> Hardware
Q2
document = "report.docx" OS.Print(document)
Q3
app.requires = "Windows" IF OS.name = app.requires THEN RUN app
Q4
app.directAccess = FALSE app.requestVia = OS
Q5
app = "Browser" hardware = "tablet" OS.Run(app, hardware)
Section E: Spot the Error
Q1
A — An app must not control hardware directly. It should ask the OS for the service, so line 1 should be request OS.openFile("a.txt").
Q2
C — The app only requests printing. The OS sends the data to the printer through its driver, so the app does not send it directly.
Q3
B — The same OS gives the app the same platform on different hardware. With a different OS, the Windows app would not run, so PC2 should be Windows.
Q4
A — An app written for one OS runs only when the user's OS matches. The test should be appOS = userOS, not <>.
Q5
C — The app must not call the graphics hardware directly. It should ask the OS: request OS.drawWindow(app).