Hardware and Virtual Machines Flashcards
State differences between RISC and CISC
- 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 - Execution time
*Cisc takes multiple clcok cycles to execute
*Risc- each instruction is designed to execute in a single clock cycle - 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
Explain interrupt handling on CISC processors(6)
*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.)
Explain interrupt handling on RISC processors(6)
*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.
Why is the use of pipelining and registers in RISC processors is important
- 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.- 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.
- Registers:
⸻
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.
Explain the characteristics of massively parallel computers
- Large number of processors- thousands to millions of processors.
- Parallel processing architecture- tasks into smaller sub tasks processed simultaneously. Uses SIMD and MIMD.
- High speed interconnection network-processors communicate fast, low latency connections.
- distributed memory models.-each processor has its own memory and communicates via message passing.
- Scalability- can scale up by adding processors without performance bottlenecks.
- High computational power-performs trillions of operations per second.
- Specialized processing units. -uses GPUs for high performance workloads.
- Requires parallel algorithms - uses specialized software eg open amp to manage workloads.
Give examples of the role of virtual machines
- Software testing and development
- Server virtualization
- Cybersecurity and ethical hacking
- Cloud computing and infrastructure
5.IT training and education - Running legacy software
The benefits and limitations of virtual machines
Benefits
- Cost efficiency
- Efficient Resource utilization
- Resource isolation and security
- You can run multiple OS on one machine
- Scalability
Drawbacks
- Performance overhead - vms are slower than physical machines due to resource sharing
- High resource consumption -more CPU, RAM, and storage required than running directly on hardware.
- Complex management
- Security risks eg misconfigured vms
- Limited hardware access
- Licensing costs
How do half adders and full adders work
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
What is the role of flip flops as data storage elements.
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.
State Demoire Morgan’s laws and other laws
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
What are the benefits of using Karnaugh maps
- Simplifies complex expressions
- Reducesfaster simplification
- Visual clrity
- human error
- Efficient for up to 5 variables
- Reduces circuit complexity
- Identifies dont care conditions
Explain the SISD computer architecture
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.
Explain the SIMD architecture
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.#
Explain the MISD architecture
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.
Explain the MIMD architecture
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.
Notes from other resources below