# 4.2 Understanding Computer Hardware

### **4.2 Understanding Computer Hardware**

**Weight:** 2

**Description:** Familiarity with the components that go into building desktop and server computers.

**Key Knowledge Areas:**

* Hardware

**The following is a partial list of the used files, terms and utilities:**

* Motherboards, processors, power supplies, optical drives, peripherals
* Hard drives, solid state disks and partitions, /dev/sd\*
* Drivers

## Hardware Components of a Computer

\
Hardware Components of a computer refers to the collection of physical parts of a computer\
system that we can touch or feel. This includes the computer case, monitor, keyboard, and\
mouse. It also includes all the parts inside the computer case, such as the hard disk drive,\
motherboard, video card, and many others.\
The hardware components of a computer or personal computer is categorized into 4 primary\
categories:&#x20;

1. System Unit
2. &#x20;Display Device
3. &#x20;Input Devices
4. &#x20;External Devices
5. &#x20;System Unit

### 1. System Unit

\
A System Unit is the main component of a personal computer, which houses the other devices\
necessary for the computer to function. It is comprised of a chassis and the internal components\
of a personal computer such as the system board (mother board), the microprocessor, memory\
modules, disk drives, adapter cards, the power supply, a fan or other cooling device and ports\
for connecting external components such as monitors, keyboards, mice, and other devices.

<figure><img src="/files/J2R783SGh5Y9faPP1ATj" alt=""><figcaption><p>System Unit components</p></figcaption></figure>

### 2. Display Devices

A display device is a personal computer component and is an output device that enables user to\
view the text and graphical data associated with a computer program. Display devices\
commonly connect to the system unit via a cable, and they have controls to adjust the settings\
for the device. They vary in size and shape, as well as the technology used.

<figure><img src="/files/s02AM7YaUWgywoIaXfpf" alt=""><figcaption><p>Display Device</p></figcaption></figure>

### 3. Input Devices

An input device is a personal computer component that enables users to enter data or\
instructions into a computer. The most common input devices are keyboards and computer\
mice. Input devices can connect to the system via a cable or a wireless connection.

<figure><img src="/files/iajE8A1VM36D1XJhn2sg" alt="" width="375"><figcaption></figcaption></figure>

### 4. External Devices

Any peripherals devices that are not housed inside the system unit are inherently external\
devices. A personal computer’s functionality can be enhanced by connecting different types of\
external devices to the system unit, often called peripherals devices. These devices typically\
provide alternative input or output methods or additional data storage. External devices are\
connected to the system unit via a cable or wireless connection. Some of them have their own\
power source and some draw power from the system.

|                                                                                                     |                 |                                                                                        |
| --------------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| <div><figure><img src="/files/DCjI8QsYt0W2vERSGbJA" alt=""><figcaption></figcaption></figure></div> | Microphone      | Provides audio input                                                                   |
| <div><figure><img src="/files/IP1sKani5HWGy0Z7M6Xr" alt=""><figcaption></figcaption></figure></div> | Digital Camera  | Provides graphical input                                                               |
| <div><figure><img src="/files/wkXJax4UK0xVk3iI2q98" alt=""><figcaption></figcaption></figure></div> | Scanner         | Provides graphical input                                                               |
| <div><figure><img src="/files/ionEoIEIY9NeQeTA51jS" alt=""><figcaption></figcaption></figure></div> | Speaker         | Provides audio output                                                                  |
| <div><figure><img src="/files/2FM2tKPgIEpRXhMaGDQa" alt=""><figcaption></figcaption></figure></div> | Printer         | Provides printed output                                                                |
| <div><figure><img src="/files/HNZGJrWRCOgkkbuCMRP3" alt=""><figcaption></figcaption></figure></div> | Network device  | <p>Provides communication with other<br>computers, such as access to the Internet.</p> |
| <div><figure><img src="/files/h3hm9Nc6ALQpJkSADliv" alt=""><figcaption></figcaption></figure></div> | External device | Provides additional data storage                                                       |

### 5. System Unit Components

1. The System Board
2. &#x20;Central Processing Unit
3. Memory
4. Power Supplies
5. Cooling Systems etc.

#### 1. The System Board

The system board is the personal computer component that acts as the backbone for the\
entire computer system as it serves as a single platform to connect all of the parts of a computer\
together. It connects the CPU, memory, hard drives, optical drives, video card, sound card, and\
other ports and expansion cards directly or via cables. System Board is also known as\
motherboard. It consists of a large, flat circuit board with chips and other electrical components\
on it.\
Some popular manufacturers of the motherboard are:&#x20;

* Intel
* Asus
* &#x20;Gigabyte
* &#x20;Biostar
* Msi

<figure><img src="/files/uCeRruvBMr8jBECxNBi8" alt=""><figcaption><p>System Board or Motherboard</p></figcaption></figure>

#### 2. Central Processing Unit (CPU)

\
The Central Processing Unit (CPU), sometimes called microprocessor or just processor, is\
the real brain of the computer and is where most of the calculations take place.\
Some popular manufacturers / designers of the CPU are:&#x20;

* Intel
* AMD
* Qualcomm
* &#x20;Media Tek
* NVIDIA

\
Central Processing Unit (CPU) consists of the following features: <br>

* CPU is considered as the brain of the computer.
* CPU performs all types of data processing operations.
* It stores data, intermediate results, and instructions (program).
* It controls the operation of all parts of the computer.

<figure><img src="/files/TEsvfXuxGrqp7DZdJpax" alt=""><figcaption><p>Central Processing Unit (CPU)</p></figcaption></figure>

#### 3. memory

Memory devices are hardware components that store digital data, categorized as primary (RAM, ROM) for active processing or secondary (HDD, SSD, USB drives, SD cards) for long-term storage, differing in speed, volatility (temporary vs. permanent data retention), and use, from fast volatile RAM for running apps to slow non-volatile drives for files. They work by representing data as binary digits (0s and 1s) using various physical states like voltage, magnetism, or charge. Types of Memory Devices

* **Primary Memory (Main Memory)**: Directly accessible by the CPU.
  * **RAM (Random Access Memory)**: Volatile (loses data without power); used for active programs and data (e.g., DRAM, SRAM).
  * **ROM (Read-Only Memory)**: Non-volatile; stores permanent instructions like BIOS (e.g., PROM, EPROM, EEPROM).
  * **Cache**: Very fast, small memory for frequently used data.
* **Secondary Storage (Auxiliary Storage)**: Non-volatile, for long-term storage.
  * **Magnetic**: Hard Disk Drives (HDDs), floppy disks, magnetic tapes.
  * **Solid-State**: Solid State Drives (SSDs), USB flash drives, memory cards (SD cards, etc.).
  * **Optical**: CDs, DVDs, Blu-ray discs.&#x20;

Key Characteristics

* **Volatility**: Volatile (RAM) vs. Non-Volatile (ROM, SSD, HDD).
* **Speed**: Cache > RAM > SSD > HDD > Optical/Tape.
* **Storage Capacity**: Varies greatly (GBs in RAM to TBs in HDDs).&#x20;

#### 4. Power Supply

Power Supply known as switch-mode power supply (SMPS) is an electronic circuit that\
converts power using switching devices that are turned on and off at high frequencies, and\
storage components such as inductors or capacitors to supply power when the switching\
device is in its non-conduction state.\
Switching power supplies have high efficiency and are widely used in a variety of electronic\
equipment, including computers and other sensitive equipment requiring stable and efficient\
power supply.

<figure><img src="/files/YbWcQY69ypaIg3WrgFnk" alt=""><figcaption><p>SMPS</p></figcaption></figure>

#### 5. Colling System

Cooling may be required for CPU, Video Card, Mother Board, Hard Drive, etc. Without\
proper cooling, the computer hardware may suffers from overheating. This overheating causes\
slow downs, system error messages, and crashing. Also, the life expectancy of the PC's\
components is likely to diminish. The following are commonly used techniques for cooling the\
PC or Server components:

* &#x20;Heat Sinks
* &#x20;CPU/Case Fans
* Thermal Compound
* Liquid Cooling Systems

\
**Heat Sinks:** The purpose of a heatsink is to conduct the heat away from the processor or any\
other component (such as chipset) to which it is attached. Thermal transfer takes place at the\
surface of a heatsink. Therefore, heat sinks should have a large surface area. A commonly used\
technique to increase the surface area is by using fins. A typical processor heat sink is shown\
in the figure below:

<figure><img src="/files/GUjy1Bz2FLMuDE2l0tB5" alt=""><figcaption><p>intel Dual Core Xenon LGA 771 heatsink</p></figcaption></figure>

**Fan:** The Fan is primarily used to force cooler air in to the system or remove hot air out of the\
system. A fan keeps the surrounding cooler by displacing air around the heatsink and other parts\
of the computer. A typical CPU fan is shown below.

<figure><img src="/files/zcqzt3YEN64P0qCaMEIK" alt="" width="250"><figcaption><p>Heatsink with Fan</p></figcaption></figure>

**Thermal Compound:** A thermal compound is used for maximum transfer of heat from CPU\
to the heatsink. The surface of a CPU or a heatsink is not perfectly flat. If you place a heatsink\
directly on a CPU, there will be some air gaps between the two. Air is a poor conductor of heat.\
Therefore, an interface material with a high thermal conductivity is used to fill these gaps, and\
thus improve heat conductivity between CPU and heatsink.

<figure><img src="/files/VrZofUX6PBxSECNYqoBh" alt="" width="375"><figcaption></figcaption></figure>

\
**Liquid Cooling Systems:** Like a radiator for a car, a liquid cooling system circulates a liquid\
through a heat sink attached to the processor. First, the cooler liquid passes through the heatsink,\
and then gets hot due to transfer of heat from the processor to the heatsink. Then the hot liquid\
passes through the radiator at the back of the case, and transfers the heat to the secondary\
coolant (air). Now, the liquid is cool enough to pass through the hot processor heatsink, and the\
cycle repeats. The chief advantage of LCS (Liquid Cooling System) is that the cooling takes\
place very efficiently (since liquids transfer heat more efficiently than air/solids). The disadvantages include bulkier cooling system, cost, and additional reliability issues associated with\
LCS.

<figure><img src="/files/6AyM5DPhSjVwM6qr1f69" alt="" width="336"><figcaption></figcaption></figure>

## Device Drivers

Drivers are used to help the hardware devices interact with the operating system. In windows, all the devices and drivers are grouped together in a single console called device manager. In Linux, even the hardware devices are treated like ordinary files, which makes it easier for the software to interact with the device drivers. When a device is connected to the system, a device file is created in **/dev** directory.&#x20;

**Most Common types of devices in Linux:**

1. **Character devices** - These devices transmit the data character by characters, like a mouse or a keyboard.
2. **Block devices** - These devices transfer unit of data storage called a *block,* USB drives, hard drives, and CD ROMs

To list all the device files use the below command:

```
ls -l /dev
```

```
[root@earth ~]# whoami 
root
[root@earth ~]# ls -l /dev
total 0
crw-------.  1 root  root     10,   123 Dec  9 08:52 acpi_thermal_rel
crw-r--r--.  1 root  root     10,   235 Dec  9 08:52 autofs
drwxr-xr-x.  2 root  root           340 Dec  9 08:54 block
drwxr-xr-x.  2 root  root            80 Dec  9 08:54 bsg
drwxr-xr-x.  3 root  root            60 Dec  9 12:22 bus
drwxr-xr-x.  2 root  root          4220 Dec  9 15:38 char
crw--w----.  1 root  tty       5,     1 Dec  9 08:52 console
lrwxrwxrwx.  1 root  root            11 Dec  9 12:22 core -> /proc/kcore
drwxr-xr-x. 10 root  root           200 Dec  9 12:22 cpu
crw-------.  1 root  root     10,   124 Dec  9 08:52 cpu_dma_latency
drwxr-xr-x.  9 root  root           180 Dec  9 12:22 disk
brw-rw----.  1 root  disk    253,     0 Dec  9 08:52 dm-0
brw-rw----.  1 root  disk    253,     1 Dec  9 08:52 dm-1
drwxr-xr-x.  2 root  root            60 Dec  9 12:22 dma_heap
drwxr-xr-x.  3 root  root           140 Dec  9 08:52 dri
crw-rw----.  1 root  video    29,     0 Dec  9 08:52 fb0
lrwxrwxrwx.  1 root  root            13 Dec  9 12:22 fd -> /proc/self/fd
crw-rw-rw-.  1 root  root      1,     7 Dec  9 08:52 full
crw-rw-rw-.  1 root  root     10,   229 Dec  9 08:52 fuse
crw-------.  1 root  root    254,     0 Dec  9 08:52 gpiochip0
crw-------.  1 root  root    242,     0 Dec  9 08:52 hidraw0
crw-------.  1 root  root    242,     1 Dec  9 08:54 hidraw1
crw-------.  1 root  root    242,     2 Dec  9 08:54 hidraw2
crw-------.  1 root  root     10,   228 Dec  9 08:52 hpet
drwxr-xr-x.  2 root  root             0 Dec  9 08:52 hugepages
crw-------.  1 root  root     10,   183 Dec  9 08:52 hwrng
lrwxrwxrwx.  1 root  root            12 Dec  9 08:52 initctl -> /run/initctl
drwxr-xr-x.  4 root  root           540 Dec  9 15:38 input
crw-r--r--.  1 root  root      1,    11 Dec  9 08:52 kmsg
crw-rw-rw-.  1 root  kvm      10,   232 Dec  9 08:52 kvm
lrwxrwxrwx.  1 root  root            28 Dec  9 12:22 log -> /run/systemd/journal/dev-log
crw-rw----.  1 root  disk     10,   237 Dec  9 08:52 loop-control
crw-rw----.  1 root  lp        6,     0 Dec  9 08:52 lp0
crw-rw----.  1 root  lp        6,     1 Dec  9 08:52 lp1
crw-rw----.  1 root  lp        6,     2 Dec  9 08:52 lp2
crw-rw----.  1 root  lp        6,     3 Dec  9 08:52 lp3
drwxr-xr-x.  2 root  root           100 Dec  9 08:52 mapper
crw-------.  1 root  root     10,   227 Dec  9 08:52 mcelog
crw-rw----+  1 root  video   237,     0 Dec  9 08:52 media0
crw-------.  1 root  root    238,     0 Dec  9 08:52 mei0
crw-r-----.  1 root  kmem      1,     1 Dec  9 08:52 mem
drwxrwxrwt.  2 root  root            40 Dec  9 12:22 mqueue
drwxr-xr-x.  2 root  root            60 Dec  9 12:22 net
crw-------.  1 root  root    239,     0 Dec  9 08:52 ng0n1
crw-rw-rw-.  1 root  root      1,     3 Dec  9 08:52 null
crw-------.  1 root  root    240,     0 Dec  9 08:52 nvme0
brw-rw----.  1 root  disk    259,     0 Dec  9 08:52 nvme0n1
brw-rw----.  1 root  disk    259,     1 Dec  9 08:52 nvme0n1p1
brw-rw----.  1 root  disk    259,     2 Dec  9 08:52 nvme0n1p2
crw-------.  1 root  root     10,   144 Dec  9 08:52 nvram
crw-r-----.  1 root  kmem      1,     4 Dec  9 08:52 port
crw-------.  1 root  root    108,     0 Dec  9 08:52 ppp
crw-rw-rw-.  1 root  tty       5,     2 Dec  9 15:51 ptmx
drwxr-xr-x.  2 root  root             0 Dec  9 12:22 pts
crw-rw-rw-.  1 root  root      1,     8 Dec  9 08:52 random
crw-rw-r--+  1 root  root     10,   242 Dec  9 08:52 rfkill
lrwxrwxrwx.  1 root  root             4 Dec  9 08:52 rtc -> rtc0
crw-------.  1 root  root    250,     0 Dec  9 08:52 rtc0
brw-rw----.  1 root  disk      8,     0 Dec  9 08:52 sda
brw-rw----.  1 root  disk      8,     1 Dec  9 08:52 sda1
brw-rw----.  1 root  disk      8,     2 Dec  9 08:52 sda2
brw-rw----.  1 root  disk      8,     3 Dec  9 08:54 sda3
brw-rw----.  1 root  disk      8,     4 Dec  9 08:52 sda4
brw-rw----.  1 root  disk      8,     5 Dec  9 08:52 sda5
brw-rw----.  1 root  disk      8,     6 Dec  9 08:52 sda6
brw-rw----.  1 root  disk      8,     7 Dec  9 08:52 sda7
brw-rw----.  1 root  disk      8,     8 Dec  9 11:39 sda8
brw-rw----.  1 root  disk      8,    16 Dec  9 08:54 sdb
crw-rw----.  1 root  disk     21,     0 Dec  9 08:52 sg0
crw-rw----.  1 root  disk     21,     1 Dec  9 08:54 sg1
drwxrwxrwt.  2 root  root           140 Dec  9 15:51 shm
crw-------.  1 root  root     10,   231 Dec  9 08:52 snapshot
drwxr-xr-x.  3 root  root           320 Dec  9 08:52 snd
lrwxrwxrwx.  1 root  root            15 Dec  9 12:22 stderr -> /proc/self/fd/2
lrwxrwxrwx.  1 root  root            15 Dec  9 12:22 stdin -> /proc/self/fd/0
lrwxrwxrwx.  1 root  root            15 Dec  9 12:22 stdout -> /proc/self/fd/1
crw-rw----.  1 tss   root     10,   224 Dec  9 08:52 tpm0
crw-rw----.  1 tss   tss     253, 65536 Dec  9 08:52 tpmrm0
crw-rw-rw-.  1 root  tty       5,     0 Dec  9 15:51 tty
crw--w----.  1 root  tty       4,     0 Dec  9 08:53 tty0
crw--w----.  1 root  tty       4,     1 Dec  9 08:53 tty1
crw--w----.  1 root  tty       4,    10 Dec  9 08:52 tty10

```

In the above output, we can see some other types of file types, some of them have **B** for a block device, **C** for character device some devices start with /dev/sda or /sdb. etc.

### /dev/sd\*

In Linux, the disk names are alphabetical. For example, dev/sda is the first hard drive, dev/sdb is the second hard drive, and so on. These devices are mass storage devices like memory sticks, hard drives, etc. Hence, sda means that this device was detected by the computer first.

* Example of **character device** is : ***/dev/consoles*** or ***/dev/ttyS0***. These devices are accessed as a stream of bytes.&#x20;
* Example of **block device**: /***dev/sdxn***. Block devices allow the programmer to read and write any size of the block. Pseudo devices act as device drivers without an actual device.&#x20;
* Examples of **pseudo devices** are ***/dev/null,*** ***/dev/zero,*** ***/dev/pf***&#x20;

that's all.

.

.

.

***

sources:

<https://dspmuranchi.ac.in/>

<https://www.geeksforgeeks.org/linux-unix/device-drivers-in-linux/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://borosan.gitbook.io/lpi-linux-essentials/4.2-understanding-computer-hardware.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
