Linux Operating System Fundamentals

Operating System (OS)

Programs that interface between hardware and users.

Unix Philosophy

  • Everything is a “file”.
  • No news is good news.
  • Programs are designed to work together.

Unix Problems

  • Too many ways to do things.
  • Overlapping functions and utilities.
  • Different syntaxes across UNIX flavors.

Examples

  • echo a{d,c,b}e = ade\nace\nabe
  • ~ = /home/username
  • $var = $HOME
  • $(command) = `command`
  • $((expression)) = a
  • * = 0 or 1 char
  • ? = 1 char
  • ' ' = literal
  • " " = literal except $ & ‘
  • Stdin = command
  • Stdout = command >(!
Read More

IoT Communication Protocols: A Comprehensive Guide

IoT Communication Protocols

ZigBee:

  • Features: 2.4GHz ISM band, low power consumption, mesh networking capability
  • Advantages: Simple protocols designed for low power/cost devices, self-healing mesh extends range
  • Disadvantages: Lower data rates (250kbps), shorter range compared to other standards

Wi-Fi HaLow (802.11ah):

  • Features: Operates in sub-GHz frequencies (900MHz), designed for longer range
  • Advantages: Extended range up to 1km, good penetration through obstacles
  • Disadvantages: Potential interference
Read More

Operating Systems Fundamentals

Process Management

  1. What is a process and how is it different from a program?

    • A process is an instance of a program in execution. It includes the program code and its current activity. A program is a static set of instructions, while a process is a dynamic entity with a life cycle.
  2. What are the different states of a process?

    • New: The process is being created.
    • Ready: The process is waiting to be assigned to the CPU.
    • Running: Instructions are being executed.
    • Waiting: The process is waiting for some event
Read More

Exploring Algorithm Design Techniques: From Knapsack to TSP

0/1 Knapsack Problem

The 0/1 knapsack problem involves deciding whether to include an item entirely or not in a knapsack. For instance, if we have two items weighing 2kg and 3kg, we can’t take just 1kg from the 2kg item. We must take the entire 2kg. This problem is solved using dynamic programming.

Fractional Knapsack

Unlike the 0/1 knapsack, the fractional knapsack problem allows us to divide items. For example, if we have a 3kg item, we can take 2kg and leave 1kg. This problem is solved using the

Read More

A Comprehensive Guide to Database Management Systems (DBMS)

What is a Database Management System (DBMS)?

A DBMS is a software system designed to manage and organize data in a structured manner. It allows users to:

  • Create, modify, and query a database
  • Manage security and access controls

Features of DBMS:

  • Data modeling
  • Data storage and retrieval
  • Concurrency control
  • Data integrity and security
  • Backup and recovery

Data Manipulation Language (DML):

Used to store, modify, retrieve, delete, and update data in a database. Common DML statements include:

  • SELECT
  • INSERT
  • UPDATE
  • DELETE
  • CALL

Data

Read More

Understanding Distributed Systems: Concepts and Architectures

Network Fundamentals

Bandwidth (BW): # Bits transmitted per unit time. Latency: Propagation + Transmission + Queueing. Propagation Delay: Distance / Speed of Light. Transmission Delay: 1 / BW.

IPv4: 32 bits (4 x 8 bits). IPv6: 128 bits (8 x 16-bit blocks).

IP Addressing

  • Class A: 0.0.0.0 – 127.255.255.255 (127 networks / 16M hosts per network)
  • Class B: 128.0.0.0 – 191.255.255.255 (16K networks / 64K hosts per network)
  • Class C: 192.0.0.0 – 223.255.255.255 (2M networks / 254 hosts per network)
  • Class D: 224.
Read More