computer organizaiton (week 3) Flashcards

1
Q

what is a program

A

program is a source file that contains many lines of instructions.

it is written in a high level programming language such as C, java, python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how are programs executed

A

high level language –> low level language (assembly language) –> machine language(binary)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

computers execute ______

A

machine language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the von Neumann architecture

A

Has a fixed set of electronic parts, which can be manipulated to perform various tasks determined by a variable program.

The parts are:
- cpu
- primary memory unit
- collection of I/O devices
- buses to interconnect the components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what does the CPU contain?

A

ALU
control unit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what does the ALU do

A

–> responsible for performing artihmetic and logical operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ALU comprises of ?

A

–> comprises of functional unit that performs operations

–> registers that loads and saves data to and from the primary memory. 32 to 64 bit registers to hold 32-bit data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how are computations accomplished in ALU

A

–> Loading binary values into registers
–> performing operations on the registers using the function unit
–> storing the result back into a general register
–> saving the register contents back into memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the control unit

A

causes a sequence of instruction to be stored in memory to be retrieved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does the control unit comprise of?

A

fetch unit
decode unit
execute unit
instruction registrar
program counter register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

control unit works based on the __________ cycle

A

fetch execute cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is fetch unit

A

fetches an instruction from memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is decode unit

A

decode an instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is execute unit

A

signals ALU to execute instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is instruction registrar

A

contains a copy of the current instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is program counter registrar (PCR)

A

contains the memory address of the next instruction the unit is to load.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What happens in the fetch phase of the control unit operation

A

Instructions are retrieved from the memory

18
Q

What happens during the execute phase of the control unit

A

ALU operations start happening

Cause memory data reference, I/O operations

19
Q

What is the primary memory unit

A

Stores both programs and data while they are being operated on by the cpu

20
Q

Interface between memory and cpu consists of _______ registers

A

3

21
Q

What are the 3 interfaces that memory and cpu interface consist of

A

Memory address register
Memory data register
Command register

22
Q

Primary memory unit is also referred to as

A

Random access memory

23
Q

How does primary memory unit store data

A

Stores programs and data in binary format

24
Q

What is the memory address register

A

Stores addresses of data to be read from or written to

25
Q

What is memory data register

A

Stores data that is read or to be written

26
Q

What is command register

A

Stores the command to be executed

27
Q

How does the primary memory work

A

Load mar with data

Load command with read
Data will appear in mdr

28
Q

What is device controller

A

Each device is controlled by a device controller

The device controller connects the device to the computers’ address and data bus

Provides an interface that the OS (device manager) can use to manipulate the device

29
Q

______ varies among controllers

A

interface

30
Q

OS provides ______ to hide the differences from the programmer

A

abstractions

31
Q

what does the device driver provided by controller do ?

A

Allows the OS to operate and synchronize its behaviour with the device operation

32
Q

how to determine when the I/O is complete

A

2 ways:
polling
Interrupt

33
Q

what does the device controller include as part of the interface

A

data registeres
command registers
status flags which includes done, busy or error

34
Q

what is polling

A

–> simplest way to keep polling the device to see the state of the I/O

–> device implements the status of the device as a flag

–> If the I/O is not done, the CPU executes a busy wait command to wait for the I/O to end, but the CPU is effectively waiting and doing nothing

35
Q

what is the advantage of polling

A

it is a simple implementation

36
Q

what is the disadvantage of polling

A

waste of CPU resource

37
Q

what is interrupt

A

–> CPU implements an interrupt request flag

–> when the device IO is completed, the device sets the interrupt request flag to signal the end of the IO

–> CPU, on its fetch cycle, would detect the flag and proceed to execute a set of routines to service the IO

38
Q

what is advantage of interrupt

A

minimize the cpu idle time

no need to keep polling the device

39
Q

what is the disadvantage of interrupt

A

complex implementation

40
Q

what is dma

A

dma stands for direct access memory and it allows data transfer between I/O devices and memory without CPU intervention.

cpu can start a dma block transfer and then
perform other work in parallel with the DMA
operation. This can significantly increase the
machine’s I/O performance.w