Tree Traversals And Its Types
Tree Traversals And Its Types Reading/Processing the data of a node exactly once in the some order in a tree. The following ways are generally used for traversing a tree. There are two major types of Tree Traversals 1. Depth first I. Preorder Traversal II. Inorder Traversal III. Postorder Traversal 2. Breadth-First or Level Order […]
Introduction to Data Structure
Introduction to Data Structure A data structure is a method for storing and organizing data efficiently. They play an important role in various computing tasks like managing large datasets, enabling operations like search, insert, update, and delete to be performed quickly. Example 1: Student marks in various subjects Data: Raw facts and figures is called […]
DMA Controller
DMA Controller DMA stands for direct memory access. The DMA controller is a control unit that can transfer data blocks between I/O devices and main memory with minimal intervention from the CPU. It also speeds up data transfer between I/O devices and memory. Question: A DMA Controller transfers 16-bit words to memory using cycle stealing. […]
Interrupt
Interrupt An interrupt is a signal sent to the processor that interrupts the current process and executes the interrupt. A hardware device or a software program may generate the interrupt. The hardware interrupt is mostly created by an input device such as a keyboard or mouse. For example, if you use an MS program and […]
Hazards in Pipelining
Hazards in pipelining Our target in pipelining is to get CPI=1. However, achieving the CPI target is not accessible due to some problems with pipelining. These problems are called Hazards in pipelining. Hazard leads to delay, for which we cannot get CPI=1. Types of Hazards in Pipelining The following are the primary hazards in pipelining. […]
Pipelining And Non-Pipelining
Pipelining And Non-Pipelining There are two common methods used to process the instructions. One is pipelining, and the other is non-pipeline. However, the concept of non-pipelining is replaced with pipelining due to its lower efficiency and throughput. Let’s explain both terms 1. Non-pipelining In a non-pipelining concept, each instruction is passed through some stages, which […]
Cache Replacement Policies
Cache Replacement Policies Cache Replacement Policies are essential techniques in computer systems that determine which data should be removed from cache memory when new data needs to be loaded. These policies improve system performance by efficiently managing limited cache space. What are Cache Replacement Policies? Cache replacement policies define the strategy used by a system […]
Locality of Reference
Locality of Reference The tendency of a processor to access the same memory block again and again is called locality of reference. Mean to say if CPU refers a memory block now or location now then the same memory block or location will be referenced again in the future. In this way, hit chances are […]
K-way Set Associative Mapping
K-way Set Associative Mapping It is a mixture of Direct and Fully associative mapping. Total No. of Set= Total No. of lines/K Here, K is K-way Set Associative For a 2-way set associative (K=2) Total No. Of Set = 4/2 = 2 sets (S0, S1) Which block will be in which line? It Is calculated […]
Fully Associative Mapping
Fully Associative Mapping In fully associative mapping, each memory block is mapped to any cache line. It resolves the issue of conflict miss. This means that any main memory block can come in any cache memory line. For example, B0 can come in L1, L2, L3, and L4; the same is true for all other […]
Direct Mapping
Direct Mapping In Direct Mapping, each block of main memory is mapped to a specific line in the cache. When determining which block is in which line, the formula K MOD N is used because the block size is equal to the line size. where “K” is the Block Number and “N” is the Total […]
Cache Mapping
Cache Mapping OS loads data from Secondary Memory to RAM, and then main memory blocks are mapped to cache lines. This process is called cache mapping. The main memory is divided into no. Of blocks and Cache memory divided into no. Of lines. The block size of the main memory is equal to the line […]
Simultaneous vs Hierarchical Memory
Simultaneous Vs. Hierarchical Memory In computer architecture, two basic methods are used to access the different levels of memory. Simultaneous Access Memory Organization Hierarchical Access Memory Organization Notations Some notations are used in this topic, details given below Suppose, T1 = Access time of level L1· S1 = Size of level L1· C1 = […]
Memory Hierarchy Design
Memory Hierarchy Design This Memory Hierarchy Design is classified into 2 major types, which are explained below 1. Internal Memory It is also known as Primary memory. It is directly accessible by the processor. It includes three basic levels, as given below Zero level (CPU Registers) level 1 (Cache Memory) Level 2 (Main memory). 2. […]
Types of Addressing Modes
Types of Addressing Modes Various types of addressing modes are used to specify an operand in an instruction. The choice of addressing mode can affect the efficiency and flexibility of a computer’s architecture. Note: Before learning about the types of addressing modes, it is important to know computer instructions. Types of Addressing Modes In computer […]
Logic Gates
Logic Gates The logic gates are an essential part of a digital system. The truth table shows the relationship between the input and output. Each gate has one or two binary input variables and one binary output variable. Binary input/output is in the form of 0 or 1. Types of Logic Gates The seven basic […]
Digital Computers
Digital Computers Digital computers are modern computers that take data as input, process it, and convert it into useful information. These computers understand only the binary language, i.e., 0 and 1. In the 1940s, the first electronic digital computer was developed. A digital computer system is subdivided into two major categories, as below 1. Hardware: […]
Instruction Cycle
Instruction Cycle A program residing in the main memory of a computer contains a sequence of instructions. The CPU executes these instructions by completing a cycle for each instruction. In a primary computer, each cycle for instruction consists of the following steps: Fetch the instruction from memory. Decode the instruction. Read the effective address from […]
Design of Control Unit
Design of Control Unit The Control Unit (CU) generates timing and control signals to perform different operations in the computer system. It also communicates with ALU and RAM. Control units can be designed in two ways, which are explained below, 1. Hardwired Control Unit The basic components of hardwired control units are 2 decoders, one […]
Types of CPU Organization
Types of CPU Organizations The length of instruction depends on the CPU organization. There are four basic types of instructions in CPU Organization. Zero Address Instruction (Stack Organization) Single Address Instructions Two address instructions Three address instructions Basic computers use single-address instructions. Let’s explain all of the above instructions. We will explain all these address […]