Notes, summaries, assignments, exams, and exercises for Computer science for Baccalaureate

Software Architecture Essentials: Design Principles & Patterns

Computer science7.09 KB

Software Architecture Fundamentals

  • Definition (IEEE): The fundamental organization of a software system, including components, their relationships, and design principles.

  • Purpose: To ensure reliability, efficiency, security, and maintainability.


Architectural Design Process

  • Goal: Design the system’s overall structure and its communication.

  • Outputs: An architectural model showing component interaction.

  • Key Link: Connects requirements to design.


Software Architecture Documentation

  • Includes:

    • Product Overview

    • Static and Dynamic Architectural Models

    • Mapping Between Models

    • Design Rationale


Architectural Abstraction Levels

  • In the Small: Structure of a single program.

  • In the Large: Structure of enterprise-level systems across networks.


Benefits of Explicit Architecture

  • Stakeholder

...

Continue reading "Software Architecture Essentials: Design Principles & Patterns" »

Neural Networks: Neurons, Activation, Structure

Computer science3.62 KB

Biological Neurons

A biological neuron is the fundamental unit of the nervous system, responsible for transmitting information throughout the body. It consists of three main parts:

  • Dendrites: These are branch-like structures that receive signals from other neurons and transmit them to the cell body.
  • Cell Body (Soma): Contains the nucleus and other essential organelles responsible for processing information.
  • Axon: A long, thread-like extension that carries nerve impulses away from the cell body to other neurons, muscles, or glands.

Neurons communicate using electrical and chemical signals through synapses, where neurotransmitters help in transmitting the signals. The brain contains billions of neurons that work together to perform cognitive functions,...

Continue reading "Neural Networks: Neurons, Activation, Structure" »

Key Characteristics of Effective Database Management

Computer science2.4 KB

A database has several key characteristics that make it an essential tool for managing information efficiently. Here are the main characteristics explained in simple language:

  • Structured Data Storage: Databases store data in a structured format, usually in tables with rows and columns. This structure makes it easy to organize, manage, and retrieve information.
  • Data Integrity: Databases ensure the accuracy and consistency of data. Rules can be set to prevent errors, such as entering text into a field meant for numbers or duplicating records.
  • Data Security: Databases provide features to protect data from unauthorized access. You can set permissions to control who can view, update, or delete data, ensuring that sensitive information remains secure.
...
Continue reading "Key Characteristics of Effective Database Management" »

Essential Computer Science: Binary, OS Kernel, Von Neumann, Assembly

Computer science53.68 KB

Binary Operations and Number Systems

s8wZJYEAlCkAAAAASUVORK5CYII=

Bitwise Shift Operations

Left Shift

The left shift operator (<<) shifts bits to the left, filling the vacated positions on the right with zeros. This is equivalent to multiplying the number by powers of two.

Right Shift

The right shift operator (>>) shifts bits to the right. There are two types:

  • Logical Right Shift: Fills the vacated positions on the left with zeros.
  • Arithmetic Right Shift: Fills the vacated positions on the left with the most significant bit (sign bit) of the original number, preserving the sign for signed integers.

Decimal to Binary Conversion

To convert a decimal number to binary, repeatedly divide the decimal number by 2. Record the remainder (which will be either 0 or 1) from right...

Continue reading "Essential Computer Science: Binary, OS Kernel, Von Neumann, Assembly" »

Pentium P5 Pipelining and Control Word Architecture

Computer science2.78 KB

Pentium P5 Processor Pipelining Stages

The Pentium processor, specifically the Pentium Classic (P5) architecture, featured a five-stage pipeline. The five stages of pipelining in the Pentium processor are as follows:

  1. Instruction Fetch (IF): This stage is responsible for fetching instructions from the memory. The instruction pointer determines the next instruction to be fetched, and the instruction cache is utilized to improve performance by storing frequently accessed instructions.
  2. Instruction Decode (ID): In this stage, the fetched instruction is decoded. The opcode and operands are identified, and any necessary data dependencies or control hazards are resolved.
  3. Execution (EX): The execution stage performs the actual computation or operation specified
...
Continue reading "Pentium P5 Pipelining and Control Word Architecture" »

Introduction to Operating Systems

Computer science2.21 KB

Application Software

System Software

Operating System

Why OS?

Operating System Function

OS Goals

Types of Operating Systems

  • Single Process Operating System
  • Batch-Processing Operating System
  • Multiprogramming Operating System
  • Multitasking Operating System
  • Multi-Processing Operating System
  • Distributed System
  • Real Time OS

Program

Process

Thread

Multi-tasking vs Multi-Threading

Thread Scheduling

Thread Context Switching vs Process Context Switching

User Space

Kernel

Functions of Kernel

  • Process Management
  • Memory Management
  • File Management
  • I/O Management

Type Of Kernel

  • Monolithic
  • Micro
  • Hybrid
  • Nano

System Calls

Types

  • Process Management
  • Device Management
  • File Management
  • Information Management
  • Communication Management

Firmware: SW embedded in HW (microprocessor -> microcontroller)

What

...
Continue reading "Introduction to Operating Systems" »

Caloreats: Personalized Daily Calorie and Meal Planning

Computer science2.48 KB

Caloreats

Functionality

The goal of Caloreats is to help users control their daily calorie intake. With an intuitive menu, users can select their preferred diet (e.g., gluten-free, vegetarian, vegan) and their daily calorie target. The app then generates a personalized meal plan for the day, including breakfast, lunch, and dinner, complete with detailed nutritional information.

All recipes are provided by the Spoonacular API, which features over 2,600 ingredients and 360,000 recipes. Each recipe includes pricing, health information, nutritional analysis, images, and cooking tips.

Navigation

Upon launching the app, users are directed to the login page, which supports email or Google account authentication. Once logged in, the user is taken to the...

Continue reading "Caloreats: Personalized Daily Calorie and Meal Planning" »

OpenMP Parallel Programming: Optimization Techniques

Computer science3.13 KB

Conceptos Básicos de OpenMP

  • Flush: Ocurre cuando hay algo modificado y se escribe en la misma línea.
  • Bus Upgrade: Sucede cuando tienes un dato exclusivo y lo modificas.

Versión Secuencial con Pragma Parallel For y Reduction

int minimo(int *V, int n) {
    int i, k, i_end, i_start;
    int min = V[0];
    #pragma omp parallel for private(i_end, i_start) reduction(min:min)
    for(k = 0; k < 4; k++) {
        i_end = (k + 1) * (n / 4);
        if(k == 0) i_start = 1;
        else i_start = k * (n / 4);
        for(i = i_start; i < i_end; i++) {
            if(V[i] < min) min = V[i];
        }
    }
    return min;
}

Versión Usando Pragma OMP Task

int minimo(int *V, int N) {
    int i, k, i_end, i_start;
    int min;
    int min4[4][16]
...
Continue reading "OpenMP Parallel Programming: Optimization Techniques" »

Understanding Cisco IGRP and EIGRP Protocols

Computer science3 KB

Understanding IGRP Protocol

What is IGRP?

IGRP is a Cisco-specific protocol developed in the mid-1980s.

IGRP Advantages Over RIP

IGRP calculates a composite metric from a set of route variables. It can be implemented on networks of up to 255 hops in diameter. Additional advantages include:

  • Unequal-cost load sharing
  • An update period three times longer than RIP's
  • A more efficient update packet format

Unlike RIP, which uses UDP, the IGRP process is accessed directly from the IP layer as protocol 9.

IGRP Routing and Process Domains

Using domains allows isolating communications within one domain from others. IGRP uses two types: routing domains and process domains.

  • Routing domains: Defined by Autonomous System (AS) boundaries and communicate via Exterior Gateway
...
Continue reading "Understanding Cisco IGRP and EIGRP Protocols" »

Understanding CIDR, Subnetting, and Supernetting in IP Addressing

Computer science3.13 KB

Drawbacks of Classful Addressing

Subnets have a fixed number of host addresses, leading to many unused/wasted IP addresses.

Solutions for IP Address Shortages

Short-term: Classless addressing
Long-term: IPv6

CIDR (Classless Inter-Domain Routing)

CIDR uses a hierarchical addressing scheme based on VLSM (Variable Length Subnet Masking).

Advantages of CIDR

  • Replaces classful addressing with a more flexible and less wasteful classless scheme.
  • Enhances route aggregation.

How VLSM Works

VLSM further subnets existing subnets by taking bits from the host ID, creating a multi-level hierarchy with "sub-subnets."

Supernetting

Supernetting combines continuous network addresses into a new address defined by the subnet mask. Multiple networks are combined into a larger...

Continue reading "Understanding CIDR, Subnetting, and Supernetting in IP Addressing" »