Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CO&A_L1.doc
Скачиваний:
3
Добавлен:
01.04.2025
Размер:
140 Кб
Скачать
☆

Structure - Top Level.

Computer

Peripherals

Communication

lines

Computer

  • Manages the functioning of the system, and executes functions of data processing;

  • Stores the initial data and all information, which is necessary for data processing

  • Mechanism, which provides data interchange among CPU, MM and I/O

  • Relocate data between the computer and environment in both directions.

Main

Memory

Central

Processing

Unit

Systems

Interconnection

Input

Output

Structure - The CPU

Computer

Memory

System

Bus

CPU

  • Store operative information during the CPU execution of a current operation;

  • Executes all operations concerned with data processing pithiness;

  • Mechanism, which provides joined work of CPU components;

  • Controls CPU’s components functioning

Arithmetic

and

Login Unit

Registers

Internal CPU

Interconnection

CPU

Control

Unit

Structure - The Control Unit

Control

Unit

Registers

Internal

Bus

Control Unit

  • Serves for execution of concrete actions; it has a finite set of internal states and finite set of input meanings;

  • Transforms n-width input binary word into unique signal on one of 2n outputs of this schema;

  • Stores data (a micro-program as a whole), which are directly used by ALU and CU itself. Sometimes it’s realized in a form of gate’s set.

CPU

Sequencing

Login

Control Unit

Registers and

Decoders

Control

Memory

Многоуровневая компьютерная организация.

Электронные схемы каждого компьютера могут распознавать и выполнять ограниченный набор простых (примитивных) команд. Поэтому все программы перед выполнением должны быть превращены в последовательность примитивных. Эти примитивные команды в совокупности составляют язык, на котором люди общаются с компьютером. Такой язык называется машинным языком. Использовать машинный язык утомительно и трудно. Для преодоления этих сложностей стали строиться ряды уровней абстракции (абстракция более высокого уровня надстраивается над абстракцией нижней, здесь под абстракцией понимается набор удобных для человека команд). Такой подход называют многоуровневой компьютерной организацией.

Языки, уровни и виртуальные машины.

Пусть новые (более удобные для человека) команды в совокупности формируют язык Я1. Машинный язык обозначим Я0 (компьютер может выполнять только эти команды). Для того, чтобы выполнить программу, написанную на Я1, необходимо заменить каждую из команд этой программы на эквивалентный набор команд в языке Я0. В результате мы получим программу, которую может выполнить компьютер. Эта технология называется трансляцией.

Допустим в компьютере имеется специальная программа (на Я0), которая “берет” программы, написанные на Я1, в качестве входных данных, рассматривает каждую команду по очереди и сразу подбирает эквивалентный набор команд на Я0 и выполняет их. Такая технология называется интерпретацией. (Программа, осуществляющая интерпретацию, называется интерпретатором).

Представим себе существование виртуальной машины, для которой машинным языком является язык Я1 и обозначим ее М1, а виртуальную машину с языком Я0 – М0. На самом деле М1 можно сконструировать, но с большими затратами. Таким образом, можно писать программы для виртуальных машин и не думать о трансляции и интерпретации. При этом можно создавать языки, которые в большей степени ориентированы на человека: языки Я2, Я3 и т.д., которые является машинными для виртуальных машин М2, М3 и т.д. Изобретение новых языков может продолжаться до тех пор, пока мы не дойдем до подходящего нам языка. Каждый из этих языков будет использовать предыдущий как основу, поэтому компьютер можно рассматривать как систему, состоящую из ряда уровней.

Между языком и виртуальной машиной существует важная зависимость. У каждой машины есть какой-то определенный машинный язык, в сущности, машина определяет язык. Термины «уровень» и «виртуальная машина» будем использовать как синонимы. При этом важно помнить, что только программы на Я0 выполняются компьютером без трансляции. Программисты обычно интересуются только языком уровня Яn, однако для того, чтобы понимать, как работает компьютер, необходимо знать все уровни.

Современные многоуровневые машины.

Большинство современных компьютеров состоят из двух и более уровней. Уровень 0 – аппаратное обеспечение (его электронные схемы выполняют программы на языке первого уровня)). На самом деле существует уровень, лежащий ниже нулевого, но он попадает в сферу электронной техники и нами не рассматривается (это – уровень физических устройств).

Нулевой уровень – цифровой логический уровень (объектами этого уровня являются вентили, каждый вентиль формируется из нескольких транзисторов; группа вентилей формирует 1 бит памяти; биты памяти объединяются в группы и формируют регистры).

Первый уровень – микро архитектурный уровень. На этом уровне имеется совокупность 8 или 32 регистров, которые формируют локальную память и схему АЛУ (арифметико-логического устройства). АЛУ выполняет простые логические операции. Регистры вместе с АЛУ формируют тракт данных (тракт данных состоит из: выбора одного или двух регистров, АЛУ производит действия с данными этих регистров и помещает результат в один из них). Тракт данных может контролироваться специальной микропрограммой, либо аппаратными средствами. Для машин, где тракт данных контролируется программным обеспечением, микропрограмма – это интерпретатор для команд на уровне 2.

Второй уровень – уровень архитектуры системы команд. Он включает команды, которые выполняются микропрограммой-интерпретатором или аппаратным обеспечением.

Третий уровень – уровень операционной системы. Этот уровень имеет гибридный характер. Он может включать команды, имеющиеся на нижних уровнях. Особенностью этого уровня является: наличие новых команд, другая организация памяти, способность выполнять несколько программ одновременно и др. Новые средства, появившиеся на третьем уровне, выполняются интерпретатором, который работает на втором уровне. Этот интерпретатор был когда-то назван операционной системой. Таким образом, одна часть команд третьего уровня (новые команды) интерпретируется операционной системой, а другая (команды идентичные командам второго уровня)-–микропрограммой (вот почему он является гибридным).

Четвертый уровень – уровень языка ассемблера. Этот уровень представляет символическую форму одного из языков более низкого уровня. На этом уровне можно писать программы в приемлемой для человека форме. Эти программы сначала транслируются на язык уровня 1, 2 или 3, а затем интерпретируются соответствующей виртуальной или фактически существующей машиной. Программа, которая выполняет трансляцию, называется ассемблером.

Пятый уровень – Языки высокого уровня. Этот уровень состоит из языков, разработанных для прикладных программистов. Программы, написанные на этих языках, обычно транслируются на уровень 4 или 3. Трансляторы, которые обрабатывают эти программы называются компиляторами (иногда также используется метод интерпретации, например программы на язык Java обычно интерпретируются).

Вывод : компьютер проектируется как иерархическая структура уровней, каждый из которых надстраивается над предыдущим. Каждый уровень представляет собой определенную абстракцию с различными объектами и операциями.

Набор типов данных, операций и особенностей каждого уровня называется архитектурой.

В конце 50-х годов компания IBM решила, что производство семейств компьютеров, каждый из которых выполняет одни и те же команды, имеет много преимуществ и для компании и для покупателей. Чтобы описать уровень совместимости таких компьютеров IBM ввела термин архитектура. Новое семейство компьютеров должно было иметь одну общую архитектуру и много разных разработок, различающихся по цене и скорости (при этом они могли выполнять одни и те же программы). Это достигалось с помощью интерпретации (такую технологию предложил Уилкс в 1951 году). Аппаратное обеспечение без интерпретации использовалось в самых дорогих компьютерах.

Развитие многоуровневых машин.

Аппаратное обеспечение состоит из осязаемых объектов: интегральных схем, печатных плат, кабелей, источников электропитания, запоминающих устройств и устройств ввода/вывода.

Программное обеспечение состоит из подробных последовательностей команд и их компьютерных представлений.

Вначале граница между АО и ПО была очевидной. Со временем эта граница стала размытой.

В действительности АО и ПО логически эквивалентны: любая операция, выполняемая ПО, может быть встроена в АО (желательно после того, как она создана) и, - наоборот.

Решение разделить функции АО и ПО основано на таких фактах, как стоимость, скорость, надежность, а также частота ожидаемых изменений, однако существует несколько жестких правил, которые определяют, что должно принадлежать АО, а что – ПО.

Multilevel computer organization.

Electronic circuits of every computer can identify and execute a limited set of simple (primitive) instructions. That is why all the programs must be transformed in a sequence of simple ones. These primitive instructions in totality compose a language in which people communicate with a computer. Such language is called the machine language. It is very difficult and tiresome to use such languages. In order to overcome these difficulties series of abstract levels were constructed (an abstraction of the higher level is build over of the lower one, here under abstraction a set of convenient for user languages is meant). This approach is called multilevel computer organization.

Languages, levels and virtual machines.

Let the new (more convenient for user) instructions in totality form a language L1. The machine language we letter as L0 (the computer can execute only these instructions). In order to run the program in L1 language it is necessary to replace each instruction of this program by an equivalent set of instructions in the language L0. As a result we’ll get a program, which can be executed by the computer. This technology is called translation.

Let’s assume that there is a special program (in L0), which “takes” programs in L1 as data, considers each instruction in turn and immediately chooses the equivalent set of instructions in language L0 and executes them. Such technology is called interpretation. (The program, which executes interpretation is called an interpreter).

Let’s imagine an existence of a virtual machine, which has a machine language L1 and letter it as M1, and virtual machine with a language L0 as M0. In fact M1 may be built, but with large expenditures. So, it is possible to create programs for virtual machines and don’t worry about translation and interpretation. It is possible to create such languages, which are mostly oriented on users: L2, L3, . . . , Ln, which are machine languages for virtual machines M2, M3 and so on. Invention of new languages may continue till the last will satisfy user’s demands. Each of these languages will use previous as a base, that is why it is possible to consider computer as a system, which consists of levels series.

There is an important relation between the language and the virtual machine. Every machine has got certain machine language, and the machine indeed determines the language. We will use terms “level” and “virtual machine” as synonymous . It is important to remember that only program in L0 can be executed by the computer without translation. Programmers are usually interested in language Ln only, but for those , who wont to understand how does the computer work it is necessary to know all the levels.

Contemporary multi-levels machines.

The majority of contemporary computers include two and more levels (up to six levels). The zero level is hardware (its electron circuits execute programs in language of the first level). In fact there is one more level below zero one, but it belongs to the sphere of electronic engineering and we will not consider it here (it is a level of physical devices).

The zero level is the digital-logic level (its objects are gates; every gate is constructed from some transistors; a group of gates forms 1 bit of memory; groups of gates are united in another groups and form registers).

The first level is called micro architecture level. There are 8 or 32 registers and ALU (arithmetic-logic unit) on this level, the registers form local memory. ALU performs simple logic and arithmetic operations. Memory registers and ALU altogether form data tract (data tract consists in selection of one or two registers, ALU executes some operations with data of these registers and places result in some of the registers). The tract may be controlled by a special micro instruction or by the hardware facilities. For machines in which the data tract is controlled by the micro program the last is called an interpreter for instructions for the second level’s programs.

The second level is the level of system instructions architecture. It includes instructions which are executed by the micro program interpreter or by hardware.

The third level is called the operation system level. It may include instructions which belong to the lowest levels. The peculiarity of this level: the presence of new instructions; the use of another memory organization; the ability to execute many programs simultaneously and others. So, a part of instructions of the third level (new instructions) is interpreted by the operational system, and the other one (instructions identical to instructions of the second level) is interpreted by micro program (that is why this level has a hybrid character).

The forth level is the level of assembly language. This level represents a symbolic form (not digital) of one of the languages of lower levels. On this level it is possible to write programs in an acceptable to users form. These programs are translated first on some of languages of levels 1, 2 or 3, and after this they are interpreted by corresponding virtual or really existed machine (most of the programs of 4th level are supported by a translator; programs of 2nd and 3rd levels are interpretable). The program which fulfills the translation is called assembler.

The fifth level is the High Level Languages. This level consists of languages which were created for the applied programmers. Programs in such languages are usually translated into the 4th or 3rd level. Translators, which processed these programs are called compilers (sometimes the method of interpretation is used; e.g. programs in Java language are usually interpreted).

Inference: computer is usually designed as a hierarchy structure of levels each of which is built over the preceding. Every level represents a certain abstraction with different objects and operations.

The set of data types, operations and specifications of every level is called architecture.

At the end of 50-th the IBM company decided, that manufacturing of computer families, where every computer executes the same instructions, has many preferences as for the company, so for customers. In order to describe the level of compatibility of such computers the IBM introduced the term architecture. The new family of computers should have the same common architecture and many different elaboration, which are distinguished by prices and velocities (with it all they can perform the same set of programs). It was realized with help of interpretation. The hardware instead of interpretation was used in the most expensive computers.

Development of multilevel machines.

Hardware consists of tangible objects: integration circuit boards, cables, power supply, storage units, input/output devices.

Software consists of detail sequences of instructions and their computer presentations (i.e. programs).

At first there was a legible border between hardware and software. Eventually this border has become obliterated.

In reality hardware and software are logically equivalent: any operation which is executed by software can be mounted in hardware (it is advisable after it has been carried out), and vice versa.

The decision of hardware-software functions disintegration is based on such facts as: cost, velocity and frequency of anticipated changes, but there are some strict regulations which determine what must belong to hardware and what to software.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]