Unit 1
Unit 1
● Components of CPU:
○ Arithmetic Logic Unit (ALU):
■ Responsible for performing arithmetic (addition, subtraction, multiplication, division) and
logical (AND, OR, NOT) operations on data.
■ ALU operations are fundamental to all computational tasks performed by the CPU.
○ Control Unit (CU):
■ Manages the execution of instructions, coordinating the activities of other hardware
components such as memory, input/output devices, and ALU.
■ Controls the flow of data within the CPU and between the CPU and external devices.
Primary Memory
● Cache Memory:
○ Purpose:
■ Cache memory is a smaller, faster type of volatile memory that temporarily stores frequently
accessed data and instructions.
■ It resides between the CPU and main memory (RAM), reducing latency and improving
overall system performance.
○ Types of Cache:
■ L1 Cache:
■ Located inside the CPU core or very close to it.
■ Has the smallest capacity but offers the fastest access speeds.
■ L2 Cache:
■ Located on the CPU chip or on a separate chip on the motherboard.
■ Larger than L1 cache and provides additional storage for frequently accessed data.
■ L3 Cache:
■ Shared among multiple CPU cores in a multi-core processor.
■ Larger in capacity but slower than L1 and L2 caches, optimizing performance across
multiple cores.
● Definition:
○ Secondary storage devices provide long-term storage for data and programs that are not actively in
use by the CPU.
○ They are non-volatile, retaining data even when the power is turned off.
● Examples of Secondary Storage Devices:
○ Hard Disk Drive (HDD):
■ Uses rotating magnetic platters and read/write heads to store data magnetically.
■ HDDs offer high capacity and are cost-effective but have slower access speeds compared to
SSDs.
○ Solid State Drive (SSD):
■ Utilizes flash memory (NAND or NOR) to store data electronically.
■ SSDs are faster, more durable, and energy-efficient compared to HDDs but are typically
more expensive per unit of storage.
○ Optical Drives:
■ Such as CD-ROMs, DVDs, and Blu-ray discs, use laser technology to read and write data
optically.
■ Optical drives are used primarily for data distribution and archival purposes.
● Characteristics of Secondary Storage:
○ Capacity:
■ Storage capacities of secondary storage devices range from several hundred gigabytes (GB)
to multiple terabytes (TB) and beyond.
○ Speed:
■ Secondary storage devices are slower than primary memory (RAM) but faster than tertiary
storage devices (e.g., tape drives).
○ Durability:
■ SSDs are generally more durable than HDDs due to their lack of moving mechanical parts.
● Definition:
○ Input/Output (I/O) devices facilitate communication between users and the computer system by
enabling input of data and output of processed information.
● Examples of I/O Devices:
○
Input Devices:
■ Keyboard, mouse, touchpad, scanner, microphone.
■ These devices allow users to input data and commands into the computer system.
○ Output Devices:
■ Monitor (display), printer, speakers, headphones.
■ Output devices present processed information and results to the user in a human-readable
format.
○ Storage Devices:
■ USB drives, external hard drives, memory cards.
■ These devices facilitate data storage, transfer, and backup operations.
● Role of I/O Devices:
○ I/O devices enable interaction between users and the computer system, allowing users to input
commands and data and receive output in various forms.
Units of Memory
● Bit:
○ Definition:
■ The smallest unit of data in computing, representing a binary digit (0 or 1).
■ Bits are fundamental to all digital computing operations and form the basis of data
representation and processing.
● Byte:
○ Definition:
■ Consists of 8 bits and is the basic unit of storage in most computer systems.
■ Bytes are used to represent a single character (e.g., letter, number, symbol) or small units of
data.
● Units of Memory:
○ KB (Kilobyte):
■ Approximately 1,000 bytes.
■ Used to measure small amounts of data or memory in computing.
○ MB (Megabyte):
■ Approximately 1 million bytes or 1,024 KB.
■ Commonly used to describe file sizes, main memory capacities, and data storage capacities.
○ GB (Gigabyte):
■ Approximately 1 billion bytes or 1,024 MB.
■ Used for describing larger amounts of data, memory, and storage capacities.
○ TB (Terabyte):
■ Approximately 1 trillion bytes or 1,024 GB.
■ Commonly used to quantify large-scale data storage capacities in modern computing
systems.
○ PB (Petabyte):
■ Approximately 1 quadrillion bytes or 1,024 TB.
■ Used for describing extremely large-scale data storage capacities, such as in data centers
and cloud computing environments.
● Practical Examples of Memory Units:
○ RAM Sizes:
■ Typical RAM sizes in consumer computers range from 4 GB to 32 GB, with higher capacities
available in high-end workstations and servers.
○ Storage Capacities:
■ Hard drives and SSDs are available in capacities ranging from hundreds of gigabytes (GB)
to multiple terabytes (TB), meeting diverse storage requirements in computing.
2. Classification of Computers
Supercomputers
● Definition:
○ Supercomputers are high-performance computing systems designed to solve complex
computational problems at very high speeds.
○ They are used for scientific simulations, weather forecasting, climate modeling, and other
demanding applications.
● Examples of Supercomputers:
○ IBM Summit:
■ Located at Oak Ridge National Laboratory, Summit is currently one of the most powerful
supercomputers in the world.
■ It achieves high performance through a combination of powerful CPUs and GPUs (Graphics
Processing Units).
○ Fujitsu Fugaku:
■ Located at RIKEN Center for Computational Science in Japan, Fugaku is another leading
supercomputer.
■ Fugaku excels in tasks such as drug discovery, climate research, and disaster prevention
simulations.
● Characteristics of Supercomputers:
○ Performance:
■ Supercomputers are measured in terms of FLOPS (Floating Point Operations Per Second),
indicating their computational speed.
■ They can perform trillions to quadrillions of calculations per second.
○ Architecture:
■ Supercomputers often use massively parallel processing architectures with thousands to
millions of CPU cores and specialized accelerators (e.g., GPUs).
■ High-speed interconnects and advanced cooling systems are critical to maintaining
performance.
Mainframe Computers
● Definition:
○ Mainframe computers are large-scale, high-performance systems designed for processing vast
amounts of data and supporting numerous users simultaneously.
○ They are used in industries requiring high reliability, security, and transaction processing
capabilities.
● Examples of Mainframe Computers:
○ IBM zSeries:
■ IBM's zSeries mainframes are widely used in banking, finance, and enterprise computing.
■ They offer robust security features, scalability, and support for large-scale database
management.
○ Unisys ClearPath:
■ ClearPath mainframes from Unisys cater to industries such as transportation, government,
and healthcare.
■ They provide mission-critical reliability and support legacy applications alongside modern
computing workloads.
● Characteristics of Mainframe Computers:
○ Reliability and Availability:
■ Mainframes are designed for continuous operation (24/7) with built-in redundancy and fault
tolerance mechanisms.
■ They offer high availability to support critical business processes without interruption.
○ Scalability and Performance:
■ Mainframes scale vertically, supporting thousands of simultaneous users and handling
massive transaction volumes.
■ They excel in batch processing, online transaction processing (OLTP), and enterprise
resource planning (ERP) applications.
● Definition:
○ Mini computers, also known as midrange computers, are smaller-scale systems with moderate
processing power compared to mainframes and supercomputers.
○ They are used in environments requiring more computing power than personal computers but less
than mainframes.
● Historical Significance:
○ Mini computers gained popularity in the 1960s to 1980s as alternatives to mainframes for business
computing and scientific research.
○ They offered more affordability and flexibility compared to mainframes.
● Examples of Mini Computers:
○ DEC VAX (Virtual Address eXtension):
■ The VAX series from Digital Equipment Corporation (DEC) was prominent in the mini
computer market.
■ VAX systems were known for their versatility, supporting diverse applications from scientific
computing to business operations.
● Applications of Mini Computers:
○ Departmental Computing:
■ Used within organizations for departmental-level data processing and computing needs.
■ They served as file servers, database servers, and application servers for specific business
functions.
○ Scientific Research:
■ Mini computers supported scientific research laboratories for data analysis, simulations, and
computational experiments.
■ They contributed to advancements in fields such as physics, chemistry, and engineering.
● Definition:
○ Personal computers (PCs) are small-scale computers designed for individual use by a single
person.
○ They have evolved from desktop systems to laptops, tablets, and handheld devices (e.g.,
smartphones).
● Evolution of PCs:
○ Desktop PCs:
■ Traditional form factor with separate components (CPU tower, monitor, keyboard, mouse).
■ Used for general computing tasks, gaming, and professional applications.
○ Laptops and Notebooks:
■ Portable versions of desktop PCs with integrated components (CPU, display, keyboard,
touchpad).
■ Offer mobility and versatility for users needing computing power on the go.
○ Tablets and Smartphones:
■ Touchscreen devices with compact form factors, running mobile operating systems (e.g.,
iOS, Android).
■ Primarily used for internet browsing, multimedia consumption, and mobile apps.
● Components of PCs:
○ CPU:
■ Executes instructions and processes data within the PC system.
■ Intel and AMD are major CPU manufacturers, producing processors for desktops, laptops,
and servers.
○ RAM:
■ Provides temporary storage for data and instructions during program execution.
■ DDR (Double Data Rate) RAM is commonly used in modern PCs for fast data access.
○ Storage Devices:
■ HDD (Hard Disk Drive):
■ Spinning magnetic disks for data storage.
■ Offers high capacity at lower cost per gigabyte compared to SSDs.
■ SSD (Solid State Drive):
■ Flash memory storage for faster data access and improved reliability.
■ Used in PCs for faster boot times, application loading, and file transfers.
○ Operating System:
■ Software that manages hardware resources and provides a user interface (e.g., Windows,
macOS, Linux).
■ Allows users to interact with applications and control system settings.
Definition of Software
Software is a set of instructions, data, or programs used to operate computers and execute specific tasks. It is the
opposite of hardware, which describes the physical aspects of a computer. Software encompasses all computer
programs, including applications and operating systems.
Types of Software
1. System Software
System software serves as the intermediary between computer hardware and application software, ensuring
hardware components and application programs function smoothly together.
a. Translator
Translators are essential tools in converting code written in high-level or assembly languages into machine code,
which the computer’s processor can understand and execute.
● Assembler:
○ Converts assembly language code, which uses symbolic names and mnemonics, into machine code.
○ Assembly language is closer to machine language and thus more efficient but harder to write.
○ Example: Translating MOV AX, BX into the corresponding binary code.
● Interpreter:
○ Translates high-level language code into machine code line-by-line and executes it immediately.
○ Easier to debug because it stops at the point of error.
○ Slower execution since each line is translated before execution.
○ Example: Python interpreter executes code line-by-line.
● Compiler:
○ Translates entire high-level language code into machine code before execution, creating an
executable file.
○ Faster execution than interpreted code because translation happens once.
○ Harder to debug as the entire code is compiled before execution.
○ Example: GCC compiler for C/C++ programs.
b. Loader
A loader is a component of the operating system that loads executable files into memory, making them ready for
execution by the CPU. The loader’s functions include:
c. Linker
A linker is a system utility that combines multiple object files generated by a compiler into a single executable
program. Its tasks include:
An operating system is the most critical piece of system software that manages hardware resources and provides an
environment for application software to run.
Functions of an OS:
● Process Management:
○ Manages the execution of processes, including their creation, scheduling, and termination.
○ Uses scheduling algorithms to allocate CPU time, such as round-robin, priority scheduling, and
multitasking.
○ Handles process synchronization and inter-process communication to ensure processes can work
together.
● Memory Management:
○ Allocates and deallocates memory space as needed by programs.
○ Uses techniques like paging and segmentation to manage memory.
○ Implements virtual memory to extend physical memory using disk space, allowing more programs to
run simultaneously.
● User Interface:
○ Provides a user-friendly interface for interaction with the system, either through a CLI (Command Line
Interface) or GUI (Graphical User Interface).
○ Ensures that users can easily perform tasks such as file management, application execution, and
system configuration.
Types of OS:
● Single-user OS:
○ Supports one user at a time.
○ Simple and often used in personal computers.
○ Examples: MS-DOS, early versions of Windows.
● Multi-user OS:
○ Allows multiple users to use the system simultaneously by managing user sessions.
○ Provides user-specific environments and resources.
○ Examples: Unix, Linux, Windows Server.
● Multiprogramming OS:
○ Supports running multiple programs simultaneously by sharing CPU time among them.
○ Increases CPU utilization and system efficiency.
○ Examples: Early Unix systems, IBM OS/360.
● Multiprocessing OS:
○ Supports the use of multiple processors to perform tasks simultaneously.
○ Enhances performance and reliability by distributing tasks across multiple CPUs.
○ Examples: Modern versions of Windows, Linux, and Unix that support multi-core processors.
● Time-sharing OS:
○ Allows multiple users to interact with the system simultaneously by sharing CPU time slices, providing
a responsive interactive experience.
○ Each user perceives having a dedicated CPU due to rapid context switching.
○ Examples: Unix, Multics.
2. Application Software
Application software is designed to perform specific tasks for users, enhancing productivity, creativity, and
entertainment. These programs are built to help users perform particular functions beyond the basic operation of the
computer itself.
● Word Processors:
○ Used for creating, editing, formatting, and printing text documents.
○ Provides tools for spell checking, grammar checking, and text formatting.
○ Examples: Microsoft Word, Google Docs.
● Spreadsheets:
○ Used for organizing, analyzing, and storing data in tabular form.
○ Offers functions and formulas for data analysis, graphing tools, and pivot tables.
○ Examples: Microsoft Excel, Google Sheets.
● Media Players:
○ Used for playing audio and video files.
○ Supports various media formats and provides features like playlists, subtitles, and media libraries.
○ Examples: VLC Media Player, Windows Media Player.
● Web Browsers:
○ Used for accessing and browsing the internet.
○ Provides features like tabbed browsing, bookmarks, and extensions for enhanced functionality.
○ Examples: Google Chrome, Mozilla Firefox.
Utility software helps manage, maintain, and control computer resources, ensuring the system runs efficiently. These
tools often come bundled with operating systems but can also be installed separately.
● Antivirus Software:
○ Protects the system from malware, viruses, and other malicious attacks.
○ Scans, detects, and removes harmful software.
○ Provides real-time protection and scheduled scanning.
○ Examples: Norton Antivirus, McAfee, Bitdefender.
● Backup Software:
○ Creates copies of data to prevent data loss due to hardware failure, accidental deletion, or other
disasters.
○ Supports full, incremental, and differential backups.
○ Often includes scheduling and restoration features.
○ Examples: Acronis True Image, Backblaze, Time Machine for macOS.
● Disk Defragmenters:
○ Reorganizes fragmented data on the disk to improve read/write performance.
○ Consolidates fragmented files and free space to optimize disk usage.
○ Examples: Windows Disk Defragmenter, Defraggler.
A GUI allows users to interact with electronic devices through graphical elements such as windows, icons, buttons,
and menus. GUIs are designed to be user-friendly and intuitive, minimizing the need for users to remember complex
commands.
● Advantages:
○ User-friendly, especially for beginners.
○ Visual feedback makes it easier to understand actions.
○ Facilitates multitasking with multiple open windows and applications.
○ Enhances productivity with drag-and-drop features and graphical representations.
● Disadvantages:
○ Resource-intensive, requiring more memory and processing power.
○ Slower for advanced users who can perform tasks more quickly through command-line interfaces.
○ Can be less flexible for automation compared to scripting in CUIs.
● Examples:
○ Windows OS: Features a start menu, taskbar, and desktop icons, providing an intuitive environment
for users.
○ macOS: Includes a dock, menu bar, and Finder windows, emphasizing ease of use and aesthetics.
○ GNOME: A popular Linux desktop environment known for its simplicity and modern interface.
○ KDE Plasma: A highly customizable Linux desktop environment with a wide range of tools and
features.
A CUI, or Command Line Interface (CLI), allows users to interact with the computer using text-based commands.
CUIs are powerful for advanced users who need to perform complex tasks quickly and efficiently.
● Advantages:
○ Less resource-intensive, as it does not require graphical processing.
○ Often faster for experienced users, allowing for quick command execution.
○ Provides powerful scripting capabilities for automating tasks.
○ Greater control over the operating system and applications.
● Disadvantages:
○ Steeper learning curve, as users must remember and type commands.
○ Less intuitive for beginners who may struggle with complex commands and syntax.
○ Limited visual feedback, making it harder to understand the results of commands without prior
knowledge.
● Examples:
○ Linux Terminal: A CLI environment for interacting with the Linux operating system, offering powerful
tools and utilities.
○ Windows Command Prompt: A CLI environment for interacting with the Windows operating system,
useful for system administration and troubleshooting.
○ PowerShell: An advanced command-line shell and scripting language for Windows, offering
enhanced functionality over Command Prompt.
Basic Commands in LINUX
GUI in Linux
Linux GUIs, such as GNOME and KDE Plasma, offer a user-friendly environment for interacting with the operating
system, providing graphical tools and applications for managing files, running programs, and configuring the system.
● GNOME:
○ Designed for simplicity and ease of use, featuring a clean, modern interface with a focus on
minimalism and efficiency.
○ Provides a range of built-in applications and tools for everyday tasks, such as file management, web
browsing, and system settings.
● KDE Plasma:
○ Highly customizable and powerful, with a variety of tools and features for advanced users.
○ Offers a flexible interface that can be tailored to individual preferences, with options for changing
themes, layouts, and widgets.
CUI in Linux
Linux provides a powerful terminal for performing tasks via the command line. Here are some basic commands and
their usage:
tar: Archives multiple files into a single file or extracts files from an archive.