Friday, 1 January 2016

Direct memory access (DMA)

Direct memory access (DMA) :




DMA stands for "Direct Memory Access" and is a method of transferring data from the computer's RAM to another part of the computer without processing it using the CPU. While most data that is input or output from your computer is processed by the CPU, some data does not require processing, or can be processed by another device.

In these situations, DMA can save processing time and is a more efficient way to move data from the computer's memory to other devices. In order for devices to use direct memory access, they must be assigned to a DMA channel. Each type of port on a computer has a set of DMA channels that can be assigned to each connected device. For example, a PCI controller and a hard drive controller each have their own set of DMA channels.

For example, a sound card may need to access data stored in the computer's RAM, but since it can process the data itself, it may use DMA to bypass the CPU. Video cards that support DMA can also access the system memory and process graphics without needing the CPU. Ultra DMA hard drives use DMA to transfer data faster than previous hard drives that required the data to first be run through the CPU.

An alternative to DMA is the Programmed Input/Output (PIO) interface in which all data transmitted between devices goes through the processor. A newer protocol for the ATAIIDE interface is Ultra DMA, which provides a burst data transfer rate up to 33 mbps. Hard drives that come with Ultra DMAl33 also support PIO modes 1, 3, and 4, and multiword DMA mode 2 at 16.6 mbps.

DMA Transfer Types

Memory To Memory Transfer


In this mode block of data from one memory address is moved to another memory address. In this mode current address register of channel 0 is used to point the source address and the current address register of channel is used to point the destination address in the first transfer cycle, data byte from the source address is loaded in the temporary register of the DMA controller and in the next transfer cycle the data from the temporary register is stored in the memory pointed by destination address. After each data transfer current address registers are decremented or incremented according to current settings. The channel 1 current word count register is also decremented by 1 after each data transfer. When the word count of channel 1 goes to FFFFH, a TC is generated which activates EOP output terminating the DMA service.

Auto initialize


In this mode, during the initialization the base address and word count registers are loaded simultaneously with the current address and word count registers by the microprocessor. The address and the count in the base registers remain unchanged throughout the DMA service.

After the first block transfer i.e. after the activation of the EOP signal, the original values of the current address and current word count registers are automatically restored from the base address and base word count register of that channel. After auto initialization the channel is ready to perform another DMA service, without CPU intervention.

DMA Controller


The controller is integrated into the processor board and manages all DMA data transfers. Transferring data between system memory and an 110 device requires two steps. Data goes from the sending device to the DMA controller and then to the receiving device. The microprocessor gives the DMA controller the location, destination, and amount of data that is to be transferred. Then the DMA controller transfers the data, allowing the microprocessor to continue with other processing tasks. When a device needs to use the Micro Channel bus to send or receive data, it competes with all the other devices that are trying to gain control of the bus. This process is known as arbitration. The DMA controller does not arbitrate for control of the BUS instead; the I/O device that is sending or receiving data (the DMA slave) participates in arbitration. It is the DMA controller, however, that takes control of the bus when the central arbitration control point grants the DMA slave's request. 

What is BIOS (basic input/output system)

What is BIOS (basic input/output system)? 





BIOS (Basic Input/Output System) Short for ROM is boot firmware program that a computer uses to successfully start operating. The BIOS is located on a chip inside of the computer and is designed in a way that protects it from disk failure.
When you turn on a PC, the BIOS first conduct a basic hardware check, called a Power-On Self Test (POST), to determine whether all of the attachments are present and working. Then it loads the operating system into your computer's random access memory, or RAM. The BIOS also manages data flow between the computer's operating system and attached devices such as the hard disk, video card, keyboard, mouse, and printer. The BIOS stores the date, the time, and your system configuration information in a battery-powered, non-volatile memory chip, called a CMOS (Complementary Metal Oxide Semiconductor) after its manufacturing process. The main functions of the BIOS are:
(i)   BIOS power on self Test (POST)
(ii)  Bootstrap loader
(iii) BIOS Setup utility program
(iv) System service routines



Functions of BIOS


(i) BIOS Power on Self Test (POST): It is a built-in diagnostic program. This self test ensures that the computer has all of the necessary parts and functionality needed to successfully start itself, such as use of memory, a keyboard and other parts. Then additional tests are done during booting. If errors are detected during the test, the BIOS instruct the computer to give a code that reveals the problem. Error codes are typically a series of beeps heard shortly after startup.
The BIOS also works to give the computer basic information about how to interact with some critical components, such as drives and memory that it will need to load the operating system. Once the basic instructions have been loaded and the self-test has been passed, the computer can proceed with loading the operating system from one of the attached drives. Computer users can often make certain adjustments to the BIOS through a configuration screen on the computer. The setup screen is typically accessed with a special key sequence during the first moments of startup. This setup screen often allows users to change the order in which drives are accessed during startup and control the functionality of a number of critical devices. Features vary among individual BIOS versions. The boot sequences for Award BIOS software are;


(i) Test the CPU
(ii)Initialize support chips
(iii)Initialize the keyboard
(iv)ROM BIOS test
(v) CMOS RAM test
(vi) Memory test
(vii) Cache initialization
(viii) Initialize the vector table
(ix) CMOS RAM check sum
(x)  Keyboard initialization
(xi)  Video circuit test
(xii)  Video memory test
(xiii)  DMA Controller test
(xiv) PIC tests
(xv)  EISA  mode test
(xvi) Enable EISA slots
(xvii) Check memory size
(xviii) Memory test
(xix) Check EISA memory
(xx) Mouse initialization
(xxi) Cache initialization
(xxii) Shadow RAM setup
(xxiii) Floppy test
(xxiv) Hard drive test
(xxv) Serial/parallel port test
(xxvi) Initialize math coprocessor
(xxvii) Boot speed
(xxviii) POST loop
(xxix) Security/Password information
(xxx) Write to CMOS RAM
(xxxi) Initialize adapter ROM
(xxxii) Set up the time
(xxxiii)Boot the system and control given to INT 19 boot loader.

We can also use flash-memory cards to hold BIOS information. This allows users to update the BIOS version on computers after a vendor releases an update. This system was designed to solve problems with the original BIOS or to add new functionality. Users can periodically check for updated BIOS versions, as some vendors release a dozen or more updates over the course of a product's lifetime. Mother board (System) BIOS, Video adapter firmware (BIOS), Drive controller firmware (BIOS), Modem Card firmware (BIOS), Network adapter board BIOS, SCSI adapter BIOS. The mother board BIOS provides routines to support motherboard features. BIOS ROM chips for major sub systems of computer such as video and drive control must also be included.

Actually BIOS can be placed in between the computer and external devices as its name tells it is used for reading the keystroke, displaying values on screen, Reading and writing to and from floppy and hard disks etc.

The keyboard is assigned the port number 60, which is known to BIOS. BIOS read this port and data from keyboard goes to computer.

(ii) Bootstrap LoaderTo boot the operating system. The BIOS contains a program known as bootstrap loader whose responsibility is to search and start the operating system boot program. Then the boot program of operating system controls the computer system and boots the operating system.

(iii) BIOS Setup Utility Program: A non volatile memory (NVRAM) is used to store information about the computer system. During installation of a system, the user run BIOS setup program and enter the correct parameters. The settings of memory, disk types and other settings are stored in NVRAM and not in BIOS chip itself. To construct NVRAM, the material required is CMOS (Complementary metal oxide semiconductor). These CMOS chips are very efficient storage devices as they store and maintain data on very low values of current. The system's configurations therefore are also termed as CMOS settings, which we can set using BIOS set up program. The BIOS reads the parameters from CMOS RAM as and when required.

CMOS settings can be maintained by battery backup either by using capacitor or by a battery built into NVRAM chip. This chip also has system clock. If there is no battery, the setting remains for short period of time and we need to reset the system. With it there is loss of BIOS password which protects BIOS set up program.

To clear the CMOS RAM contents, two methods used are
(i) By using clear CMOS jumper.
(ii) By holding down enter key during booting of the system.
For Pentium III motherboards, different set ups are there in AMI BIOS. These are:

• Standard CMOS Setup:It is used to set time date, hard disk type, type of floppy drive, type of monitor and keyboard.

Advanced CMOS Setup:It is used to set type matic rate and delay, above 1 MB memory test, memory test tick sound, Hil < Del> message display, system boot up sequence etc.

• Advanced Chipset Setup:It is used to set features of chipset.

• Power Management Setup:It is used to control power conservation options.

• PCI/Plug and Play Setup:It is used to set options of PCI bus and that of plug and play devices.

• Peripherals Setup:It is used to control options related to I/O controllers.

• CPU Configuration Setup:This setup is used to select the types of CPU installed in the motherboard. In AMI BIOS, the settings are auto as it automatically finds out the type of CPU in the computer system.

(iv) System Service Routines: The BIOS provides various software routines (subprograms) that can be called by higher-level software such, as DOS, Windows, or their applications, to perform different tasks. Virtually every task that involves accessing the system hardware has traditionally been controlled using one or more of the BIOS programs (although many newer operating systems now bypass the BIOS for improved performance). This includes actions like reading and writing from the hard disk, processing information received from devices, etc.

BIOS services are accessed using software interrupts, which are similar to the hardware interrupts except that they are generated inside the processor by programs instead of being generated outside the processor by hardware devices. One thing that this use of interrupts does is to allow access to the BIOS without knowing where in memory each routine is located.

Normally, to call a software routine you need to know its address. With interrupts, a table called an interrupt vector table is used that bypasses this problem. When the system is started up, the BIOS puts addresses into this table that represent where its routines are located for each interrupt it responds to. Then, when DOS or an application wants to use a BIOS routine, it generates a software interrupt. The system processes the interrupt, looks up the value in the table, and jumps to the BIOS routine automatically. DOS itself and application programs can also use this interrupt vector table.


Von-Neumann Architectures

Von-Neumann Architectures :



Von Neumann Architecture also known as the Von Neumann model, the computer consisted of a CPUmemory and I/O devices. The program is stored in the memory. The CPU fetches an instruction from the memory at a time and executes it.

Thus, the instructions are executed sequentially which is a slow process. Neumann m/c are called control flow computer because instruction are executed sequentially as controlled by a program counter. To increase the speed, parallel processing of computer have been developed in which serial CPU’s are connected in parallel to solve a problem. Even in parallel computers, the basic building blocks are Neumann processors.

The von Neumann architecture is a design model for a stored-program digital computer that uses a processing unit and a single separate storage structure to hold both instructions and data. It is named after mathematician and early computer scientist John von Neumann. Such a computer implements a universal Turing machine, and the common "referential model" of specifying sequential architectures, in contrast with parallel architectures.





One shared memory for instructions (program) and data with one data bus and one address bus between processor and memory. Instructions and data have to be fetched in sequential order (known as the Von Neuman Bottleneck), limiting the operation bandwidth. Its design is simpler than that of the Harvard architecture. It is mostly used to interface to external memory.




CPU - Central Processing Unit

CPU - Central Processing Unit :



Every things computer does is controlled by its Central Processing Unit (CPU). The CPU is the brains of the computer. Sometimes referred to simply as the central processor or Nerve Centre or heart, but more commonly called processor, the CPU is where most calculations take place.

In terms of computing power, the CPU is the most important element of a computer system. It add and compare its data in cpu chip. A CPU or Processors of all computers, whether micro, mini or mainframe must have  three element or parts primary storage, arithmetic logic unit (ALU), and control unit. Control Unit (CU) - decodes the program instruction. CPU chip used in a computer is partially made out of Silica. on other words silicon chip used for data processing are called Micro Processor. 

Central processing unit (CPU) is the central component of the Pc. Sometimes it is called as processor. It is the brain that runs the show inside the Pc. All work that is done on a computer is performed directly or indirectly by the processor. Obviously, it is one of the most important components of the Pc. It is also, scientifically, not only one of the most amazing parts of the PC, but one of the most amazing devices in the world of technology. The processor plays a significant role in the following important aspects of your computer system;

Performance: The processor is probably the most important single determinant of system performance in the Pc. While other components also playa key role in determining performance, the processor's capabilities dictate the maximum performance of a system. The other devices only allow the processor to reach its full potential.

Software Support: Newer, faster processors enable the use of the latest software. In addition, new processors such as the Pentium with MMX Technology, enable the use of specialized software not usable on earlier machines.

Reliability and Stability: The quality of the processor is one factor that determines how reliably your system will run. While most processors are very dependable, some are not. This also depends to some extent on the age of the processor and how much energy it consumes.

Energy Consumption and Cooling: Originally processors consumed relatively little power compared to other system devices. Newer processors can consume a great deal of power. Power consumption has an impact on everything from cooling method selection to overall system reliability.

Motherboard Support: The processor that decides to use in your system will be a major determining factor in what sort of chipset we must use, and hence what motherboard you buy. The motherboard in turn dictates many facets of. The system's capabilities and performance.

History of computer

History of computer :



Each generation of computer is characterized by a major technological development that fundamentally changed the way computers operate, resulting in increasingly smaller, cheaper, more powerful and more efficient and reliable devices.

The various generations of computers an listed below :

(i) First Generation (1946-1954) : In 1946 there was no 'best' way of storing instructions and data in a computer memory. There were four competing technologies for providing computer memory: electrostatic storage tubes, acoustic delay lines (mercury or nickel), magnetic drums (and disks?), and magnetic core storage.

The digital computes using electronic valves (Vacuum tubes) are known as first generation computers. the first 'computer' to use electronic valves (ie. vacuum tubes). The high cost of vacuum tubes prevented their use for main memory. They stored information in the form of propagating sound waves.

The vacuum tube consumes a lot of power. The Vacuum tube was developed by Lee DeForest in 1908. These computers were large in size and writing programs on them was difficult. Some of the computers of this generation were:

Mark I : The IBM Automatic Sequence Controlled Calculator (ASCC), called the Mark I by Harvard University, was an electro-mechanical computer. Mark I is the first machine to successfully perform a long services of arithmetic and logical operation. Mark I is the First Generation Computer. it was the first operating machine that could execute long computations automatically.Mark I computer which was built as a partnership between Harvard and IBM in 1944. This was the first programmable digital computer made in the U.S. But it was not a purely electronic computer. Instead the Mark I was constructed out of switches, relays, rotating shafts, and clutches. The machine weighed 5 tons, incorporated 500 miles of wire, was 8 feet tall and 51 feet long, and had a 50 ft rotating shaft running its length, turned by a 5 horsepower electric motor.

ENIAC: It  was the first general-purpose electronic computer built in 1946 at University of Pennsylvania, USA by John Mauchly and J. Presper Eckert. The completed machine was announced to the public the evening of February 14, 1946. It was named Electronic Numerical Integrator and Calculator (ENIAC). ENIAC contained 17,468 vacuum tubes, 7,200 crystal diodes, 1,500 relays, 70,000 resistors, 10,000 capacitors and around 5 million hand-soldered joints. It weighed more than 30 short tons (27 t), was roughly 8 by 3 by 100 feet (2.4 m × 0.9 m × 30 m), took up 1800 square feet (167 m2), and consumed 150 kW of power. Input was possible from an IBM card reader, and an IBM card punch was used for output. These cards could be used to produce printed output offline using an IBM accounting machine, such as the IBM 405. Today your favorite computer is many times as powerful as ENIAC, still size is very small.

EDVAC: It stands for Electronic Discrete Variable Automatic Computer and was developed in 1950.it was to be a vast improvement upon ENIAC, it was binaryrather than decimal, and was a stored program computer. The concept of storing data and instructions inside the computer was introduced here.This allowed much faster operation since the computer had rapid access to both data and instructions. The other advantage of storing instruction was that computer could do logical decision internally.

The EDVAC was a binary serial computer with automatic addition, subtraction, multiplication, programmed division and automatic checking with an ultrasonic serial memory. EDVAC's addition time was 864 microseconds and itsmultiplication time was 2900 microseconds (2.9 milliseconds).

The computer had almost 6,000 vacuum tubes and 12,000 diodes, and consumed 56 kW of power. It covered 490 ft² (45.5 m²) of floor space and weighed 17,300 lb (7,850 kg).

EDSAC: It stands for Electronic Delay Storage Automatic Computer and was developed by M.V. Wilkes at Cambridge University in 1949. Two groups of individuals were working at the same time to develop the first stored-program computer. In the United States, at the University of Pennsylvania the EDVAC (Electronic Discrete Variable Automatic Computer) was being worked on. In England at Cambridge, the EDSAC (Electronic Delay Storage Automatic Computer) was also being developed. The EDSAC won the race as the first stored-program computerbeating the United States’ EDVAC by two months. The EDSAC performed computations in the three millisecond range. It performed arithmetic and logical operations without human intervention. The key to the success was in the stored instructions which it depended upon solely for its operation. This machine marked the beginning of the computer age. EDSAC is the first computer is used to store a program

UNIVAC-1Ecker and Mauchly produced it in 1951 by Universal Accounting Computer setup. it was the first commercial computer produced in the United States. It was designed principally by J. Presper Eckert and John Mauchly, the inventors of the ENIAC.

The machine was 25 feet by 50 feet in length, contained 5,600 tubes, 18,000 crystal diodes, and 300 relays. It utilized serial circuitry, 2.25 MHz bit rate, and had an internal storage capacity 1,000 words or 12,000 characters.

It utilized a Mercury delay line, magnetic tape, and typewriter output. The UNIVAC was used for general purpose computing with large amounts of input and output.

Power consumption was about 120 kva. Its reported processing speed was 0.525 milliseconds for arithmetic functions, 2.15 milliseconds for multiplication and 3.9 Milliseconds for division.

The UNIVAC was also the first computer to come equipped with a magnetic tape unit and was the first computer to use buffer memory.

Other Important Computers of First Generation

Some other computers of this time worth mentioning are the Whirlwind, developed at Massachussets Institute of Technology, and JOHNNIAC, by the Rand Corporation. The Whirlwind was the first computer to display real time video and use core memory. The JOHNNIAC was named in honor of Jon Von Neumann. Computers at this time were usually kept in special locations like government and university research labs or military compounds.

Limitations of First Generation Computer
Followings are the major drawbacks of First generation computers.
1.  They used valves or vacuum tubes as their main electronic component.
2. They were large in size, slow in processing and had less storage capacity.
3.  They consumed lots of electricity and produced lots of heat.
4.  Their computing capabilities were limited.
5. They were not so accurate and reliable.
6.  They used machine level language for programming.
7.  They were very expensive.
Example: ENIAC, UNIVAC, IBM 650 etc


(ii)  Second Generation (1955-1964) : The second-generation computer used transistors for CPU components & ferrite cores for main memory & magnetic disks for secondary memory. They used high-level languages such as FORTRAN (1956), ALGOL (1960) & COBOL (1960 - 1961). I/O processor was included to control I/O operations.

Around 1955 a device called Transistor replaced the bulky Vacuum tubes in the first generation computer. Transistors are smaller than Vacuum tubes and have higher operating speed. They have no filament and require no heating. Manufacturing cost was also very low. Thus the size of the computer got reduced considerably.

It is in the second generation that the concept of Central Processing Unit (CPU), memory, programming language and input and output units were developed. The programming languages such as COBOL, FORTRAN were developed during this period. Some of the computers of the Second Generation were          
                                                                  
1. IBM 1620: Its size was smaller as compared to First Generation computers and mostly used for scientific purpose. 
2. IBM 1401: Its size was small to medium and used for business applications.
3. CDC 3600: Its size was large and is used for scientific purposes.

Features:
1.  Transistors were used instead of Vacuum Tube.
2.  Processing speed is faster than First Generation Computers (Micro Second)
3.  Smaller in Size (51 square feet)
4. The input and output devices were faster.
Example: IBM 1400 and 7000 Series, Control Data 3600 etc.



(iii) Third Generation (1964-1977) : By the development of a small chip consisting of the capacity of the 300 transistors. These ICs are popularly known asChips. A single IC has many transistors, registers and capacitors built on a single thin slice of silicon. So it is quite obvious that the size of the computer got further reduced. Some of the computers developed during this period were IBM-360, ICL-1900, IBM-370, and VAX-750. Higher level language such as BASIC (Beginners All purpose Symbolic Instruction Code) was developed during this period.  Computers of this generation were small in size, low cost, large memory and processing speed is very high. Very soon ICs Were replaced by LSI (Large Scale Integration), which consisted about 100 components. An IC containing about 100 components is called LSI.

Features:
1. They used Integrated Circuit (IC) chips in place of the transistors.
2. Semi conductor memory devices were used.
3.  The size was greatly reduced, the speed of processing was high, they were   more accurate and reliable.
4.  Large Scale Integration (LSI) and Very Large Scale Integration (VLSI) were also developed.
5.  The mini computers were introduced in this generation.
6. They used high level language for programming.
Example: IBM 360, IBM 370 etc.

(iv)     Fourth Generation : An IC containing about 100 components is called LSI (Large Scale Integration) and the one, which has more than 1000 such components, is called as VLSI (Very Large Scale Integration). It uses large scale Integrated Circuits (LSIC) built on a single silicon chip called microprocessors. Due to the development of microprocessor it is possible to place computer’s central processing unit (CPU) on single chip. These computers are called microcomputers. Later very large scale Integrated Circuits (VLSIC) replaced LSICs. Thus the computer which was occupying a very large room in earlier days can now be placed on a table. The personal computer (PC) that you see in your school is a Fourth Generation Computer Main memory used fast semiconductors chips up to 4 M bits size. Hard disks were used as secondary memory. Keyboards, dot matrix printers etc. were developed. OS-such as MS-DOS, UNIX, Apple’s Macintosh were available. Object oriented language, C++ etc were developed.

Features:
1.  They used Microprocessor (VLSI) as their main switching element.
2. They are also called as micro computers or personal computers.
3.  Their size varies from desktop to laptop or palmtop.
4.  They have very high speed of processing; they are 100% accurate, reliable,   diligent and versatile.
5.  They have very large storage capacity.
Example: IBM PC, Apple-Macintosh etc.

(v)    Fifth Generation (1991- continued) : 5th generation computers use ULSI (Ultra-Large Scale Integration) chips. Millions of transistors are placed in a single IC in ULSI chips. 64 bit microprocessors have been developed during this period. Data flow & EPIC architecture of these processors have been developed. RISC & CISC, both types of designs are used in modern processors. Memory chips and flash memory up to 1 GB, hard disks up to 600 GB & optical disks up to 50 GB have been developed. fifth generation digital computer will be Artificial intelligence.