jueves, 6 de marzo de 2014

Inside your computer

Inside your computer is a TED lesson created by Bettina Bair, walks us through the steps a computer takes with every click of the mouse.

Drop by Inside your computer on TED to read the full lesson (the 'think', 'dig deeper' and 'discuss' sections).

Self-study activity:
Watch the video and complete the sentences below.

The activity is suitable for intermediate 2 students.



1 The BIOS (basic input/output subsystem) is like the computer’s…
2 The CPU’s job is…
3 The CPU can handle ... of instructions a second.
4 Programmes are compiled and stored in memory as…
5 The critical components of your computer’s architecture are…

You  can check your answers by reading the transcript below.

Do you remember when you first realized that your computer was more than just a monitor and keyboard? That between the mouse click and the video playing, there was something that captured your intention, understood it, and made it real? What is that something? Is it gremlins?
Let's imagine that we can shrink down to the size of an electron and inject ourselves into a click of a mouse. If you took your mouse apart, you'd see that it's really a very simple machine. It has a couple buttons and a system for detecting motion and distance. You might have an optical mouse that makes these measurements with lights and sensors, but older ones did this with a hard rubber ball and some plastic wheels. Same concept.
When you click the button on your mouse, it sends a message to the computer with information about its position. When your mouse click is received, it's handled by the basic input/output subsystem. This subsystem acts like the eyes and ears and mouth and hands of the computer (1). Basically, it provides a way for the computer to interact with its environment. But it also acts like a buffer to keep the CPU from being overwhelmed by distractions. In this case, the I/O subsystem decides that your mouse click is pretty important so it generates an interrupt to the CPU.
Hey, CPU! Got a click here.
The CPU, or central processing unit, is the brains of the whole computer. Just like your brain doesn't take up your whole body, the CPU doesn't take up the whole computer, but it runs the show all the same. And the CPU's job, its whole job, is fetching instructions from memory and executing them (2). So, while you're typing, typing, typing, maybe really fast, like 60 words a minute, the CPU is fetching and executing billions (3) of instructions a second. Yes, billions every second: instructions to move your mouse around on the screen, to run that clock widget on your desktop, play your internet radio, manage the files you're editing on the hard drive, and much, much more. Your computer's CPU is one heck of a multitasker!
But, oh my gosh! There's a very important mouse click coming through now! Let's drop everything now and deal with that!
There are programmemes for everything that the CPU does. A special programmeme for the mouse, for the clock widget, for the internet radio, and for dealing with letters sent by the keyboard.
Each programme was initially written by a human in a human-readable programming language, like Java, C++, or Python. But human programmes take up a lot of space and contain a lot of unnecessary information to a computer, so they are compiled and made smaller and stored in (4) bits of ones and zeros in memory. The CPU realizes that it needs instructions for how to deal with this mouse click, so it looks up the address for the mouse programme and sends a request to the memory subsystem for instructions stored there.
Each instruction in the mouse device driver is duly fetched and executed. And that's not nearly the end of the story! Because the CPU learns that the mouse was clicked when the cursor was over a picture of a button on the monitor screen, and so, the CPU asks memory for the monitor programme to find out what that button is. And then the CPU has to ask memory for the programme for the button, which means that the CPU needs the monitor programme again to show the video associated with the button, and so it goes.
And let's just say there are a lot of programmes involved before you even see the button on the screen light up when you clicked it. So, just the simple task of clicking your mouse means visiting all of the critical components of your computer's architecture (5): peripherals, the basic input-output system, the CPU, programmes, and memory, and not one gremlin.