Notes, summaries, assignments, exams, and exercises for Computer science for Other courses

Processes, Threads, and RAID Levels in Operating Systems

Computer science234.98 KB

What is a Process?

A process is a program in execution, encompassing the current values of the program counter, registers, and variables. It's an active entity with a limited lifespan, created at execution start and terminated upon completion. Processes utilize various resources like memory, disk, and printers as needed.

Process vs. Program

Process

Program

A program in execution.

A set of instructions.

Active/dynamic entity.

Passive/static entity.

Limited lifespan.

Longer lifespan (stored on disk).

Uses various resources (memory, disk, etc.).

Stored on disk, doesn't use other resources.

Has a memory address space.

Requires disk space for instructions.

Multiprogramming and the Process Model

Multiprogramming involves rapidly switching the CPU between multiple...

Continue reading "Processes, Threads, and RAID Levels in Operating Systems" »

Essential Concepts in Programming and Networking: Pointers, LAN/WAN, Data

Computer science2.96 KB

Understanding Pointers in Programming

A pointer is a variable whose value is the memory address of another variable. Like any variable or constant, you must declare a pointer before you can work with it.

C++ Pointer Example

#include <iostream>
using namespace std;

int main ()
{
    int var = 20; // Actual variable declaration.
    int *ip;      // Pointer variable declaration.

    ip = &var;    // Store address of var in pointer variable.

    cout << "Value of var variable: " << var << endl;

    // Print the address stored in ip pointer variable
    cout << "Address stored in ip variable: " << ip << endl;

    // Access the value at the address available in pointer
    cout << "Value of *
...
Continue reading "Essential Concepts in Programming and Networking: Pointers, LAN/WAN, Data" »

Authentication vs Authorization: Security Concepts Explained

Computer science2.6 KB

Authentication vs. Authorization: Key Differences

Authentication is the process of verifying that an entity is who they claim to be. Authorization refers to the rules that determine what an authenticated user is permitted to do. For example, Adam may be authorized to create and delete databases, while Usama is only authorized to read them.

These two concepts are orthogonal and independent, yet both are central to security design. Failure to implement either correctly creates vulnerabilities.

Alternative Perspectives on Identity

  • Authentication binds a principal to an internal identity representation.
  • Authentication verifies an external entity using factors such as what the entity knows, has, or is.
  • Authorization verifies the role of an entity to determine
...
Continue reading "Authentication vs Authorization: Security Concepts Explained" »

Operating System Fundamentals: Functions, Versions, and Desktop Components

Computer science5.08 KB

Operating System Fundamentals and Definition

An Operating System (OS) is a program or set of programs that help manage the resources of a computer. It begins working when the computer is turned on, allowing user interaction. The OS is responsible for the installation, configuration, usage, and maintenance of both software and hardware.

Major Operating System Versions

There are several major operating system families:

  • Windows: This is a commercial operating system owned by Microsoft. Microsoft has developed a family of operating systems that have evolved significantly, from the early Windows 3.11 to Windows Vista and subsequent modern versions.
  • Linux: This operating system is typically distributed free of charge, making it a popular alternative to
...
Continue reading "Operating System Fundamentals: Functions, Versions, and Desktop Components" »

Memory Management Concepts and Techniques

Computer science2.78 KB

Memory Management Definition

Memory management is the process of:

  • Bringing programs into the main memory to be executed by the processor.
  • Dynamically dividing the part of main memory to accommodate multiple processes.
  • Allocating memory efficiently for packaging processes, preventing the processor from being idle.
  • Enabling the execution of a larger program than is available in real memory.

Memory Management Requirements

1. Relocation

  • Ability to move a program from one region to another of the main memory without invalidating the memory references.
  • The processor hardware and operating system translate the memory references' addresses to the final physical memory addresses.

2. Protection

Each process must be protected from unwanted interference from other...

Continue reading "Memory Management Concepts and Techniques" »

Telecommunications Switching Methods, Fiber Optics, and Network Infrastructure

Computer science3.83 KB

Network Communication Methods: Switching Techniques

Circuit Switching

Allows two terminals to communicate through a single, dedicated circuit, leaving it free for use during the connection.

Benefits of Circuit Switching

  • Real-time transmission.
  • No interference from other users on the loop.
  • No contention or congestion issues.
  • No time is lost in recalculating routes.
  • Simplicity in management.

Disadvantages of Circuit Switching

  • Initial connection delay.
  • Time is wasted when the circuit is idle.
  • Route recalculation does not inherently lower costs.
  • Low fault tolerance.

Message Switching

The full message is sent to a node, which stores and forwards it to the next node until it reaches its destination.

Benefits of Message Switching

  • The channel is released before the
...
Continue reading "Telecommunications Switching Methods, Fiber Optics, and Network Infrastructure" »

Web Engineering Models and Requirements Capture Methods

Computer science3.03 KB

Web Engineering Models

Data Model

Compatible with the entity-relationship model and UML class diagrams.

Hypertext Model

  • Composition: Site pages, content units of pages.
  • Unit: Atomic content element, used to publish the information specified in data models.
  • Navigation: Specified by links.
  • Links: Between units of a page, between units of different pages, or between pages.
  • Defines both the content and navigation.

Presentation Model

  • The appearance of web pages.
  • Does not include specific elements for conceptual modeling; notations are used.
  • XML.
  • The presentation is specified using XSL stylesheets.

Web Engineering UML-Based Methodology (UWE)

  • Proposal based on UML and the Unified Process, adapted to the web.
  • Specific object-oriented techniques are used.
  • Proposes an
...
Continue reading "Web Engineering Models and Requirements Capture Methods" »

C++ Stack Implementation with Linked Lists

Computer science3 KB

C++ Stack Implementation Using Linked Lists

This document demonstrates how to implement a Stack data structure in C++ using a linked list approach, including essential features like constructors, destructors, and operator overloading.

Source Code Implementation

#include <iostream>
#include <cstdlib>

class Node {
    int info;
    Node* next;
public:
    Node(int i = 0) : info(i), next(NULL) {}
    friend class Stack;
};

class Stack {
    Node* first;
public:
    Stack() { std::cout << "Constructor:: Stack" << std::endl; first = NULL; }
    ~Stack();
    void insert(int data);
    void remove();
    Stack& operator=(const Stack&);
    int operator==(const Stack&);
    Stack(const Stack& p);
};

Stack::~
...
Continue reading "C++ Stack Implementation with Linked Lists" »

Understanding POP3: Email Retrieval Protocol Fundamentals

Computer science3.14 KB

POP3 Protocol Essentials

POP3 Functionality: Email Retrieval

The Post Office Protocol version 3 (POP3) server is designed primarily for retrieving emails. It facilitates communication where the client sends commands and receives responses from the server.

Key Features of POP3

  • To access and review emails, a dedicated email client program such as Outlook or Thunderbird is required.
  • The server downloads all email information directly to the client's local hard disk. Consequently, the server typically does not retain any copy of the mail after download, making it a 'download and delete' protocol.
  • It is a simple, client-server protocol primarily focused on mail retrieval.

POP3 Synchronization and Response Codes

POP3's design for command verification is...

Continue reading "Understanding POP3: Email Retrieval Protocol Fundamentals" »

OS Concepts: RTOS, Critical Section, Memory & Deadlocks

Computer science5.51 KB

Real-Time Operating System (RTOS)

A Real-Time Operating System (RTOS) is an operating system that provides a response within a specified time limit. It is used in applications where timing is critical.

Types of RTOS

  • Hard Real-Time OS: The deadline must be met. Missing a deadline may lead to system failure.
  • Soft Real-Time OS: Occasional delays are acceptable, but performance may be affected.

Applications of RTOS

  • Medical Equipment
  • Robotics
  • Air Traffic Control Systems
  • Industrial Automation
  • Automobile Control Systems

Advantages of RTOS

  • Fast response
  • High reliability
  • Predictable performance

Critical Section

A Critical Section is the part of a program where a process accesses or modifies shared data or resources. Only one process should execute its critical section...

Continue reading "OS Concepts: RTOS, Critical Section, Memory & Deadlocks" »