Found 989 Articles for Software & Coding

What is memory hierarchy?

Bhanu Priya
Updated on 31-Oct-2023 12:57:12

86K+ Views

The Computer memory hierarchy looks like a pyramid structure which is used to describe the differences among memory types. It separates the computer storage based on hierarchy.Level 0: CPU registersLevel 1: Cache memoryLevel 2: Main memory or primary memoryLevel 3: Magnetic disks or secondary memoryLevel 4: Optical disks or magnetic types or tertiary MemoryIn Memory Hierarchy the cost of memory, capacity is inversely proportional to speed. Here the devices are arranged in a manner Fast to slow, that is form register to Tertiary memory.Let us discuss each level in detail:Level-0 − RegistersThe registers are present inside the CPU. As they ... Read More

What are the interrupt stages and processing?

Bhanu Priya
Updated on 26-Nov-2021 10:57:27

21K+ Views

Instruction cycle consists of fetch, execute and interrupt stage show in below diagram −If any interrupt occurs, it is indicated by an interrupt flag. The CPU will go to interrupt handler routine. Interrupt handler then checks the type of interrupt and executes the appropriate function. It involves overhead but still better than the CPU waiting for I/O completion or other activities.Interrupt handler activates most prior able activity first and later deferrable part will be handled.ExampleBlock of data arrives on the network line.Kernel marks the presence of data (urgent part) and gives the CPU back to the process that was running ... Read More

What is an interrupt and how does the processor handle normal and multiple interrupts?

Bhanu Priya
Updated on 26-Nov-2021 10:55:33

12K+ Views

An interrupt is a signal from a device attached to a computer or from a program within the computer that requires the operating system to stop and figure out what to do next.Whenever an interrupt occurs, it causes the CPU to stop executing the current program. Then comes the control to interrupt the handler or interrupt service routine.The steps in which ISR handle interrupts are as follows −Step 1 − When an interrupt occurs let assume processor is executing i'th instruction and program counter will point to the next instruction (i+1)th.Step 2 − When an interrupt occurs the program value ... Read More

What is primary and secondary memory?

Bhanu Priya
Updated on 26-Nov-2021 10:51:34

21K+ Views

Memory is a storage part in a computer system. It is used to store the data, information, and programs at the time of processing on the computer. It stores data either temporarily or permanent. The main use of memory is saving and retrieving data.Types of MemoryGenerally computer system consists of two types of memory −Primary Memory or Volatile MemoryIt is called the internal memory of the computer. And it is also known as main memory or Temporary memory. It holds the data and instructions that are presently working on the system or by the CPU. Primary Memory is called volatile ... Read More

What are the basic elements of computers related to OS?

Bhanu Priya
Updated on 26-Nov-2021 10:47:31

517 Views

We know that an operating system is a resource allocator and it manages all the resources which are associated with the system.Let us see how operating system design is related to basic elements of a computer systemRegistersRegisters are available in the processor. These registers are used for storage and data transfer in the processor.There are registers which perform the operation of storage of data. It is known as data register (DR) and the register which stores the address known as address register (AR) and program counter (PC) register which is used for storing the address of next instruction.After the instructions ... Read More

What is an instruction set in a computer?

Bhanu Priya
Updated on 14-Sep-2023 01:56:54

32K+ Views

An instruction is a set of codes that the computer processor can understand. The code is usually in 1s and 0s, or machine language. It contains instructions or tasks that control the movement of bits and bytes within the processor.Example of some instruction sets −ADD − Add two numbers together.JUMP − Jump to designated RAM address.LOAD − Load information from RAM to the CPU.Types of Instruction SetGenerally, there are two types of instruction set used in computers.Reduced Instruction set Computer (RISC)A number of computer designers recommended that computers use fewer instructions with simple constructs so that they can be executed ... Read More

What is the purpose of a register in a CPU and what are special purpose registers?

Bhanu Priya
Updated on 26-Nov-2021 10:43:35

15K+ Views

A CPU register is a small and temporary storage containing a set of data holding places that are part of the computer processor. A register holds an instruction, a storage address, or any kind of data.Before trying to understand some special purpose registers, let us try to understand the difference between General purpose and special purpose registers.Special purpose registers hold the status of a program. These registers are designated for a special purpose. Some of these registers are stack pointer, program counter etc.General purpose registers hold the temporary data while performing different operations. Some of these registers are accumulator, BX ... Read More

Differentiate between user and control register in CPU.

Bhanu Priya
Updated on 26-Nov-2021 10:42:43

811 Views

User registers can read or write by machine instructions. The user registers are divided into data registers and address registers.Data registersThese registers hold the numeric data values like integers and, in some architectures, hold floating-point values, characters, small bit arrays and other data. In low end CPUs, a special data register, called the accumulator, is used implicitly for many operations.Address registersThese registers hold addresses and are used by instructions to indirectly access primary memory.Some of the processors contain registers that are used to hold an address or to hold numeric values. In some cases, it is used as an index ... Read More

What is the CPU control register?

Bhanu Priya
Updated on 26-Nov-2021 10:39:57

2K+ Views

Control register is called a processor register that changes or controls the general behaviour of a CPU or other services in the system.The common tasks performed by control registers are interrupt control, switching the addressing mode, paging control, and coprocessor control.Types of CPU Control RegisterThe different types of CPU control register are as follows −The control registers are those extra registers that are visible only in kernel mode.CR0 - Reads as 0, read-onlyCR1 - For general-purpose useCR2 - For general-purpose useCR3 - For general-purpose use and TLB interfaceCR4 - Processor Status RegisterCR5 - Interrupt Status RegisterCR6 - Interrupt Mask RegisterCR7 ... Read More

What are the CPU general purpose registers?

Bhanu Priya
Updated on 26-Nov-2021 10:35:49

11K+ Views

General purpose registers are additional registers that are present in CPU which is used for either memory address or data whenever needed. For example, storing current register content when there is an interruption.8086 processorLet us consider an 8086 processor. There are eight general purpose register in 8086 microprocessor which are explained below −AXThis is the accumulator of 16 bits and is separated into two 8-bits registers AH and AL to likewise perform 8-bits instruction. It is usually utilized for arithmetical and logical directions, yet in 8086 chips it isn't required to have an accumulator as the objective operand.Example − ADD ... Read More

Advertisements