Knowledge Bank
  • 🔭About Us
    • 👋Welcome to Securescape!
  • 👶Fundamentals
    • 🖥️Operating Systems (WIP)
      • Introduction to Operating Systems
      • Processes and Process Management
        • 📠Processes
        • 🧵Threads
        • 📅Scheduling
      • Memory Management
        • Virtual Memory Management
      • Storage Management
      • I/O Management
    • 🐧Linux (WIP)
      • Introduction to Linux
      • Linux System Management
    • ⚡Programming (WIP)
      • 🔗Assembly
      • 💪C(++/#)
      • 🐍Python
      • 👑Nim
      • 🔨Bash
        • Introduction to Bash Scripting
        • Variables, Loops, and Port Scanner
    • 🚩Networking (WIP)
      • 📶Networking 101
        • 🕸️Networking Basics
        • 🛑Protocols
        • 🧓IPv4
        • 🧒IPv6
      • 🪡Packet Tracer
        • Interface
        • Connections
        • Creating Networks
        • Virtual LANS & Trunks
      • 🕸️Subnetting
      • 🕵️Network Security
    • ✍️Report Writing (WIP)
      • 🔍Research Skills
      • 🏗️Structuring a Report
      • 🗃️Creating Templates
  • 🦂General Security
    • 🗒️Methodologies
      • 🇭🇰OSSTMM
      • 🐝OWASP
        • Web Security Testing Guide
        • Mobile Security Testing Guide
      • 🦅NIST
      • 🥢PTES
      • ⛓️Cyber Killchain
    • 🍔Binary Exploitation
      • ir0nstone's Binary Exploitation Notes
    • 🎩Cheat Sheets
      • Enumeration
        • Network Scan
        • Vulnerability Scan
        • Web Scan
      • Exploitation
        • Page 1
        • Payloads & Shells
      • Post Exploitation
        • Lay of The Land
        • Persistence
        • Data Exfiltration
        • Pivoting
      • Command & Control
      • Disassembly
        • ☢️Radare2
        • 🥜GDB
      • CEH Cheatsheet
  • ⚔️Offensive Security
    • 💡Hardware Exploitation
      • Intro to Hardware
    • 🥷Red Team
      • 🦠Malware Development
        • Crow Malware Development
        • 🪡C# Malware
      • 🏭Offensive Development
        • 🔧Offensive DevOps
          • 🏷️GitLab
            • GitLab Setup
            • Simple Calculator Project
            • Making our CI/CD Pipeline
            • Build Artifacts
          • 🌆TeamCity
            • TeamCity Setup
            • Creating TeamCity Projects
            • Obfuscating Payloads
          • 🍷Jenkins (WIP)
            • Jenkins Setup
            • Creating Pipelines
            • Managing Projects
            • API Interaction
        • 🏗️Infrastructure Development (WIP)
          • 🎮Command & Control Infrastructure
            • 🤖Command & Control Anatomy
              • Command & Control Frameworks
              • Ⓜ️Metasploit Framework
                • Installing Metasploit
                • Metasploit Basics
                • Advanced Features
                • Metasploit Documentation
              • 🐲Mythic Framework
                • Installing Mythic
                • Malleable Command & Control
                • All About Agents
                • Services
                • Mythic Documentation
            • 🚥Traffic Redirection
              • Nginx
              • Amazon Web Services
              • Microsoft Azure
              • Google Cloud Platform
              • Cloudflare Workers
            • 🥷Covert Infrastructure
              • Ensuring Resiliency
              • Traffic Masking
              • Network Rules
          • 🎣Phishing Infrastructure
            • 📧Email Anatomy
            • 🐟Phishing Infrastructure Setup
            • 🚚Payload Delivery
            • 🚩Removing Red Flags
          • 🪄Infrastructure as Code
            • 🏝️Terraform
              • Interacting with Docker
              • Going to the Cloud
              • Hybrid Deployment
            • 🧊Pulumi
            • 🎼Ansible
          • ⚙️Infrastructure Automation
            • 🦴Structuring our Project
            • 🏭Automating Server Setups
            • 🎼Orchestrating our Infrastructure
            • 🔧CI/CD Integration
      • 🏙️Active Directory (WIP)
        • Active Directory Overview
        • Authentication
        • AD Lab
      • Red Team Operations - Joas Santos
  • 🛡️Defensive Security
  • 📻Software Defined Radios
    • ⚠️Disclaimer
    • 📡Baofeng
      • Programming
  • 🧑‍🔬Home Lab
    • 💨Virtualisation
      • 🔸Proxmox
  • 🏁Capture The Flag
    • 🧊HackTheBox
      • 👾Cyber Apocalypse
        • Cyber Apocalypse 2023
    • 🐤TryHackMe
      • 🎄Advent of Code
      • 🚪Rooms
        • 🐥Basic Pentesting
        • 👨‍💻Blog
      • 👟Paths
    • 🏳️Competitions
      • Nahamcon
        • Nahamcon 2023
          • Binary Exploitation
            • Open Sesame
      • 👁️Iris CTF
  • 🦺DRAFTS
    • GS
      • 📱Mobile Application Security
      • 👨‍🔬Reverse Engineering
      • 🌐Web Application Security
      • 📌Information Security
      • 🔒Cryptography
      • 🤫Operational Security
    • DS
      • 🧠Threat Intelligence
        • 🦌ELK Stack
          • 🤸Elasticsearch
          • 🏕️Kibana
          • 🦤SELKS
        • 🚓Yara
      • 🏹Threat Hunting
      • 🧬Malware Analysis
        • Fundamentals
      • 🔬Forensics
        • 📶Network Forensics
          • 🦈Wireshark
          • 🥟TCP Dump
        • 💾Memory Forensics
          • ⚡Volatility
        • 💽Disk Forensics
          • 🐕Autopsy
        • 🪟Windows Forensics
        • 🐧Linux Forensics
      • 🌲Security Operations
        • Intrusion Detection & Prevention
          • 🐛Splunk
            • Splunk Basics
            • Integrating Suricata with Splunk
          • 🐗Suricata
            • Intro to Suricata
          • 🐽Snort
            • Snort Basics
        • Security Information and Event Management (SIEM)
        • Security Orchestration, Automation and Response (SOAR)
    • HL
      • 🖥️Hardware
    • OS
      • 📶Network Exploitation
      • 🌩️Cloud Exploitation
Powered by GitBook
On this page
  • History
  • Definitions
  • Introduction
  • Computer Hardware
  • CPU Internals
  • Storage
  • Multithreaded and Multicore Chips
  • Multiprogramming
  • Multitasking
  • System Call
  • Dual-Mode Operation
  • Duties of the Operating System
  • Process Management
  • Memory Management
  • Storage Management
  • Caching
  • Input-Output Management
  • Operating System Structures

Was this helpful?

Edit on GitHub
  1. Fundamentals
  2. Operating Systems (WIP)

Introduction to Operating Systems

A brief introduction and history into Operating Systems

History

Type
Product
Date

Vacuum Tubes

Z3 Computer, ENLAC

1945-55

Transistors & Batch Systems

GMOS

1955-65

ICs & Multiprogramming

System/360

1965-80

Personal Computers

CP/M, MS-DOS

1980-Now

Mobile Computers

PDA, Android, iOS

1990-Now

Definitions

  • Computer: A general purpose device that can execute sequences of instructions presented in a formal format to perform numerical calculations and other tasks.

  • Computer Hardware: A collection of physical components and elements which make up a computer system.

  • Computer Software: A collection of all programs stored in and executed by a computer system.

  • Application Software: Performs specific tasks for the user.

  • System Software: Operates and controls the computer system, and provides a platform to run application software.

Introduction

An Operating System is a piece of software that manages all the resources of a computer system, both hardware and software, and provides an environment in which the user can execute their programs in a convenient and efficient manner. They exist because they offer a reasonable way to solve the problem of creating a useable computer system.

An operating system:

  • Manages the computer hardware

  • Facilitates execution of application programs

  • Acts as an intermediary between the user and the computer hardware

  • Designed to be convenient and efficient

Design Goals:

  • Convenience & Ease of Use - Personal Computers

  • Efficiency (Proper Resource Allocation) - High Performance Computers

  • Energy Conservation - Handheld Devices

  • Minimal User Interference - Embedded Devices

Computer Hardware

CPU Internals

Storage

Cache

When a program reads a word, the hardware checks to see if it's in the cache.

  1. If so, then you will have a cache hit (2 cycles)

  2. If not, then it will make a request to the main memory over the bus which is expensive

Cache is expensive, therefore its size is limited.

Disk Drive Structure

Data on a disk is stored on Tracks and is read through a Head. Since the head has to search through the disk for the information, data acquisition is slow. Each sector on a disk stores between 256 bytes to 1 kilobyte of information.

Multithreaded and Multicore Chips

Chips can have a shared or separate cache connected to it depending on the manufacturer - Intel or AMD for example.

A core could be a CPU, and a CPU could be: 1. Efficiency Core - Slower but consumes less power 2. Performance Core - Efficient but expensive

Memory

Memory is split between two types:

  • Single Base / Limit Pair

    • Set for each process

  • Two Base / Limit Registers

    • One for the program, one for the data

What this means is that in a single base, the process and the user data is compiled together and given a limit for the whole program, while a two base will have the program running on one or more addresses, and the data running on a separate address.

Deadlock

When processes don't have a cycle or order to follow they will try to run at the same time, causing a deadlock - where they will each wait for the next program to run before running themselves.

Multiprogramming

Multiprogramming increases CPU utilisation by keeping multiple jobs (Code and Data) in the memory so that the CPU always has one to execute.

Multitasking

Multitasking is a logical extension of multiprogramming.

  • CPU Executes multiple tasks by switching among them

  • The switching is very fast

  • Requires an interactive (Hands-On) computer where the user can directly interact with the computer

  • Response Time should be minimal

Kernel: A kernal is that part of the operating system which interacts directly with the hardware and performs the most crucial tasks Microkernel: The microkernel is much smaller in size than a conventional kernel and supports only the core operating system functionalities Shell: The shell - or command interpreter - is part of the operating system that receives commands from the users and gets them executed

System Call

A system call is a mechanism where a user program can request a service from the kernel for which it does not have the permission to perform. User programs typically do not have permission to perform operations like accessing I/O devices and communicating with other programs.

  • A user program invokes system calls when it requires such services

  • System calls provide an interface between a program and the operating system

  • System calls have different types

    • fork

    • exec

    • getpid

    • getppid

    • wait

    • exit

Dual-Mode Operation

  • User Mode

  • Kernel Mode / Supervisor Mode / System Mode / Privileged Mode

  • Mode Bit: Kernel - 0, User - 1

  • Request using a system call

Duties of the Operating System

Process Management

  • Creating and deleting user and system processes

  • Suspending and resuming processes

  • Interprocess Communication

  • Process Synchronisation

  • Deadlock Handling

Memory Management

  • Keeping track of which part of memory is used by which job

  • Allocating and deallocating memory space

Storage Management

  • File System Management

    • Creating, deleting, and manipulating files and directories

  • Mass Storage Management

    • Free Space Management

    • Storage Allocation

    • Disk Scheduling

Caching

Input-Output Management

Operating System Structures

  • Monolithic [MS DOS, Unix, Linux]

  • Layered [THE]

  • Microkernel [Mach, MINIX]

A Real-Time Operating System (RTOS) has well-defined time constraints which have to be met or the system will fail. An RTOS is used when rigid time constraints have been placed on the operation of processes or flow of data. An RTOS is often used in the control device in a dedicated application. RTOS has two types - Soft and Hard. Applications: Embedded Systems, Robotics, Scientific Utilities, etc. Booting: Booting is the process of starting the computer and loading the kernel. When a computer is turned on, the power-on self-tests (POST) are performed. Then the bootstrap loader, which resides in the ROM, is executed. The bootstrap loader loads the kernel or a more sophisticated loader.

PreviousOperating Systems (WIP)NextProcesses and Process Management

Last updated 1 year ago

Was this helpful?

👶
🖥️
Disk Drive Internals
Operating System Layout
Hardware Components in a typical Computer System
CPU Internals Diagram
Registers
CPU Utilisation
System Calls from user to kernal and back
Deadlock Illustration using Traffic Jam
Drawing
Drawing
Drawing
Drawing
Drawing
Drawing
Drawing
Drawing