Computer Organization and Architecture

Introduction to I/O Programming

The computer based systems are flourishing due to the wide applications provided by them. The real life applications require interfacing of various instruments and components sufficient to meet the application. The interfacing of those I/O (Input/Output) devices necessitates an efficient programming so that the need is met with accuracy. The I/O programming, thus becomes a field to be absorbed with great depth of knowledge about it.

Accessing I/O devices and polled I/O

The mapping of I /O ports can be done in two different ways i.e. memory mapped I/O and isolated I /O. In memory mapped, the I/O port address is mapped to the memory address space. The isolated I/O has an address space different from memory address space. In polled I/O the CPU checks the I/O devices to find out if they are prepared for the transfer of data.

Interrupt driven I/O

In an interrupt driven system, the CPU can carry on its processing if an I/O action occurs. The processor continues its operation till it is interrupted by the I/O device i.e. the processor can perform some other work when it is waiting for the I/O device. In an interrupt driven I/O the processor controls the I/O operation. The device does the operation. After completion of the operation, the processor is interrupted. The processor then responds by transferring the data. In an interrupt driven I/O, the device management is divided into four parts. They are: the top half that initiates the operation, the device status table, the interrupt handler and the device handler. An example of a device that works with interrupt driven I/O is the serial port.

Interrupt Controllers and the Interrupt Mechanism

Interrupt controllers are hardware devices that connect the device interrupts to the processor. The Intel 8259 interrupt controller is a standard for this. In this, the requests from 8 different devices are given to 8 input lines. This request is then given to the processor by the interrupt controller and it also informs which device has issued the request. Interrupt mechanism gives a good method to handle unexpected events. The two types of interrupts are software interrupts and hardware interrupts.

DMA and IO Channels

“DMA stands for Direct Memory Access, a capability in modern computers that allows peripheral devices to send data to the motherboard’s memory without intervention from the CPU.” (What is DMA, para.1)

DMA is used in computer buses because it can increase the speed of the operations in computers and it can also perform multitasking. DMA channels transfer information from the main memory to any device. The data transferred does not go through the processor. DMA helps in the fast transfer of data. The DMA controller is used to implement DMA. An I/O channel identifies and signals a peripheral device and also controls data transfer between the internal memory and peripheral equipments.

Memory Module

A memory module contains several memory chips mounted in a printed circuit board. The most common memory modules used are DIMM (dual-in-line memory module). In laptop, memory modules used are small outline DIMMs (SODIMMs). Different types of memories used are virtual memory and cache memory.

Cache Memory

It is a high speed, low volume memory connected between the CPU and the main memory. At any time CPU can access data directly from the high speed memory. The speed difference between the CPU and the main memory can be avoided by introducing cache memory between CPU and the main memory. Whenever CPU generates the main storage address, the cache starts to search whether that particular address is available in the cache.

This process is called the address mapping. If that address is available in the cache, read/write operation is executed in the cache. If it is not finding in the cache, read/write is performed in the main memory and the addressed word is available on the CPU simultaneously. If we want to put a new page in the cache, remove the old page from the main memory, only when the cache is full. The basic schemes used here are the write back and write through. Writing in a cache means writing in the main memory. That means main memory contains the same data as that in the cache.

Virtual Memory

Virtual memory mainly uses hard disk space (HDD) to replicate additional main memory. The operation of virtual memory is as follows. Whenever CPU generates a logic address of the required word for execution, firstly logic address is translated in to physical address. Then it will check whether the physical address is available in the main storage or not. If that is present in the main memory, it is read and executed. If not, it is considered as a page fault and takes the page containing that particular address from the secondary storage to the main memory. Then the word is read from the main memory.

The Operation of the CPU

The major part of the computer system is its Central Processing Unit (CPU). This is the part of the system where the main functions are performed. The Arithmetic and Logical Unit (ALU) and Control Unit (CU) are the two components of CPU. The ALU carry out all the logical and arithmetic functions while Control Unit controls the entire functions of the computer system.

Overview of Control Unit Design

The control unit is the entity of the computer system that controls the input, output and all other data transfer and operation functions taking place in the system. The functions of CU consist of the timing or sequencing and execution of various tasks along with interrupt handling. The sequencing defines the task to be performed at a particular cycle and execution signals give the order to execute the prescribed function. When an interrupt occurs, CU generates the signals to service interrupting entity by temporarily suspending all other processes and then return back to the previous task.

Hardwired Control

The Hardwired control is a method of hardware controlling of the computer central processing unit. In this method, the control signals are not generated by any dedicated entities. Instead, the bits of the instructions itself generates the required signals for carrying out the control functions. The main advantage of the hardwired controlling is its pace of performance while the unchangeable architecture is a real time drawback. Any alteration of the system requires the entire reconstruction of the unit which is not entertained in practical situations.

Micro Programmed

For the generation of control signals, committed entities are kept in the case of micro programmed controlling. Microcontrollers are used for this purpose, which is programmed to generate the signals required. The main and important advantage of this method of signal generation is its flexibility and ease in corrections and modification of the control unit. The speed constraint compared to the hardwired architecture is the main drawback of the system.

Arithmetic and Logic Unit

As the name indicates, ALU performs all the mathematical and logical calculations for the computer. This is the site where the actual calculations and execution of operations are carried out in a computer. Arithmetic and Logic Unit consists of inputs and outputs directly from the unit itself. A multiplexer is used to select the operation to be performed as well as the input given to it. The pins of the ALU have direct connections with the processor and control section.

Pipelining

Pipelining is a procedure used in the execution phase of a computer. When an instruction is performed, it can have various steps within itself. Each may be performed by different units of a computer. While a particular task is performed, the subtasks are defined, each to be accomplished by various entities one after the other. So, the component has to wait for the output of another, producing an idle state resulting in reduced throughput.

Pipelining is a technique adopted to eliminate these inactive states of various entities of computer. An instruction is split into various function subtasks such that while a subtask of an instruction is being carried out, a subtask of another instruction will be executed by an idle component such that there is no interference in the flow of execution. This results in an increased rate of instruction execution thereby increasing the overall performance of the CPU. The pipelining results in an execution time which is equal to the time taken by the component with lowest pace.

Implementation of DOS and UNIX

One of the first operating systems was the Disk Operating System of the DOS. DOS performs operations like managing of disk files, allocating system resources etc and it also controls some hardware devices. The loading of DOS is done by the BOOT record. DOS consists of files, directories etc. Directory consists of logically related files and it uses various commands for its operation. Directory performs operations like creating, deleting etc. Files perform operations like copying, deleting, renaming, creating etc. The UNIX OS consists of a kernel which is the innermost layer. UNIX consists of processes. A process is a program in execution. Process creation and execution are controlled by system calls like fork, child, parent etc. Fork system call is used to create a process.

The study of the computer organization and architecture leads to development of efficient programming skills as well as analytical expertise that directs to apposition of high proficiency.

Works Cited

What is DMA. Tech FAQ. 2009. Web.

Cite this paper

Select style

Reference

StudyCorgi. (2022, March 22). Computer Organization and Architecture. https://studycorgi.com/computer-organization-and-architecture/

Work Cited

"Computer Organization and Architecture." StudyCorgi, 22 Mar. 2022, studycorgi.com/computer-organization-and-architecture/.

* Hyperlink the URL after pasting it to your document

References

StudyCorgi. (2022) 'Computer Organization and Architecture'. 22 March.

1. StudyCorgi. "Computer Organization and Architecture." March 22, 2022. https://studycorgi.com/computer-organization-and-architecture/.


Bibliography


StudyCorgi. "Computer Organization and Architecture." March 22, 2022. https://studycorgi.com/computer-organization-and-architecture/.

References

StudyCorgi. 2022. "Computer Organization and Architecture." March 22, 2022. https://studycorgi.com/computer-organization-and-architecture/.

This paper, “Computer Organization and Architecture”, was written and voluntary submitted to our free essay database by a straight-A student. Please ensure you properly reference the paper if you're using it to write your assignment.

Before publication, the StudyCorgi editorial team proofread and checked the paper to make sure it meets the highest standards in terms of grammar, punctuation, style, fact accuracy, copyright issues, and inclusive language. Last updated: .

If you are the author of this paper and no longer wish to have it published on StudyCorgi, request the removal. Please use the “Donate your paper” form to submit an essay.