Basic Systems and Software. Were we left off Computers are programmable (formal) machines. Digital...
-
Upload
caitlin-curtis -
Category
Documents
-
view
215 -
download
0
Transcript of Basic Systems and Software. Were we left off Computers are programmable (formal) machines. Digital...
Basic Systems and Software
Were we left off
• Computers are programmable (formal) machines.
• Digital information is stored as a series of two states (1 and 0, on and off, yes and no, true and false).
• There are various types of memory in the computer.
But how does it work?
• How are programs written?
• How do you tell the computer what to do?
• How does the computer follow your commands?
• How does the computer make decisions?
Based on the CPU
• The CPU is the brains of the computer, a tiny chip that gives the computer the ability to follow instructions (and become another machine).
Intel Pentium
Instruction
What does the CPU do?
CPUInstruction
Input Output
What is the CPU connected to?
CPU
RA
M
memory
I/ODisksKeyboardMonitorInternetPorts
Where are the instructions?
CPU
RAM
ADD a, bPUT in cMULT c, d.PUT on screen
Programs are stored in RAM and read one
instruction at a time to the CPU
c
5a
2b
8d
What it really look like…
CPU
RAM
0010 0011 01000011 01010001 0101 0110.0011 1110
Programs are stored in RAM and read one
instruction at a time to the CPU
01010011
0010 01000100 0101 0110
1110
1000
Program counter
How does the CPU think?
• A list of instructions does not make a computer think unless it can make decisions. Here is an example:
What is the value of d when the program is done, when a = 20 and b = 10?
ADD A,B PUT B TST B,100 IFG 5 MPC 001 PUT D000 001 002 003 004 005
So what is the operating system?
• The Operating system helps other programs work without so much detail.
• Controls how different programs are allocated memory and CPU time.
• Makes dealing with different hardware components transparent to the programs.
Picture it like this
A Program
B Program…
Print AOpe
rati
ng S
yste
m
CPUProgram counter
Multitasking
• Sometimes your computer wants to do many things at one time to utilize the CPU to its fullest. This is called multitasking.
• The Operating system usually facilitates many programs running at once.
• The Unix operating system allocates a very small amount of time to each program and each is forced to take its turn. It does this with the use of an interrupt.
Problem with Windows
• Early versions of DOS had no multitasking.
• Windows had some, but allowed programs to give up the processor freely.
• Sometimes windows can not force a program to quit.
• Why is this a problem?
Advantages of Multitasking
• Disk I/O is very slow compared to other work for the CPU, so while it is waiting it can do something else. (microwave example).
• Programs running too long can be stopped.
• You can work on interacting, real-time programs at the same time.
What happens when the computer runs out of memory
• The operating system normally handles something called “virtual memory”.
HARD DISKRAM
Virtual Memory
CPU