Computer Organization - Computer Subsystem (Hardware)
Computers are complex systems with two essential subsystems: hardware and software. The hardware component encompasses all the physical devices that make up the computer, including the central processing unit (CPU), memory modules, various buses for data transfer, storage devices such as hard drives and solid-state drives, and an array of input and output peripherals. On the other hand, the software subsystem comprises the diverse collection of programs that breathe life into the hardware. This includes the operating system, which orchestrates hardware resources and provides a user interface, along with a multitude of applications, utilities, and software tools that allow users to perform a wide range of tasks, from word processing to graphic design and beyond. These two subsystems, hardware and software, work in concert to deliver the functionality and versatility that have become synonymous with modern computing.
Hardware
1. Central Processing Unit (CPU)
- The CPU, or Central Processing Unit, can be likened to the computer's brain.
- It's the location where complex arithmetic and logical operations are carried out.
- CPU speed is typically measured in megahertz (millions of clock-ticks per second) or gigahertz.
- Examples of well-known CPUs include Intel Pentium, AMD K6, Motorola PowerPC, and Sun SPARC.
- Each CPU has unique capabilities and specialties, shaping the overall computing experience.
- Just like an engine power a car, the CPU drives everything from web browsing to video editing in your computer.
2. Random Access Memory (RAM)
- Main memory in computers is both fast and volatile, serving as a temporary workspace during computer operations, similar to a person's short-term memory.
- Main memory is constructed from numerous tiny switches that can be in an "on" or "off" position, where "on" represents 1, and "off" represents 0. These individual switches are called binary digits or bits.
- Bytes are fundamental units of digital data storage in computer memory, consisting of eight bits. Memory capacity is often measured in powers of two, with 2^10 bytes known as a "kilobyte" (1K) and 2^20 bytes referred to as a "megabyte" (1M).
3. Secondary Memory (DISC)
- Stable storage employs magnetic or optical media for long-term data retention.
- It can be likened to a person's long-term memory, preserving information over extended periods.
- Stable storage offers much larger storage capacities than RAM.
- Data retrieval from stable storage is slower compared to RAM.
- Notable examples include floppy disks (measured in kilobytes), hard disks (measured in gigabytes), and CD-ROMs (measured in megabytes)
4. The Bus
- A set of wires that is used to connect the computer's internal component.
- It links the CPU with other hardware devices within the computer.
- Comparable to a person's spinal cord, facilitating communication between components.
- Its speed is measured in megahertz (like the CPU) but is usually significantly slower.
- Often identified as the bottleneck in many of today's personal computers.
- The Interconnected components of Computer
- The CPU
- The Memory Subsystem
- The I/O Subsystem
- There are 3 types of Buses
- Address Bus
- Data Bus
- Signal Bus
- The above 3 makes up the System Bus.
4.1 Address Bus
- Used for specifying the memory location to access within the computer's memory.
- Every I/O device, such as a monitor, mouse, or CD-ROM, is assigned a distinct address.
- The CPU accesses data or instructions from various locations by specifying the address of the desired location.
- The CPU exclusively outputs data to the address bus and doesn't read from it.
4.2 Data Bus
- Serves as a vital data transfer pathway within the computer.
- Facilitates parallel data transmission for increased processing speed.
- Enables bidirectional communication between the CPU and hardware components.
- Data bus width, measured in bits, determines data transfer capacity.
- Crucial for overall CPU performance, affecting the computer's processing efficiency.
- When the CPU sends an address to the memory, the memory sends the data via the data bus to the CPU.
4.3 Control Bus
- A collection of individual control signals guides various computer operations.
- Control signals determine whether the CPU reads or writes data.
- They specify if the CPU is accessing memory or interacting with an I/O device.
- These signals indicate readiness for data transfer.
- Specific control signals include:
- Memory Read: Data from memory placed on the data bus.
- Memory Write: Data on the bus stored at a designated memory address.
- I/O Read: Data transferred from an I/O device to the data bus.
- I/O Write: Data from the bus output to a specified address in the I/O port.
4.4 I/O Bus or Local Bus
- I/O controllers in modern computers include an additional bus known as the I/O bus.
- The I/O bus typically operates at a slower speed compared to the system bus.
- This bus serves as a pathway for input and output devices to communicate with the computer processor.
- The I/O bus is essential for accessing all other I/O devices connected to the system.
- An example of such a bus is the PCI bus.
5. Cache Memory
- Accessing RAM is quicker than accessing secondary memory, but it remains relatively slow compared to the CPU's processing speed.
- To overcome this speed gap, many systems incorporate a high-speed cache memory directly connected to the CPU. This cache memory is designed to store frequently used instructions and data. The assumption behind this approach is that if certain instructions or data were needed recently, they are likely to be needed again in the near future.
- Cache memory is often organized into multiple levels (L1, L2, and sometimes L3), with each level having different speeds and sizes. This hierarchy allows for a balance between quick access and storage capacity.
- Cache management involves complex algorithms to decide which data to retain in the cache and which to replace. Common strategies include Least Recently Used (LRU), First-In, First-Out (FIFO), and Random replacement.
- In multi-core processors or systems with shared memory, maintaining cache coherency becomes critical to ensure all cores have consistent data. This involves managing how changes made in one cache are reflected in other caches and main memory.
- Cache performance is evaluated based on cache hits (when data is found in the cache) and cache misses (when data is not found and must be fetched from a lower-level cache or main memory). Improving the hit rate is a key goal in cache design.
- Designing cache involves trade-offs between size, speed, and complexity. Larger caches can store more data but may have longer access times, while smaller caches are faster but may result in more cache misses. Finding the right balance is crucial for optimal performance.
Comments
Post a Comment