Components CPU Flashcards

Memory The main memory of a computer can be thought of as a sequence of locations, each of which can store one value. Each value has a fixed width, i.e., a fixed number of bits. Registers A register is a very fast memory location inside the CPU. There are general purpose and special purpose registers. arithmetic logic unit (ALU) responsible for performing basic computations such as addition and multiplication, as well as Boolean logic operations, for example comparisons or AND and OR operations. (33 cards)

1
Q

Components of a CPU

A

Memory- The main memory of a computer can be thought of as a sequence of locations, each of which can store one value. Each value has a fixed width, i.e., a fixed number of bits.

Registers- A register is a very fast memory location inside the CPU. There are general purpose and special purpose registers.

arithmetic logic unit (ALU)- responsible for performing basic computations such as addition and multiplication, as well as Boolean logic operations, for example comparisons or AND and OR operations.

control unit (CU)- It coordinates the other components.

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

Registers in Marie

A
AC	(accumulator): This is the only general-purpose register. For marie this is 16 bits long
MAR	MAR (Memory Address Register): Holds a memory address of a word that needs to be read from or written to memory. For marie this is 12 bits long (therefor marie has 4 bit opcodes)
MBR	MBR (Memory Buffer Register): Holds the data read from or written to memory. Marie- 16 bits
IR	(Instruction Register): Contains the instruction that is currently being executed. Marie- 16 bits
PC	PC (Program Counter): Contains the address of the next instruction. Marie- 12 bits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Marie – Number of memory locations

A

Number of memory locations = 212
Each of these memory locations can store a word ( 16 bits)
Memory Capacity = 212 * 2 bytes

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

control unit in the CPU performs the so-called ___cycle

A

fetch-decode-execute
Fetch- Update PC register, IR loaded with the current instruction.
Decode -Gets ready to execute the instruction by transferring data to MBR and updating MAR
Execute- Perform actual operation encoded by the instruction. Unique to each instruction.

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

Combination Circuits

A

In a combinational circuit, the outputs only depend on the inputs

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

Sequential Circuits

A

Sequential Circuit outputs depend on the inputs and on the sequence of events (i.e., inputs and outputs) that has happened in the past.

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

Comparators

A

perform Comparing functions, Used in executing SkipCond for Marie

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

Decoders

A

turns a binary number into a unary representation. n inputs and 2n outputs. Depending on the input only one output line would be activated,

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

Multiplexers

A

select one out of several data inputs. it has n selection inputs, which determine which one of 2n the data inputs to pick

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

memory-mapped IO architecture

A

specify and use some of the memory addresses to read from the keyboard and write to the screen. Using already existing instruction. Disadvantage: takes up from address space. (burrowed addresses no longer can access the ram) – Marie is this type

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

Instruction based IO architecture

A

It has additional special purpose instructions to input and output.

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

Interupt

A

The hardware notify the CPU when new data is available. The CPU then interrupts the program it is currently executing and jumps into a special subroutine to process the I/O request

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

DMA

A

Direct Memory Addressing: CPU delegate memory transfer operations to a dedicated controller. so that memory accessing not done though CPU operation.

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

Boot Process

A
  • POWER ON : Main fan starts working, computer power on.
  • BIOS (Basic Input Output System or first steps of UEFI Unified Extensible Firmware Interface in modern PCs) is stored in non-volatile memory (ROM - read only memory) on the motherboard.
  • The reset command in the CPU triggers the execution of an instruction at a specific location in the BIOS chip.
  • BIOS starts with a power-on-self-test POST: check for the status of ( memory, clock, processor, keyboards, etc)
  • First thing after POST test is to turn on VGA
  • Then, the BIOS goes through all available hardware and initialises as far as possible( hard disk, sounds ,networking)
  • BIOS needs to look for a bootable drive. This can be on a hard-disk, SD-Card, USB Stick, DVD, floppy disk,
  • On a bootable drive, there needs to be a boot sector with code that can be executed (called the boot loader). On a hard disk, this information is in the Master Boot Record (MBR). The boot loader first loads the core part of the operating system, the kernel.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

BIOS

A
  • Basic Input Output System
  • Out dated
  • Not Reprogrammable
  • all in a separate chip
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

UEFI

A
  • Unified Extensible Firmware Interface
  • Used in Modern computers
  • Reprogrammable
  • It is software that is sits in some non-volatile memory
  • Provides access to all hardware. Faster hardware initialization.
  • Security and authentication features before the OS has started.
  • Network access before the OS has started.
17
Q

UEIF Criticism

A
  • Boot restrictions (i.e. secure boot) can prevent users from installing the operating system of their choice.
  • Additional complexity provides additional possibilities for errors and new attack vectors.
18
Q

Operating Systems have the following core tasks

A

 Managing multiple processes running in parallel. A process is a program that is currently being executed.
 Managing the memory that processes use.
 Provide access to file systems, the network and other I/O resources.

19
Q

Process and Program

A

Program is the code written in programming language . A process, on the other hand, is created by loading the program code into the computer and then executing it. (Instance of a running program)

20
Q

Abstraction

A

refers to hiding the complexity

21
Q

virtualisation

A

OS can provide the “illusion” that each process ( refered to as virtualization)
 has the CPU completely to itself (i.e., there are no other processes running)
 has a large, contiguous memory just for itself
 has exclusive access to system resources (i.e., it doesn’t have to worry about sharing these resources with other processes)

22
Q

Operation System Virtualization Mechanism

A
  • The mechanisms for virtualising a CPU classify each process as being in one of three states: ready, running, or blocked.
  • OS decided to which queue a process should be placed and when to move form ready to running queue.
  • Program load (process Initiated) -> placed to ready queue
  • OS decided to run -> placed in running state
  • Time Up -> back to ready state
  • When i/o happening -> blocked state
  • IO completed -> back to ready state
23
Q

Operating system Modes

A

User Mode

Kernel Mode

24
Q

User Mode

A

Only a subset of instruction are allowed to be executed
IO instruction are not allowed
Certain memory operations are blocked
Normal applications run in this mode

25
Kernel Mode
No restrictions Os runs in kernel mode when ever an interrupt happens CPU switches to kernel mode to execute interrupt handler.
26
Two Major Process Switching
Cooperative Time sharing | Pre-emptive timesharing
27
Cooperative Time sharing
Invoke interrupts though program codes called in regular intervals. These could be actual IO Interrupts or interrupts invoked by program. a process that just performs a long running computation, without making any system calls, and without any interrupts happening from I/O devices. In that case, the process would block the entire system, since the OS never gets a chance to switch to another process
28
Advantage of Cooperative Time Sharing
The advantage of cooperative timesharing is that it is relatively easy to implement downside is that buggy or malicious processes can make a system unusable.
29
Pre-emptive timesharing
Timer Interrupts: These are hardware circuits that generate an interrupt in regular intervals, usually after a programmable number of clock ticks. In pre-emptive timesharing systems, the OS (or the user) can always kill buggy or malicious processes
30
Process Scheduling
1) First-come First Serve  Short processes may have to wait longer 2) Shortest Job Fist  Starvation could happen 3) Round- Robin  Shorter the time slice, fairer the schedule  Problem – some processes are more important than others.
31
Limited Direct Execution (LDE)
Each process is being directly executed in the CPU. virtualising the CPU, takes care of limiting access to the CPU as well as to the I/O devices. However, it does not limit access to the memory
32
Virtualising the memory has three main goals:
1. To enable protection of a process's memory against access from other (malicious or buggy) processes. 2. To make programming easier because a programmer does not need to know exactly how the memory on the target computer is organised (e.g. how much RAM is installed, and at which address the program will be loaded into RAM). 3. To enable processes to use more memory than is physically installed as RAM in the computer, by using external storage (e.g. hard disks) as temporary memory.
33
Address Space
The addresses that can be used by process