Lesson 10 activities
Activity 10.1
-
Write a computer program that asks the user to type in three numbers, adds them up and then displays the answer on the screen.
-
Explain your program using the input-process-output model.
INPUT
PROCESS
OUTPUT
Activity 10.2 (homework)
Select two actions you complete regularly and describe them in terms of the input-process-output model.
Examples could be:
-
Running a mobile phone app
-
Uploading an image to a social networking profile
INPUT
PROCESS
OUTPUT
INPUT
PROCESS
OUTPUT
Lesson 11 activities
Activity 11.1
Use the function to identify the hardware component.
|
Function
|
Hardware component
|
A temporary storage area for data and program instructions while a program is running
|
|
A microprocessor which carries out the instructions in computer programs by performing arithmetic and logic operations, and controls inputs and outputs
|
|
A persistent data storage area for data and program instructions
|
|
To provide connections to the input and output peripherals such as printers, mouse, keyboard, touch screen, speakers, networks, and so on
|
|
Activity 11.2
This diagram represents the way in which buses connect the main hardware components in a digital computer. Copy and complete the diagram using these labels:
-
CPU
-
Memory
-
Input/output devices
-
Data, control and address bus
Activity 11.3
From the function given, identify and insert the name of the correct bus.
Function
|
Type of bus
|
Sends and receives signals that control the CPU and other parts of the computer system
|
|
Carries the address of memory locations used to store data and program instructions
|
|
Transfers the binary data around the computer
|
|
Activity 11.4
Label the following on the picture of the Raspberry Pi:
-
SD card (memory)
-
CPU processor and RAM memory
-
Ethernet network connection
-
2 USB connectors (mouse and keyboard)
-
HDMI connector for monitor
-
Audio
-
Power supply
Lesson 12 activities
Activity 12.1
Windows is an example of an operating system. List as many other operating systems as you can. Aim for a list of at least five operating systems. Discuss with other class members or use an internet search if you need to.
Activity 12.2
Assuming that the user is the outer circle, use the labels ‘hardware’, ‘application software’ and ‘operating system’ for the other circles to show the role of the operating system.
Activity 12.3
Using a non-networked computer and the operating system of your choice, do the following:
-
make a hierarchy of directories and files
-
remove files and directories
-
rename files and directories
-
change the current working directories
-
view the current working directory.
Here is a list of useful Raspbian (Unix) and Command Line Interpreter (LX Terminal) file and directory commands.
Commands
|
Function
|
pwd
|
Print working directory – display the current directory
|
cd directory
|
Change directory
|
mkdir directory
|
Make a new directory
|
rm file
|
Remove a file
|
touch file
|
Create a new empty file
|
cat file
|
Catalogue a file – list the contents of a file
|
ls -l
|
List the files in the current working directory displaying all the details about the files
|
Activity 12.4
-
Bring up the task manager in whatever operating system you are using (in Windows, control/alt/del).
-
Find the networking information within the task manager (in Windows, choose the networking tab).
-
What happens when the user accesses the network, for example by opening a web page or accessing information on a server?
Activity 12.5
-
Bring up the task manager in whatever operating system you are using (in Windows, control/alt/del).
-
Find the user information within the task manager (in Windows, choose the user tab).
-
List the users who are using your computer. What information can you find out about them?
Lesson 13 activities
Activity 13.1
-
Open up the operating system’s task manager (in Windows, control/alt/delete) and find the list of applications running (in Windows, choose the Applications tab).
-
Now find the information on the processes running (in Windows, choose the Processes tab). Scroll up and down the list to see how many processes it takes to run the operating system and any applications you currently have open.
-
Now open up a few applications, e.g. a web browser, word processor, spreadsheet software, a graphics package.
-
Answer these questions:
-
What happens to the list of applications?
-
What happens to the number of processes running on the computer?
-
Try to explain why there are more processes running than applications running.
Activity 13.2
Your teacher will run this activity. The instructions are here for information only.
Process scheduling – an “unplugged” activity to simulate the scheduling of processes
Requirements
-
Large stick notes
-
White board
-
Two tables
-
Area for process queue
-
Stop watch
-
Pens
-
Two students who represent the operating system (“OS1” will allocate the process ID and time slots, “OS2” will send the next process to the CPU)
-
One student who represents the “CPU”
-
One student who represents the “user” who is running the programs
-
Sixteen other students who represent the programs and applications and who will be the “processes” (just add more programs/applications depending of number of students in group)
Starting positions
-
The “CPU” should sit at a table with a pen and stop watch.
-
“OS1” needs a pen and an empty process table drawn on a whiteboard (add more rows as required:
-
Allocate a queue area where the “processes” will stand in order while they wait to be “executed” after they have been allocated a process ID.
-
The “user” sits at table with a pen and sticky notes.
Running the programs
-
The “user” starts by writing on a sticky note the name of a program or application, in the order given in the table below. The “user” must write program and application names in the same order as they appear in the table below.
Word processor
|
Web browser
|
Sound program
|
Myprog.py
|
Sort.py
|
Word processor
|
Myprog.py
|
Spreadsheet
|
Sort.py
|
Word processor
|
Spreadsheet
|
Web browser
|
Sound program
|
Web browser
|
Sound program
|
Sort.py
|
-
The “user” hands the sticky note on which he/she has written a program or application name to a student who will be that “process”.
-
The “process” goes to “OS1” who allocates the next free process ID from the process table. “OS1” also allocates the correct number of time slots needed to complete the process, according to the table below:
-
Type of process
|
Time slots
|
word processor
|
1 2 3
|
myprog.py
|
1 2
|
sort.py
|
1
|
spreadsheet
|
1 2 3 4
|
web browser
|
1 2 3
|
sound program
|
1 2 3 4 5
|
-
So, if the “process” hands “OS1” a sticky note that says “Word processor”, “OS1” adds a process ID and three time slots “1, 2, 3” to the stick note and hands it back to the “process”. “OS1” must also update the process table on the whiteboard.
-
The “process” joins the back of the queue holding up their sticky note.
-
“OS2” is constantly looking at the queue waiting for a process with a process ID. They send the “process” at the top of the queue to the “CPU” table.
-
Each “process” gets 10 seconds to execute with the “CPU” – when the “process” arrive at the table, “CPU” starts the stop watch, crosses one time slot off the sticky note and then says “Time’s up” after 10 seconds. At this point, the “process” must return to the back of the queue.
-
The “process” should check their sticky note. If all their time slots have been crossed off, they should shout their process ID and “Finished” and then sit down.
-
When “OS1” hears that a process has finished, they should remove that process from the process table
-
If the “process” still has time slots left they go to the back of the queue.
-
Repeat until all the processes have finished.
Alternatives
-
Change the length of the time slice (make it more or less than 10 seconds)
-
Add more or different programs/applications
-
Give the processes a priority which alters their position in the queue
Lesson 14 activities
Activity 14.1
The speed of a computer system is measured in frequency (cycles per second) using the units hertz (Hz). One hertz is one cycle per second. This means that one instruction is executed per second.
For many years computers were measured in megahertz (MHz).
1 megahertz = 1,000 hertz or 1,000 instructions per second.
Modern computers are so fast they are measured in gigahertz (GHz).
1 gigahertz = 1,000,000,000 hertz or 1,000,000,000 instructions per second.
Find the speed of the processor in the computer systems you use and calculate how many instructions they can process each second.
Type of computer
|
Clock speed
|
Instructions per second
|
|
|
|
|
|
|
|
|
|
|
|
|
Activity 14.2
Your teacher will run this activity. The instructions are here for information only.
Resources
Explain that the class is going to act out the role of transistors in a CPU. When they are on they stand up (show ON) and when they are off they sit down (show OFF). (This works best if they are on the floor not on seats).
The pupils should stand apart from each other (stretch arms out so they cannot touch each other). Show the ON and OFF cards slowly to start with, then speed up. Ask how warm the class is feeling (they should be getting warmer just like a CPU).
Then explain that more and more transistors are being placed closer together to make computers faster and able to perform more calculations.
Get the class to stand closer to each other. Then repeat the process getting faster and faster. Ask how warm the class is feeling now.
This demonstrates how CPUs generate heat from the switching of thousands of transistors.
Activity 14.3 (homework)
Watch all of the Royal Institution lecture ‘Breaking the speed limit’: http://www.youtube.com/watch?v=FTpdAjre8LU and then answer these questions.
-
What is a semi-conductor?
-
What is a transistor?
-
Why are “bunny suits” used when manufacturing microprocessors?
-
What is meant by parallel processing?
Lesson 15 activities
Activity 15.1
Check the system settings or search online for the technical specifications of the digital computers that you use. Note down the name and speed of the CPU in each device, as well as whether the CPU is a single core or multi-core processor.
Type of computer
|
Name of CPU
|
Speed (Hertz)
|
Single core or multi-core?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Activity 15.2
Take a screen shot showing the CPU usage. (On Windows 7 select Task Manager (control-alt-del) and select the Performance tab then click on the “Resource Monitor…” button then click on CPU). Label the number of cores and the amount of CPU usage.
Lesson 16 activities
Activity 16.1
The main memory (or RAM) is made up of memory locations. Each memory location has a unique address assigned to it. Data and instructions are stored in memory when programs and applications run.
Place the following data and instructions into the memory location at the correct address:
-
At address 0011 store the ASCII binary for ‘c’
-
At address 0100 store the ASCII binary for ‘a’
-
At address 0101 store the ASCII binary for ‘t’
-
At address 1001 store the binary value for 4
-
At address 1100 store the binary value for 65
-
At address 1110 store the binary value for 201
-
Store the first three letters of your name starting at address 0000
Address
|
Memory location
|
1111
|
|
1110
|
|
1101
|
|
1100
|
|
1011
|
|
1010
|
|
1001
|
|
1000
|
|
0111
|
|
0110
|
|
0101
|
|
0100
|
|
0011
|
|
0010
|
|
0001
|
|
0000
|
|
Activity 16.2
Calculating the maximum capacity of main memory:
A processor with a 4 bit address bus can create 24 (or 16) addressable memory locations
A processor with an 8 bit address bus can create 28 (or 256) addressable memory locations
Calculate the maximum number of addressable memory locations for address buses of the following sizes.
Size of address bus
|
Maximum number of addressable memory locations
|
4 bit
|
16
|
8 bit
|
256
|
16 bit
|
|
32 bit
|
|
64 bit
|
|
Share with your friends: |