CDCDAC Prep
C-CATSection B: C, C++, DSA, OS, Networking & AI•~3 min read

Operating Systems Study Notes

Topic 1 (Free Preview)

What is an Operating System?; Functions of an Operating System; UNIX System Architecture

Topic 1 notes are 100% free. Topics 2–9 are available on the CDACPrep app.

Open in App

Study Notes

Free high-yield revision notes for What is an Operating System?; Functions of an Operating System; UNIX System Architecture

What is an Operating System?; Functions of an Operating System; UNIX System Architecture

What is an Operating System?

Why is an OS Needed?

Basic functions of a computer:

  1. Data Storage — save data to storage devices

2. Data Processing — compute and transform data

  1. Data Movement — transfer data

between components

  1. Control — coordinate all operations

Problem: Any user cannot communicate/interact directly with computer hardware to do different tasks. There is a need for some interface between user and hardware.

Solution: The Operating System

Definition of Operating System

An Operating System (OS) is system software that:

  • Manages computer hardware and

software resources

  • Provides a common interface between users and hardware
  • Controls

and coordinates use of hardware among various application programs for various users

  • Acts

as a resource manager — allocates CPU, memory, I/O to processes

OS as an Intermediary

text
Applications (User Programs)
           ↕
    OPERATING SYSTEM
           ↕
      Hardware (CPU, Memory, I/O)
OSFamilyUse Case
Windows 11MicrosoftDesktop, Gaming
Ubuntu / DebianLinuxDevelopment, Server
macOSApple/UnixCreative, Development
AndroidLinux-basedMobile
iOSAppleMobile
UnixAT&T Bell LabsServer, Academic
LinuxOpen-source Unix-likeServer, Embedded

Functions of an Operating System

FunctionDescription
Process ManagementCreate, schedule, terminate processes; handle synchronization
Memory ManagementAllocate/deallocate memory; virtual memory management
File ManagementCreate/delete files and directories; access control
I/O ManagementControl I/O devices; provide device driver interface
Security & ProtectionProtect resources from unauthorized access
NetworkingTCP/IP stack; network communication
Error Detection & HandlingDetect hardware errors; take corrective action
User InterfaceCLI (command line) or GUI (graphical) interface

UNIX System Architecture

Overview

UNIX is one of the most influential operating systems ever designed (Bell Labs, 1969).

Major Subsystems of UNIX:

  1. File Subsystem — manages files and directories
  2. Process Control Subsystem —

manages processes

UNIX Architecture Diagram

text
+-------------------------------------------------------+
|                  USER SPACE                           |
|   User Programs / Applications                        |
|   (Shell, Compiler, text editor, database client)    |
+------------------+-------------------------------------|
|       System Call Interface (API boundary)            |
+------------------+------------------------------------+
|                  KERNEL SPACE                         |
|   File Subsystem    |   Process Control Subsystem     |
|   (file operations) |   (process scheduling, IPC)    |
|   +---------------+ |   +-------------------------+   |
|   | File tables   | |   | CPU Scheduler           |   |
|   | Inodes        | |   | Memory Management       |   |
|   | Buffer cache  | |   | IPC (pipes, signals)    |   |
|   +---------------+ |   +-------------------------+   |
+----------------------+----------------------------------+
|         Hardware Control (Device Drivers)              |
+-------------------------------------------------------+
|               HARDWARE                                |
|   CPU | Memory | Disk | Network | Terminal            |
+-------------------------------------------------------+

UNIX Key Concepts

ConceptDescription
Everything is a fileDevices, sockets, pipes are represented as files
ShellCommand-line interface to the kernel (bash, sh, zsh, ksh)
PIDEvery process has a unique Process ID
UID/GIDUser ID and Group ID for security
File permissionsrwx for owner, group, others
KernelCore of the OS managing all resources
DaemonBackground process (like a service in Windows)
Ready to test what you learned?

Practice 20 MCQs with Instant Explanations

Solve exam-level questions for Operating Systems with scoring, option checking, and detailed answers.

Go to Practice MCQs