Computer Systems - Detailed Notes

Introduction to Computer Systems

  • A computer is an electronic device that accepts data (input), processes it, and generates results (output).

  • A computer system includes the computer itself along with additional hardware and software.

  • Key components: Central Processing Unit (CPU), memory, input/output devices, and storage devices.

  • These components work together to deliver the desired output.

  • Computer systems vary in form and size, from high-end servers to personal desktops, laptops, tablets, and smartphones.

  • Figure 1.1 shows the block diagram of a computer system, illustrating data flow between components.

Central Processing Unit (CPU)

  • The CPU is the electronic circuitry that performs the actual processing; often referred to as the "brain" of the computer.

  • Also known as the processor.

  • Physically, a CPU is placed on one or more microchips, which are integrated circuits (ICs) made of semiconductor materials.

  • Alan Turing Quote: "A computer would deserve to be called intelligent if it could deceive a human into believing that it was human."

CPU Operation
  • The CPU receives instructions and data through programs.

  • It fetches the program and data from memory, performs arithmetic and logic operations according to the instructions, and stores the result back in memory.

  • During processing, the CPU stores data and instructions in its local memory called registers.

    • Registers are part of the CPU chip, limited in size and number.

    • Different registers store data, instructions, or intermediate results.

  • Main CPU components: Arithmetic Logic Unit (ALU) and Control Unit (CU).

    • ALU performs arithmetic and logic operations.

    • CU controls sequential instruction execution, interprets instructions, and manages data flow through memory, ALU, and I/O devices.

  • The CPU is also known as a microprocessor (covered in section 1.5).

Input Devices

  • Devices that send control signals to a computer.

  • Convert input data into a digital form that the computer can accept.

  • Examples: keyboard, mouse, scanner, touch screen (Figure 1.2).

  • Braille keyboards are available for visually impaired users.

  • Voice input is possible (e.g., Google voice search).

  • Input data is temporarily stored in the main memory (RAM).

  • For permanent storage, data and instructions are stored in secondary memory.

Output Devices

  • Devices that receive data from a computer for display or physical production.

  • Convert digital information into human-understandable form.

  • Examples: monitor, projector, headphone, speaker, printer (Figure 1.3).

  • Braille display monitors are useful for visually challenged users.

  • Common printer types: inkjet, laserjet, and dot matrix.

  • 3D printers create physical replicas of digital 3D designs.

    • Used in manufacturing for prototypes and explored in the medical field for developing body organs.

Evolution of Computers

  • Computing devices have evolved from simple calculators to powerful data processors in a relatively short time.

  • Figure 1.4 shows a timeline of key inventions in computing technology.

Key Inventions

  • Abacus: Mechanical device for simple arithmetic calculations (500 BC).

  • Pascaline: Mechanical calculator invented by Blaise Pascal for addition and subtraction (1642).

  • Analytical Engine: Invented by Charles Babbage, a mechanical computing device for inputting, processing, storing, and displaying output; considered the basis of modern computers (1834).

  • Tabulating Machine: Designed by Herman Hollerith for summarising data stored on punched cards; a step towards programming (1890).

  • Turing Machine: The theoretical general-purpose programmable machine capable of solving any problem by executing a program stored on punched cards (1937).

  • EDVAC/ENIAC: Computers developed based on John Von Neumann's concept of stored program, capable of storing data and programs in memory (1945).

  • Transistor: Developed at Bell Labs using semiconductor materials, replacing vacuum tubes (1947).

  • Integrated Circuit (IC): A silicon chip containing an entire electronic circuit in a small area, drastically reducing computer size (1970).

Von Neumann Architecture

  • Figure 1.5 illustrates the Von Neumann architecture.

  • Consists of a CPU for processing, memory for storing data and programs, I/O devices, and communication channels.

  • ENIAC is the first binary programmable computer based on Von Neumann architecture.

Advancements in Integration

  • Large Scale Integration (LSI): Integrated a complete CPU on a single chip (microprocessor) in the 1970s.

  • Moore’s Law: Predicted exponential growth in the number of transistors on a microchip.

  • Very Large Scale Integration (VLSI): Integrated around 3 million components on a small chip in the 1980s, increasing processing power.

  • Super Large Scale Integration (SLSI): Fabricates a high density of transistors (approx. components) on a single IC.

  • Figure 1.6 illustrates the exponential growth in the number of transistors used in integrated circuits (ICs) over time.

Personal Computing

  • IBM introduced its first personal computer (PC) for home use in 1981.

  • Apple introduced Macintosh machines in 1984.

  • The introduction of Graphical User Interface (GUI)-based operating systems by Microsoft increased PC popularity.

  • The growth of the World Wide Web (WWW) in the 1990s accelerated computer usage.

  • Laptops provided portable personal computing.

  • Smartphones, tablets, and personal digital assistants leveraged processor miniaturisation, faster memory, and high-speed data connectivity.

  • The next wave includes wearable gadgets (such as smartwatches and lenses) and smart appliances in the Internet of Things (IoT) that utilise Artificial Intelligence (AI).

Computer Memory

  • Computer systems need memory to store data and instructions for processing.

  • Main (primary) memory is typically what is referred to when discussing computer memory.

  • Secondary memory (storage device) is used for permanent storage.

Units of Memory

  • Computer systems use binary numbers to store and process data.

  • The binary digits 0 and 1 are called bits.

  • Bits are grouped to form words.

  • Nibble: A 4-bit word (e.g., 1001, 1010).

  • Byte: An 8-bit word (e.g., 01000110, 01111100).

  • Bytes are grouped into larger units.

  • Table 1.1 shows measurement units for digital data.

Table 1.1: Measurement Units for Digital Data

Unit

Description

Unit

Description

KB (Kilobyte)

1 KB = 1024 Bytes

PB (Petabyte)

1 PB = 1024 TB

MB (Megabyte)

1 MB = 1024 KB

EB (Exabyte)

1 EB = 1024 PB

GB (Gigabyte)

1 GB = 1024 MB

ZB (Zettabyte)

1 ZB = 1024 EB

TB (Terabyte)

1 TB = 1024 GB

YB (Yottabyte)

1 YB = 1024 ZB

Types of Memory

  • Two types of memory: primary and secondary.

Primary Memory
  • Essential component: Programs and data are loaded before processing.

  • The CPU interacts directly with primary memory for both read and write operations.

  • Two types: Random Access Memory (RAM) and Read-Only Memory (ROM).

    • RAM: Volatile (data is retained as long as power is supplied).

      • Used for temporary data storage while the computer is working.

      • When the computer starts or an application launches, programs and data are loaded into RAM.

      • Faster than secondary memory.

    • ROM: Non-volatile (contents are not lost when power is off).

      • Used for permanent storage of rarely changed content (e.g., startup program/boot loader for loading the OS).

Cache Memory
  • High-speed memory between the CPU and primary memory.

  • Stores copies of frequently accessed data from primary memory, reducing access time.

  • The CPU checks the cache first; if data is found, it is read from the cache; otherwise, primary memory is accessed.

Secondary Memory
  • Limited storage capacity in primary memory; RAM is volatile, ROM is read-only.

  • Secondary memory permanently stores data and instructions for future use.

  • Non-volatile and has a larger storage capacity than primary memory.

  • Slower and cheaper than main memory.

  • Cannot be accessed directly by the CPU; contents must be loaded into main memory for CPU access.

  • Examples: Hard Disk Drive (HDD), CD/DVD, Memory Card (Figure 1.7).

  • Solid State Drives (SSDs) support faster data transfer speeds than Hard Disk Drives (HDDs).

  • Portable flash drives (pendrives) have simplified data transfer.

Data Transfer Between Memory and CPU

  • Data transfers occur between the CPU and primary memory, and between primary and secondary memory.

Buses

  • Data is transferred using physical wires called buses (e.g., USB port to hard disk, hard disk to main memory).

  • Three types of buses:

    • Data bus: Transfers data between components.

    • Address bus: Transfers addresses between the CPU and main memory.

    • Control bus: Communicates control signals between components.

  • These buses collectively form the system bus (Figure 1.8).

Data Flow

  • Data from input devices or the hard disk needs to be placed in main memory before processing by the CPU.

  • The CPU uses the address bus to specify the memory location for reading or writing data.

  • The CPU specifies read or write control signals via the control bus during instruction execution.

  • The data bus is bidirectional because the CPU may read from or write to main memory.

  • The control and address buses are unidirectional.

  • Memory controller manages data flow into and out of main memory.

Microprocessors

  • Early CPUs occupied a large room; now, they can be placed on a single microchip.

  • A processor (CPU) implemented on a single microchip is called a microprocessor. Nowadays, nearly all CPUs are microprocessors.

  • Microprocessors are small-sized electronic components that perform data processing, arithmetic, and logical operations.

  • Modern microprocessors are built over integrated circuits with millions of components like resistors, transistors, and diodes.

  • Microprocessors have evolved, increasing processing capability while decreasing physical size and cost.

  • Current processors can process millions of instructions per millisecond.

  • Table 1.2 lists different microprocessor generations, time periods, and underlying technology.

Table 1.2: Generations of Microprocessor

Generation

Era

Chip type

Word size

Max Memory Size

Clock speed

Cores

Example*

First

1971-73

LSI

4 / 8 bit

1 KB

108 KHz- 200 KHz

Single

Intel 8080

Second

1974-78

LSI

8 bit

1 MB

Upto 2 MHz

Single

Motorola 6800








Intel 8085

Third

1979-80

VLSI

16 bit

16 MB

4 MHz - 6 MHz

Single

Intel 8086

Fourth

1981-95

VLSI

32 bit

4 GB

Upto 133 MHz

Single

Intel 80386








Motorola 68030

Fifth

1995-Now

SLSI

64 bit

64 GB

533 MHz - 34 GHz

Multicore

Pentium








Celeron, Xeon

Microprocessor Specifications

  • Classified based on chip type, word size, memory size, clock speed, etc.

Word Size
  • The maximum number of bits a microprocessor can process at a time.

  • Earlier, 8 bits was the maximum.

  • Presently, minimum is 16 bits, and maximum is 64 bits.

Memory Size
  • RAM size varies depending on word size.

  • Initially, RAM was small (4MB) due to 4/8 bit word size.

  • With 64-bit word size, RAM can be up to 16 Exabytes (EB).

Clock Speed
  • The internal clock generates pulses (signals) at regular intervals.

  • Indicates the speed at which the computer can execute instructions.

  • Measured in Hertz (Hz) and Kilohertz (kHz) earlier; now measured in Gigahertz (GHz).

Cores
  • A basic computation unit of the CPU.

  • Earlier processors had only one core; now, multicore processors execute multiple tasks.

  • CPUs with two, four, and eight cores are called dual-core, quad-core, and octa-core processors, respectively.

Microcontrollers

  • A small computing device with a CPU, fixed RAM, ROM, and peripherals embedded on a single chip (Figure 1.9).

  • Examples: keyboard, mouse, washing machine, digital camera, pendrive, remote controller, microwave.

  • Designed for specific tasks, reducing size and cost.

  • Embedded in another device or system to perform specific functionality.

  • Example: a washing machine microcontroller controls the washing cycle automatically, saving time and effort.

Data and Information

  • Computers primarily process data.

  • A computer system considers everything as data (instructions, pictures, videos, etc.).

  • Data can be raw and unorganized facts processed to get meaningful information.

  • Understanding data types is crucial for understanding computer functioning.

Data and Its Types

  • Input devices provide raw data in the form of facts, concepts, instructions, etc.

  • Internally, everything is stored in binary form (0 and 1).

  • Externally, data can be input as text (A-Z, a-z, 0-9, special symbols) or in other languages.

  • The input data may be from different sources in different formats (e.g., images as RGB pixels, videos as frames).

Structured Data
  • Data following a strict record structure.

  • Easy to comprehend; stored in a data file.

  • Organized in row/column format.

  • May be sorted in ascending or descending order.

  • Examples: monthly attendance records (Table 1.3), sales transactions, online ticketing, ATM transactions.

Table 1.3: Structured Data Example - Monthly Attendance Records

Roll No

Name

Month

Attendance (%)

R1

Mohan

May

95

R2

Sohan

May

75

R3

Sheen

May

92

R4

Geet

May

82

R5

Anita

May

97

R1

Mohan

July

98

R2

Sohan

July

65

R3

Sheen

July

85

R4

Geet

July

94

R5

Anita

July

85

Unstructured Data
  • Data not organized in a pre-defined record format.

  • Examples: audio and video files, graphics, text documents, social media posts, satellite images (Figure 1.10).

Semi-structured Data
  • Data with no well-defined structure but with internal tags or markings to separate data elements.

  • Examples: email documents, HTML pages, CSV files (Figure 1.11).

  • Each data value is preceded by a tag (Name, Month, Class, Attendance) for interpretation.

Data Capturing, Storage, and Retrieval

  • To process data, it must be input or captured, stored, and then retrieved.

Data Capturing
  • Involves gathering data from different sources in digital form.

  • May vary from simple instruments like keyboards and barcode readers (Figure 1.12) to social media comments and remote sensors.

  • Heterogeneity among data sources can make capturing complex.

Data Storage
  • Storing captured data for later processing.

  • Data is produced at a high rate, making storage challenging.

  • Decreasing cost of digital storage devices helps.

  • Numerous storage devices are available (Figure 1.7).

  • Data servers in large organizations store vast amounts of data for processing efficiently.

  • The cost of setting up and maintaining data servers can be high.

Data Retrieval
  • Fetching data from storage devices for processing.

  • Challenges increase with database size.

  • Minimizing data access time is crucial for faster processing.

Data Deletion and Recovery

  • Deletion is a significant threat to digital data.

  • Storage devices malfunction, or users/hackers delete data.

  • Deleting data means changing details at the bit level, which is time-consuming.

  • When data is deleted, its address entry is marked as free without actual deletion.

  • Data recovery retrieves deleted, corrupted, or lost data from secondary storage.

  • Recovery is possible if the memory space has not been overwritten.

Security Concerns
  • Unauthorized deletion can be avoided by limiting access and using passwords.

  • Files can be encrypted for protection.

  • Unwanted data recovery can be mitigated by using proper tools to delete or shred data before disposing of old or faulty storage devices.

Software

  • Software comprises the set of instructions needed to operate computer hardware.

  • It is a component that cannot be physically touched.

  • Software and hardware together complete any task.

  • Each software is written for a computational purpose.

  • Examples: operating systems (Ubuntu, Windows), word processing tools (LibreOffice, Microsoft Word), video players (VLC Player), photo editors (GIMP).

  • A soft copy is a document or image stored on disk; a hard copy is a printed version.

Need of Software

  • To make computer hardware useful and operational.

  • Software knows how to make different hardware components work together and communicate with the end-user.

  • Software acts as an interface between users and hardware.

Categories of Software

  • Classified by mode of interaction with hardware and functions performed:

    • System software

    • Programming tools

    • Application software

System Software
  • Provides basic functionality to operate a computer by directly interacting with hardware.

  • Manages different hardware components.

  • Provides services to the end user or other software.

  • Examples: operating systems, system utilities, device drivers.

Operating System

  • System software that operates the computer.

  • Manages application programs and provides access and security.

  • Examples: Windows, Linux, Macintosh, Ubuntu, Fedora, Android, iOS.

System Utilities

  • Software for maintenance and configuration.

  • Some utilities are shipped with the OS (disk defragmentation, formatting).

  • Others improve performance (anti-virus, disk cleaner).

Device Drivers

  • Ensures proper functioning of a device.

  • Operating system manages overall computer working.

  • Device drivers handle specific hardware-level operations.

  • Acts as an interface between devices and the OS, hiding operational details.

Programming Tools
  • Needed to write instructions for the computer.

  • Computer languages bridge the gap between human-readable code and machine language.

  • Translators convert high-level code to machine language.

  • Code editors (e.g., IDLE in Python) are used to write instructions.

Classification of Programming Languages

  • Low-level languages (machine dependent): machine language and assembly language.

    • Machine language uses 1s and 0s.

    • Assembly language uses English-like words but is computer-specific.

  • High-level languages (machine independent): simpler to write; require translators.

    • Instructions use English-like sentences (e.g., C++, Java, Python).

Language Translators

  • Convert assembly or high-level language to machine language.

  • Source code is converted into object (machine) code (Figure 1.14).

  • Types of translators: assembler, compiler, interpreter.

    • Assembler: converts assembly code to machine code for a specific microprocessor.

    • Compiler: converts entire source code into machine code.

    • Interpreter: translates one line at a time.

Program Development Tools

  • Text editors allow creating source code files.

  • Integrated Development Environment (IDE) contains a text editor, building tools, and debugger.

  • Examples: Python IDLE, Netbeans, Eclipse, Atom, Lazarus.

  • Debuggers detect and correct errors in source code.

Application Software
  • Works on top of system software to cater to user requirements.

  • General purpose and customized application software.

General Purpose Software

  • Developed for generic applications to cater to a broad audience.

  • Examples: spreadsheet tools (Calc), Adobe Photoshop, GIMP, web browsers (Mozilla), iTunes.

Customized Software

  • Tailor-made application software to meet specific organizational needs.

  • Examples: websites, school management software, accounting software.

Proprietary or Free and Open Source Software
  • Free and Open Source Software (FOSS): source code is freely available for development (e.g., Ubuntu, Python, Libreoffice, Mozilla Firefox).

  • Freeware: freely available but source code may not be available (Skype, Adobe Reader).

  • Proprietary software: must be purchased from the vendor (Microsoft Windows, Tally, Quickheal).

Operating System

  • A resource manager managing hardware (CPU, RAM, Disk, Network, I/O devices), software, system security, and user access.

  • Most important system software.

  • Examples: Windows, Linux, Android, Macintosh.

Objectives of an Operating System

  • Provide services for building and running application programs.

    • Loads programs into memory and allocates CPU for execution.

    • Decides the order of execution amongst multiple programs.

  • Provide a user interface for interaction.

    • Takes commands from the user for processing.

OS User Interface

  • Different types of user interfaces (Figure 1.15):

Command-based Interface
  • Requires users to enter commands to perform tasks (creating, editing, deleting files).

  • Requires remembering commands.

  • Keyboard is the primary input device.

  • Often less interactive and allows running one program at a time.

  • Examples: MS-DOS, Unix.

Graphical User Interface (GUI)
  • Lets users run programs or give instructions using icons, menus, and visual options.

  • Icons represent files and programs; windows represent running programs.

  • Mouse and keyboard are common input devices.

  • Examples: Microsoft Windows, Ubuntu, Fedora, Macintosh.

Touch-based Interface
  • Smartphones, tablets, and PCs allow interaction using touch input.

  • Examples: Android, iOS; Windows 8.1 and 10 support touch-based interfaces.

Voice-based Interface
  • Users use voice commands to make a computer work.

  • Examples: iOS (Siri), Android (Google Now), Microsoft Windows 10 (Cortana).

Gesture-based Interface
  • Smartphones and laptops allow gesture based interaction using waving, tilting, and eye motion.
    *

Functions of Operating System

  • Provides essential services for managing the computer system.

Process Management
  • Manages tasks (processes) in execution.

  • Allocates required resources.

  • Exchanges information among processes.

  • Allocates CPU among processes in minimum time.

Memory Management
  • Allocates and frees memory to running processes.

  • Dynamically manages memory without affecting other processes.

  • Tracks memory locations as free or occupied.

File Management
  • Creates, updates, deletes, and protects files in secondary memory.

  • Protects files from unauthorized access.

Device Management
  • Manages heterogeneous I/O devices.

  • Interacts with device drivers and software.

  • Provides options for device configuration.

  • Restricts device access to authorized users and software.

Summary

  • A computing device processes input data as per given instructions to generate the desired output.

  • A computer system has four physical components: CPU, Primary Memory, Input Device, and Output Devices.

  • These are referred to as the hardware of the computer.

  • A computer system has two primary memory types: RAM (volatile) and ROM (non-volatile).

  • The system bus transfers data, addresses, and control signals between components of the computer system.

  • A microprocessor is a small electronic component that performs basic arithmetic and logical operations on data.

  • A microcontroller is a small computing device that controls a CPU, fixed RAM, ROM, and other peripherals embedded on a single chip.

  • Software is a set of instructions written to achieve the desired tasks, categorised mainly as system software, programming tools, and application software.

  • Hardware cannot function on its own and needs software to be operational.

  • An operating system is an interface between the user and the computer, supervising the working of the computer system.