Linux System Admin Journey - Day 0 {Glimpse on Hardware}


Prerequisites to know, before starting any technology.
If we want to do something in the field of technology (either its Linux (OS), Networking, Programming, etc), we should have a brief understanding of the 3 components of Computer Hardware.
1. CPU (also called Processor) → For computing the operations like (+, -, *, /, %), etc.
2. RAM (volatile memory) → That stores the running programs (often known as processes) in it. Once the computer or system is shut down, all the programs are wiped out from the RAM, therefore it is called volatile memory.
3. Hard disk (non-volatile memory) → This stores the persistent data, and will never get lost or wiped out even if the computer or the system shuts down. Therefore it is called non-volatile memory.
Nowadays, most people use SSDs (Solid State Drives) for their local systems, and even the big companies that need high-performance environments in their data centers for (cloud computing, databases, or analytics), prefer SSDs over old HDDs.
HDDs may still be used due to their higher capacity at a lower cost, for archival or less performance-critical applications. Depending on the storage requirements, some data centers also employ a mix of SSDs and HDDs. HDDs are still used in startup companies to reduce the cost of storage.
Why SSDs are preferred over HDDs?
Speed: SSDs are much faster in terms of read/write speeds compared to HDDs, leading to improved performance, especially in workloads that require high-speed data access. Data travels in electrical signals in SSDs.
Durability: SSDs have no moving parts, therefore making them more resilient to physical shocks or vibrations.
Efficiency: SSDs tend to consume less power, generating less heat compared to HDDs, which can reduce overall operational costs and improve the longevity of other hardware components.
Low Latency: SSDs provide lower latency for data access, which is critical for applications that need quick data retrieval, such as databases, high-performance computing, and virtual machines.
To know more about SSDs, refer to this blog 👉🏻 SSD-detailed-info 👈🏻
Chit-chat on Hard Disk Drives (HDDs) and their interfaces.
# HDDs are also of different types, and different HDDs have different interfaces (i.e. set of protocols, standards, or physical connections that allow devices, such as hard drives, motherboards, and other peripherals, to communicate and exchange data with each other).
EX: When we talk about the interface of a hard disk drive (HDD), we're referring to the technology and protocol that enable the hard drive to connect and communicate with the computer or server.
The primary protocol designed for HDDs (Hard Disk Drives) is SATA (Serial ATA), which is the most common interface used for connecting HDDs to a computer. SATA has evolved through different versions (SATA I, SATA II, and SATA III) with increasing data transfer rates, but it still remains slower than other interfaces like PCIe (used for NVMe SSDs).
While SATA is the dominant protocol for HDDs, there is also SAS (Serial Attached SCSI), which is used in enterprise environments. SAS is a more robust and faster interface compared to SATA and is often found in servers or high-performance storage systems. SAS can support higher data transfer speeds and is more reliable for handling large-scale data operations.
The interface determines things like:
How data is transferred:
The data is sent either serially or in parallel.
The speed at which data is transferred → This tells
The transfer of data is synchronous or asynchronous →
In Synchronous transfer, the data is sent in sync with the clock signal (i.e. both the sender and receiver devices are in sync with the same clock so they know exactly when to send and receive data). This ensures more controlled and predictable data transfer.
Example: Many high-speed interfaces like SAS and some memory systems use synchronous transfer. This is the most preferred way to send the data between the different divisions (or branches) of the companies.
(Ex: Deloitte Hyderabad, Deloitte Bangalore, Deloitte Gurugram).In Asynchronous transfer, the data is sent without a shared clock, so the sender and receiver don’t rely on timing signals. Instead, they use other methods (like start/stop bits or timing protocols) to manage the data flow. It can be less efficient but is more flexible for different devices and situations.
Example: Older serial interfaces.
Physical connectors: The type of ports, cables, or connectors used to link the device (hard disk) to the system.
Data protocols: How data is formatted, accessed, and handled across the interface.
SATA (Serial ATA):
Common use: Consumer desktops, laptops, and external drives.
Speed: Generally up to 6 Gbps (SATA III).
Characteristics: SATA is the most common interface for consumer-level hard drives. It’s affordable and provides good performance for general storage needs.
SCSI (Small Computer System Interface):
Common use: Older servers, some high-performance storage systems.
Speed: Generally up to 320 MBps (for older versions).
Characteristics: SCSI has been replaced by SAS for the most part, but is still used in legacy systems. It can connect multiple devices in a chain and offers higher performance than standard ATA interfaces.
SAS (Serial Attached SCSI):
Common use: Enterprise servers, data centers, high-performance computing.
Speed: Typically up to 12 Gbps (SAS 3.0), with some models offering even higher speeds.
Characteristics: SAS drives are designed for more demanding environments. They offer better performance, reliability, and support for higher workloads compared to SATA. SAS drives can be used in a dual-port setup, enabling redundancy and faster data access.
iSCSI (Internet Small Computer System Interface):
Common use: Storage area networks (SANs) that connect servers and storage devices over IP networks.
Speed: Depends on network bandwidth (can go up to 40 Gbps or more with proper infrastructure).
Characteristics: iSCSI is a protocol that allows you to access remote storage over a network. It’s often used for enterprise-level storage systems, as it enables centralized storage that can be shared across multiple systems.
FC (Fibre Channel):
Common use: High-speed data centers and enterprise storage environments.
Speed: Can go up to 32 Gbps or higher.
Characteristics: Fibre Channel is a high-speed networking technology used to create storage area networks (SANs). It's designed for large-scale storage systems, offering fast, reliable, and high-volume data transfers.
In last, the interface choice depends largely on your needs. For typical home or office use, SATA drives are sufficient, while for enterprise or high-performance environments, SAS, iSCSI, or Fibre Channel interfaces are preferred for their speed and reliability.
How can users interact with the Hardware?
If we want to interact with the Hardware, we need a medium to interact, because we can’t directly interact with the Hardware, as it talks in bits (1010100011001). So the medium to interact with the Hardware is OS (Operating System) → {System that takes our requirement and sends it to the Hardware to be done}.
Ex:
Make a directory on the Desktop and place 50 files in it. → This requirement will be taken by the OS and will be given to hardware, and at the end, a directory will be created on the Desktop with the 50 files in it and will eventually be stored on the Hard disk.
Always remember: Files are not directly saved in the Hard disk, Files are first stored in the Folder (or directory), and then, that folder is saved to the Hard disk.
To perform calculations or operations (433+50, 389×70/22+84) → This requirement will also be taken by the OS, and will be given to the Hardware, and then eventually the result will come.
Now, I said, the medium to interact with the Hardware is the OS, but how to interact with the OS?
We humans (users) can’t directly interact with the OS, even though the OS is a high-level program. Therefore, we need something called a “GUI“ interface or a “Terminal“ with a shell program, where we can run the commands (or programs), → which will eventually be taken by the OS and will be given to the Hardware.
NOTE: Shell is a program given to the users by the terminal. There are multiple types of shells that we can install.
Now, here’s a catch, OS doesn’t directly communicate with the Hardware, as it is a High-level program. There is another component called “Kernel“ which is a low-level program, and that interacts with both the OS and the Hardware.
Working of the program/software/command that is just launched, and is loaded into the RAM.
Note: Once the Program loads into the RAM, it is no longer termed as a “Program“. It is termed as a “Process“.
This is a high-level diagram of the working of the program launched into the RAM. If you’ll go in deep, you’ll also know about the states through which the Program goes.
Subscribe to my newsletter
Read articles from Archit Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
