Hardware and Virtual Machines Flashcards

1
Q

State differences between RISC and CISC

A
  1. Instruction set
    *CISC has a large set of complex instruction, each performing multiple operations.
    *Misc has a small set of simple instructions, each performing one operation
  2. Execution time
    *Cisc takes multiple clcok cycles to execute
    *Risc- each instruction is designed to execute in a single clock cycle
  3. Memory usage -
    *requires fewer instructions but more complex decoding
    *risc requires more instructions but each is simpler and faster
    4.hardware
    *cisc is more complex hardware due to intricate control logic.
    *risc simpler hardware design with streamlined control logic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain interrupt handling on CISC processors(6)

A

*CPU receives interrupt signal from hardware or software
*stops current task, saves the program counter and important data in a stack.
*the cpu checks the Interrupt vector table that maps interrupt signals to their corresponding ISR.
*The cpu switches to ISR which handles the specific interrupt request
*After handling interrupt, the CPU retrieves the saved PC and other info from the stack.
*If multiple interrupts occur, the CPU handles them based on their priority levels to ensure critical tasks are addressed first

(More complex instructions enable efficient ISR routines.
✔ Often uses microcode for handling intricate interrupt behaviors.
✔ Tends to have slower context switching compared to RISC processors due to complex instruction handling.)

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

Explain interrupt handling on RISC processors(6)

A

*While executing instructions, the CPU receives an interrupt signal from hardware (e.g., keyboard, network) or software.
* The CPU quickly saves the Program Counter (PC) (next instruction address) and key registers in dedicated hardware registers — not in memory (unlike CISC).
* The CPU refers to a simplified Interrupt Vector Table (IVT) to locate the relevant Interrupt Service Routine (ISR)
*The CPU switches to the ISR, which is designed as a short and efficient routine due to RISC’s streamlined instruction set.
* Once the interrupt is handled, the CPU restores the saved PC and register values to continue from where it paused.
* RISC processors often rely on simple yet effective priority schemes to manage multiple interrupts efficiently.

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

Why is the use of pipelining and registers in RISC processors is important

A
  1. Pipelining:
    • Faster Execution: Pipelining lets the processor work on multiple instructions at once, making it faster.
    • More Efficient: It splits instructions into smaller steps, so each part is worked on at the same time.
    • Example: Like an assembly line, where different workers handle different tasks on the same product at the same time.
    1. Registers:
      • Quick Data Access: Registers store data inside the CPU, so it can be accessed quickly.
      • Less Memory Access: Using registers reduces the need to get data from slower memory.
      • Example: Registers are like a desk where the processor keeps important data close for easy use.

Why They’re Important Together:
• Better Speed: Pipelining speeds up instruction processing, while registers make sure data is quickly available, making the processor faster overall.

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

Explain the characteristics of massively parallel computers

A
  1. Large number of processors- thousands to millions of processors.
  2. Parallel processing architecture- tasks into smaller sub tasks processed simultaneously. Uses SIMD and MIMD.
  3. High speed interconnection network-processors communicate fast, low latency connections.
  4. distributed memory models.-each processor has its own memory and communicates via message passing.
  5. Scalability- can scale up by adding processors without performance bottlenecks.
  6. High computational power-performs trillions of operations per second.
  7. Specialized processing units. -uses GPUs for high performance workloads.
  8. Requires parallel algorithms - uses specialized software eg open amp to manage workloads.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give examples of the role of virtual machines

A
  1. Software testing and development
  2. Server virtualization
  3. Cybersecurity and ethical hacking
  4. Cloud computing and infrastructure
    5.IT training and education
  5. Running legacy software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The benefits and limitations of virtual machines

A

Benefits

  1. Cost efficiency
  2. Efficient Resource utilization
  3. Resource isolation and security
  4. You can run multiple OS on one machine
  5. Scalability

Drawbacks

  1. Performance overhead - vms are slower than physical machines due to resource sharing
  2. High resource consumption -more CPU, RAM, and storage required than running directly on hardware.
  3. Complex management
  4. Security risks eg misconfigured vms
  5. Limited hardware access
  6. Licensing costs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do half adders and full adders work

A

These are combinational logic circuits used for binary addition in digital electrons.

Half adder
A and B inputs in a logic table has 2 outputs namely sum and carry. Sum(S) = the result of addition and Carry(cout)= the carry out if the sum exceeds 1.
Logic equations for half adder
S=A ⊕B(XOR gate)
C=A.B
limitation: half adders cannot handle carry in (cin) from previous operations, making them unsuitable for multi-bit addition.

Full Adder(allows carry in )(3 inputs)

1st bit, 2nd bit, cin(carry in from previous stage) are inputs and S and Cout are the outputs.

Sum = A ⊕ B ⊕ C in
Carry = (A.B) + (Cin.(A ⊕B))
Two XOR gates compute the sum
Two AND gates and one OR gate generate the carry-out.

Advantage:full adders can be cascaded to add multibit binary numbers

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

What is the role of flip flops as data storage elements.

A

Key Roles:
1. Data Storage:
• Flip-flops store one bit of data and keep it until updated.
2. Synchronization:
• They ensure data changes at specific times, based on a clock signal.
3. State Retention:
• Flip-flops remember the current state in sequential circuits, like counters.
4. Control:
• They control the flow of data in circuits and hold intermediate results.
5. Data Latching:
• Flip-flops “latch” data temporarily when needed.

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

State Demoire Morgan’s laws and other laws

A

Commutative laws
A+B=B+A
A.B=B.A
Associate law
A+(B+C)= (A+B)+C
A.(B.C)=(A.B).C
Distributive law
A.(B+C)=(A.B)+(A.C)
A+(B.C)=(A+B).(A+C)
Identity and Null Laws
A+0 = A
A.1=A
A+1=1
A.0=0

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

What are the benefits of using Karnaugh maps

A
  1. Simplifies complex expressions
  2. Reducesfaster simplification
  3. Visual clrity
  4. human error
  5. Efficient for up to 5 variables
  6. Reduces circuit complexity
  7. Identifies dont care conditions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Explain the SISD computer architecture

A

SISD is a computer architecture where one processor executes one instruction on one data stream at a time.

Key Characteristics of SISD:
• Single Control Unit (CU): Manages the flow of instructions one by one.
• Single Arithmetic Logic Unit (ALU): Performs calculations or logical operations.
• Sequential Execution: Instructions are executed one after the other.
• Single Data Stream: Data is processed from a single source at a time.

Advantages:

✔ Simple design and easy to program.
✔ Ideal for tasks requiring sequential logic.

Disadvantages:

❌ Limited performance for complex tasks.
❌ Poor scalability compared to parallel architectures like SIMD or MIMD.

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

Explain the SIMD architecture

A

SIMD is a computer architecture where one instruction is executed simultaneously across multiple data streams

Key Characteristics of SIMD:
• Single Control Unit (CU): Issues one instruction to multiple processing units.
• Multiple ALUs (Arithmetic Logic Units): Perform identical operations on different data simultaneously.
• Data Parallelism: Best suited for tasks where the same calculation must be applied to many data point

Advantages:

✔ Highly efficient for tasks involving large data sets (e.g., image processing, video encoding).
✔ Faster performance in vector operations.

Disadvantages:

❌ Limited flexibility — works best for data-parallel tasks.
❌ Inefficient for non-uniform data processing.#

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

Explain the MISD architecture

A

MISD is a computer architecture where multiple processors execute different instructions on the same data stream simultaneously.

Key Characteristics of MISD:
• Multiple Control Units (CUs): Each processor follows its own instruction set.
• Single Data Stream: All processors share the same data input.
• Data Flow Systems: Often used in specialized tasks like real-time error checking or fault tolerance.

Advantages:

✔ Enhanced reliability — useful for redundancy and error detection.
✔ Ideal for specialized systems requiring multiple checks on the same data.

Disadvantages:

❌ Rarely used in general-purpose computing.
❌ Complex to design and implement.

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

Explain the MIMD architecture

A

MIMD is a computer architecture where multiple processors execute different instructions on different data streams simultaneously

Key Characteristics of MIMD:
• Multiple Control Units (CUs): Each processor in the system can execute its own instruction stream independently.
• Multiple Data Streams: Each processor operates on different data sets, allowing for a high level of parallelism.
• Independent Operation: Processors can perform entirely different tasks, making MIMD suitable for complex, diverse computations.

Advantages:

✔ Highly flexible — can handle a wide range of tasks simultaneously.
✔ Suitable for complex, large-scale computations (scientific simulations, weather forecasting).
✔ Scalable — as more processors are added, performance can improve for parallel tasks.

Disadvantages:

❌ Complex to manage and coordinate, especially when tasks are interdependent.
❌ High overhead for communication and synchronization between processors.

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

Notes from other resources below