Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Позааудиторне читання 2 курс КН.doc
Скачиваний:
1
Добавлен:
05.09.2019
Размер:
1.34 Mб
Скачать

Input/Output Storage

When you enter new data, the keystrokes must be stored until the computer can do something with the new data. When you want data printed out or displayed, it must be stored somewhere handy first.

Main Memory

This is where the computer stores the data and commands that are currently being used.

When the computer is turned off, all data in Main Memory vanishes. A data storage method of this type is called volatile since the data "evaporates."

Note on the left the various kinds of data that are stored. The CPU can fetch one piece of data in one machine cycle.

Operating System

This is the instructions that the computer uses to tell itself how it "operates". It's the answer to "Who am I and what can I do?"

Some common operating systems are DOS, various versions of Windows, OS/2, UNIX, LINUX, System 7. These all behave in very different ways and have different hardware requirements. So they won't all run on all machines.

Unused Storage

One hopes that there is always some storage space that is not in use. If space runs out in Main Memory, the computer will crash, that is, stop working.

There are programs that sense when space is getting short and warn the user. The user could then close some of the open applications to free up more space in Main Memory. Sometimes the warning is too late to prevent the crash. Remember that all the data in Main Memory vanishes when the power goes off. Thus a crash can mean a lot of lost work.

Working Storage

The numbers and characters that are the intermediate results of computer operations must be stored until the final values are calculated. These values "in progress" are kept in temporary locations.

For example, if the computer is adding up the numbers 3, 5, and 6, it would first add 3 to 5 which yields a value of 8. The 8 is stored in working storage. Then the 8 and 6 are added and the new value 14 is stored. The value of 14 is now available to be displayed on the screen or to be printed or to be used in another calculation.

Machine Cycle

The computer can only do one thing at a time. Each action must be broken down into the most basic steps. One round of steps from getting an instruction back to getting the next instruction is called the Machine Cycle.

The Machine Cycle

Fetch -

get an instruction from Main Memory

Decode -

translate it into computer commands

Execute -

actually process the command

Store -

write the result to Main Memory

For example, to add the numbers 5 and 6 and show the answer on the screen requires the following steps:

1.

Fetch instruction:

"Get number at address 123456" 

2.

Decode instruction.

3.

Execute:

ALU finds the number. (which happens to be 5)

4.

Store:

The number 5 is stored in a temporary spot in Main Memory.

5 - 8  Repeat steps for another number (= 6)

9.

Fetch instruction:

"Add those two numbers"

10.

Decode instruction.

11.

Execute:

ALU adds the numbers.

12.

Store:

The answer is stored in a temporary spot.

13.

Fetch instruction:

"Display answer on screen."

14.

Decode instruction.

15.

Execute:

Display answer on screen.

The immense speed of the computer enables it to do millions of such steps in a second. In fact, MIPS, standing for millions of instructions per second, is one way to measure computer speeds.