Session 1: Introduction
Operating System (OS) → A type of software that manages computer hardware resources and provides common services for computer programs
- Acts as an interface between software and hardware
- Controls and monitors the execution of programs (apps and system software)
- Ex) Windows, Linux, Mac OS, IOS
Why Do We Need an OS?
- Device Management → OS manages all devices connected to a computer
- Printers, scanners, external hard drives
- Memory Management → OS manages the memory of a computer
- Ensures each program gets the necessary memory to run correctly
- Process Management: OS manages all the processes running on a computer
- Ensures each process gets the necessary resources to run correctly
- Allows multiple programs to be in memory and run at the same time
- Security: OS provides safety features to protect from viruses/malware
- User Interface (UI) → OS provides a user interface that allows us to interact with the computer and run apps
Kernel Mode → The processor mode that enables software to have full and unrestricted access to the system and its resources

Machine Level:
- Instruction set
- Memory Organization → To store data
- Input/Output
- Bus Structure → Communication system that transfers data between components inside a computer (or between computers)
- Internal Bus → Connects computer internals to the motherboard
- May be:
- Parallel → Multiple bits of data are transmitted simultaneously over multiple channels
- Serial → Data is transmitted one bit at a time over a single channel
- Ex) USB (universal serial bus)
Device Driver → A group of files that enable one or more hardware devices to communicate with the computer’s OS
- Without drivers, the computer wouldn’t be able to send/receive data correctly to hardware devices
Resources Managed by OS:
- Processors
- Memory
- Timers
- Disks → RAM, SSD
- Mice → allows for us to control the movement of computer cursor
- Network interfaces
Bus Interactions:

Types of OS:
- Mainframes → Designed to run on large, centralized computers that handle high volumes of data processing and storage
- Servers → Specialized computers that operate within a client/server architecture to serve the requests of client computers on the network
- Multiprocessors → Used to boost the performance of multiple CPUs within a single computer system
- CPUs are linked together so that a job can be divided and executed more quickly
- Personal Computers → Provide a good interface for a single user
- Used for word processing, spreadsheets, and internet access
- Handheld (Mobile) → Designed to run on mobile devices
- Touchscreens, mobile apps, wireless connectivity
- Embedded → Designed to run on embedded systems such as consumer electronics, industrial machines, and automobiles
- Low power consumption and small memory footprint
- Sensor Node → Run on small devices that can sense and transmit data wirelessly (sensor)
- Provide low power consumption, real time processing, wireless connectivity
- Real Time → Designed to handle real time applications that require immediate response to external events
- Smart Cards → Run on small plastic cards with embedded sensors microchips
- Provide secure storage and cryptographic functions
Session 2: Processes & Threads
Lifecycle Of A Process:
- Edit Time → Phase in which source code of a program is written, modified, or reviewed by a programmer
- Compile Time → Phase in which source code of a program is translated into machine-readable code by a compiler (object code)
- Link Time → Phase in which the object code is linked with other object files and libraries to create an executable file or a shared library
- Distribution Time → Phase in which the executable file/shared library is packaged and distributed to end-users or customers (i.e. downloads, media, etc.)
- Installation Time → Phase in which the end-user installs the software in their computer
- Load Time → Phase in which the OS loads the executable file/shared library into memory and prepares it for execution
- Run Time → Phase in which the program is executed by the computer
Thread → A sequence of instructions that can be executed independently by a computer’s CPU
- Can run concurrently with other threads
- Share the same memory space as the parent process
- Improve the performance of applications that require parallel processing or multitasking
Multithreading → Allows multiple threads of execution to run concurrently on a single CPU
Threadpool → Collection of worker threads that are maintained by the OS and are waiting for tasks to be allocated for concurrent execution by the program
Locking → Mechanism that enforces limits on access to a shared resource when there are many threads
- Used to ensure that only one thread can access a shared resource at a time
Session 3: Kernels
Kernel → The main layer between an OS and the underlying computer hardware
- Processes memory management, file systems, device control, and network

Purpose Of A Kernel:
- Provides interfaces needed for users and applications to interact with the computer
- Launches and manages applications
- Manages underlying system hardware devices
Scheduler → Component of an OS that manages the allocation of resources and the execution of tasks
- Decides which task to perform next
- Ensures each task gets its fair share of resources
- Ensures that the system remains responsive and efficient
- Goals:
- Maximize throughput
- Minimize wait time
- Minimize latency/response time
- Maximize fairness (equal CPU time)
Windows Scheduler/Task Scheduler → Check scheduler in terminal
Create Task → edit crontab (list of commands scheduled to run at specific times)
Vim & Nano:
- Editors on Linux
- Vim:
- Mode based text editor → You need to enter INSERT mode before you can write text to the file
- Nano:
- Modeless editor
- What you see is what you get command line text editor
Linux Commands:
- ls → List and directories in the current directory
- cat → Joins and displays file
- touch → Creates an empty fil or updates the timestamp of an existing file
- mkdir → Creates a new directory
- rmdir → Deletes an empty directory
- grep → Searches for a pattern in a file or input
- traceroute → Traces the route taken by packets over an IP network
- ping → Tests the reachability of a host on an IP network
- chown → Changes the owner of a file or directory
- chmod → Changes the permissions of a file or directory
- alias → Creates an alias for a command or sequence of commands
- pwd → Prints the current working directory
- cd → Changes the current working directory
- cp → Copies files and directories from one location to another
- rm → Removes files and directories
- mv → Moves or renames files and directories
- sudo → Executes a command with elevated privileges
- echo → Prints text to the terminal or redirects it to a file
- vim → A text editor that allows users to create, edit, and view files
- nano → A text editor that allows users to create, edit, and view files
- which → Displays the location of an executable file in the user’s PATH environment variable
- tail → Displays the last few lines of a file or input stream
- head → Displays the first few lines of a file or input stream
- wc → Counts the number of lines, words, and characters in a file or input stream
- find → Searches for files and directories that match specified criteria in a given location
- wget → Downloads files from the internet
Session 4: Interprocess Communication

Race Conditions → When two or more processes are reading/writing some shared data and the final result depends on who runs precisely when
Critical Regions → The resource that is being shared between processes
Problems:
- No two processes may be simultaneously inside their critical regions
- No assumptions may be made about the speeds or the number of CPUs
- No process running outside its critical region may block any process
- No process should have to wait forever to enter its critical region
Semaphore → An integer variable that is shared between threads
- Used to solve the critical section problem and to achieve process synchronization
- Binary Semaphore (Mutex) → Can only have two values (0 or 1) and it’s initialized to 1
- Used to implement the solution of critical section problems with multiple processes
- Counting Semaphore → Its value can range over an unrestricted domain
- Used to control access to a resource that as multiple instances
Beautiful Soup Library → Python library used for pulling data out of HTML and XML files
- Navigates, searches, modifies the parse tree
- Saves hours/days of work
Session 6: Linux OS & Directory Structure
Root:
- Every single file and directory starts from the root directory
- Only root user has writing privileges under this directory
- /root is the root user’s home directory
/bin:
- Contains binary executable files
- Ex) ps, ls, ping, cp
/sbin:
- Contains binary executable files
- Used by the system administrator for system maintenance
- Ex) iptables, reboot, fdisk, ifconfig, swapon
/etc:
- Contains configuration files required by all programs
- Contains startup/shutdown shell scripts used to start/stop individual programs
/dev:
- Contains device files
- Terminal devices, usb, or any device attached to the system
/proc:
- Contains info about system process
- Pseudo file system that contains info about running processes
- Virtual file system that contains info about system resources
/var:
- Variable files
- Content of files expected to grow can be found here
/temp:
- Directory that contains temporary files created by the system/users
- Files here are deleted when system is rebooted
/src:
- Contains binaries, libraries, documentation, and source code for second level programs
/home:
- Home directories for all users to store their personal files
/boot:
- Contains boot loader related files
- Kernel initrd
/lib:
- Contains library files that support the binaries located under /bin and /sbin
- File names are either ld* or lib*.so.*
/opt:
- Optional
- Contains add on applications from individual vendors
/mnt:
- Temporary mount directory where sysadmins can mount file systems
/media:
- Temporary mount directory for removable devices
/srv:
- Service
- Contains server specific services related data
Daemons → A program with a unique purpose
- Utility programs that run silently in the background to monitor and take care of certain subsystems
- To ensure the OS runs properly
Types of Processes:
- Interactive Processes → Run by a user at the command line
- Batch Processes → Not associated with the command line and are presented from a list of processes
- “Groups of tasks”
- Bets when system usage is low
- Daemon Processes
- rsyslogd → Used to log system messages
- udisksd → Handles querying, mounting, unmounting, formatting, detaching storage devices
- logind → A tiny daemon that manages user logins and seats in various ways
- httpd → the HTTP service manager
- sshd → Responsible for managing the SSH service which is used to securely log onto remote syste,s
- ftpd → manages the File Transfer Protocol (FTP) which transfers files between computers
- crond → Scheduler daemon for time based actions such as software updates
Sessions 8 & 9: Files
File Attributes:
- File type
- File permissions
- User → The owner of the file (creator by default)
- Group → Contains multiple users that have the same permissions access to a file
- Other → Any other user who has access to the file
- Number of links
- UID of the owner (User Identifier which assigns a number to each user)
- GID of the group owner (Group Identifier which assigns a number to each group
- File size in bytes
- Date and time of last modification
- Date and time of las access
- Date and time of the last change of the inode
- An array of pointers that keep track of all disk blocks used by the file
Types of Permissions:
- R → read permission
- W → write permission
- X → execute permission
- - → no permission
Linux Groups:
- Primary/Log in Group → The group that is assigned to the files that are created by the user
- Secondary/Supplementary Group → Used to grant certain privileges to a set of users
- A user an be a member of 0 or more secondary groups
Pipe Command → Helps combine two or more commands and are used as input/output concepts in a command
Redirecting to a File → When we wish the program’s output to be saved in a file instead of printed to the screen
Session 10: SSH
Secure Shell Protocol (SSH) → Cryptographic network protocol for operating network services securely over an unsecured network
- Applications have a client-server architecture
- Connect SSH client instance with an SSH server
SSH Principal Components:
- The transport layer provides server authentication, confidentiality, and integrity
- The user authentication protocol validates the user to the server
- The connection protocol multiplexes the encrypted tunnel into multiple logical communication channels

SSH Keys:
- Usef to provide a secure and scalable method of authentication
- Passwords aren’t as effective as they once were
- Come in pairs: private and public key
- Public Key → Can be shared freely with any SSH server to which the user wishes to connect
- Normally managed by an organization’s IT team
- When the public key is present on the remote end and the matching private key is present on the local end, typing the password is no longer necessary
- For additional security it may be necessary
Cryptographic Key → A string of characters used within an encryption algorithm for altering data so that it appears random
- Locks (encrypts) data
- Only someone with the right key can unlock (decrypt) it
Session 11: Drivers
Driver → A software component that lets the OS and device communicate with each other
- Not all drivers are written by the company that designed the device
- Not all drivers communicate directly with a device
- There are often several drivers layered in a driver stack

Function Driver → The one driver in the stack that communicates directly with the device
Filter Driver → The driver that performs auxiliary functions
Selenium → Python API used to access all functionalities of Selenium WebDriver in an intuitive way