do you remember when you first realized
that your computer was more than just a
monitoring 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 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 cbu gotta 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
so while you're typing typing typing
maybe really fast like 60 words a minute
the cpu is fetching and executing
billions 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 programs for everything that
the cpu does
a special program for the mouse for the
clock widget for the internet radio and
for dealing with letters sent by the
keyboard
each program was initially written by a
human in a human readable programming
language like java c plus or python
but human programs 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
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 program and sends a
request to the memory subsystem for
instructions stored there
each instruction in the mouse device
driver is dually 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 program to find
out what that button is
and then the cpu has to ask memory for
the program for the button which means
that the cpu needs the monitor program
again to show the video associated with
the button and so it goes
and let's just say that there are a lot
of programs 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 the critical
components of your computer's
architecture
peripherals the basic input output
system the cpu programs and memory and
not one gremlin
you