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

Operating System Fundamentals and Network Addressing Concepts

Computer science3.53 KB

Operating System Fundamentals

Kernel and Core Components

1. The memory resident part of an operating system is called the kernel. The kernel manages hardware resources and enforces access control. The parts are loaded when the system starts up and stay running as long as the system is on.

2. API stands for Application Programming Interface, which allows different applications to communicate and work together.
3. Device Drivers control communication between devices and operating systems, such as network adapters and graphic cards. Device drivers also provide a layer that allows the operating system to send commands to hardware devices.
4. A process is an execution instance of a program. A process executes instructions in memory, while a program has
...
Continue reading "Operating System Fundamentals and Network Addressing Concepts" »

Pascal Movie Database Management Procedures

Computer science8.83 KB

Pascal Movie Database Management

This document details several procedures written in Pascal for managing a movie database. The database is stored in a file of records, where each record represents a movie.

Data Structure

The code defines a pelicula (movie) record with the following fields:

  • codigo: integer (Movie ID)
  • genero: string (Genre)
  • nombre: string (Title)
  • duracion: integer (Duration)
  • director: string (Director)
  • copias: integer (Number of Copies)
  • precio: real (Price)

A constant valoralto is defined as 9999, used as a sentinel value.

And the file is defined as:

maestro= file of pelicula ;

Procedures

leerp(var p: pelicula)

Reads movie data from the input (keyboard) and stores it in the pelicula record p. It reads the codigo first. If it's not equal to...

Continue reading "Pascal Movie Database Management Procedures" »

Graph Data Structures: Connectedness, Density, and Trees

Computer science41.84 KB

Connected and Disconnected Graphs

A graph is connected if any two vertices of the graph are connected by a path. Conversely, a graph is disconnected if at least two vertices are not connected by a path.

If a graph G is disconnected, then every maximal connected subgraph of G is called a connected component of graph G.

Dense and Sparse Graphs

A dense graph is a graph in which the number of edges is close to the maximal possible number of edges. Description: Connected graph Description:  Unconnected graph

A sparse graph is a graph in which the number of edges is close to the minimal possible number of edges. A sparse graph can be a disconnected graph.

Key Characteristics and Comparison

  • Informally, a graph with relatively few edges is sparse, and a graph with many edges is dense.
  • Sparse graphs are sparsely connected
...
Continue reading "Graph Data Structures: Connectedness, Density, and Trees" »

DMZ Server Configuration and Security Best Practices

Computer science2.6 KB

Four Servers Reside in the DMZ

  • Mail
  • WWW
  • DNS
  • Log Servers

DMZ Mail Server (a Separate Machine)

When an Email Message is Received from the Internet:

  1. Reassembles the message.
  2. Checks for malicious content.
  3. Changes the addresses of the outer firewall (which is how the mail server is known to the outside world) to that of the internal mail server and forwards the mail to the internal mail server.

To Send a Message from the Internal Network to the Internet:

  1. Reassembles the message.
  2. Checks for malicious content (and maybe for proprietary information).
  3. All internal addresses are replaced with "drib.org" (the name of the outside firewall).

DMZ WWW Server (a Separate Machine)

  • Does not contact any servers or information sources on the internal network and it contains
...
Continue reading "DMZ Server Configuration and Security Best Practices" »

Email Protocols and Network Configuration Essentials

Computer science3.93 KB

POP and IMAP Email Protocols

POP (Post Office Protocol) allows for the management, access, and transfer of email messages between a remote server and a client machine (user). Communication consists of the following phases or states:

  • 1. Connection Phase: The server listens on port 110, waiting for a connection from an email client.
  • 2. Authentication Phase: The server expects a username and password for an account.
  • 3. Transaction Stage: Once the user has validated the mailbox, the server locks it (to avoid inconsistencies) and makes it available for consultation.
  • 4. Update Stage: The user is disconnected, and the server updates the mailbox.

IMAP Protocol Features

The IMAP protocol is used to access messages stored on remote servers. The IMAP client...

Continue reading "Email Protocols and Network Configuration Essentials" »

C++ Staff Management: Inheritance and Polymorphism

Computer science10.44 KB

C++ Staff Management System: Inheritance and Polymorphism

This document presents a refactored C++ program demonstrating object-oriented principles such as inheritance and polymorphism. The system models a basic staff management application, featuring a base Officer class and derived classes for specific roles like JusticeOfficer and Firefighter. It highlights dynamic memory management, virtual functions, and runtime polymorphism.

Core Concepts Illustrated

  • Inheritance: JusticeOfficer and Firefighter inherit from the base Officer class.
  • Polymorphism: Virtual functions (insert(), show(), destructor) allow for different behaviors based on the actual object type at runtime.
  • Dynamic Memory: Usage of new and delete[] for character arrays (DNI, names) and
...
Continue reading "C++ Staff Management: Inheritance and Polymorphism" »

Information Security Essentials: Concepts and Practices

Computer science8.2 KB

Fundamentals of Information Security

Core Security Principles

  • Confidentiality (Privacy): Ensures information is not accessible to unauthorized individuals.
  • Integrity: Guarantees information can only be modified by authorized personnel.
  • Availability (Operability): Ensures information is accessible and usable when needed.

Common Information Security Threats

Software and System Vulnerabilities

  • Bug: An error or flaw in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.
  • Trojan: A type of malware that disguises itself as legitimate software, allowing external users unauthorized access to a computer system.

Network and Data Attacks

  • IP Spoofing: The act of creating Internet Protocol (IP)
...
Continue reading "Information Security Essentials: Concepts and Practices" »

Network Routing Strategies and Performance Criteria

Computer science3.66 KB

Performance Criteria for Data Transfer

Performance criteria are the most complex and critical factors to be analyzed before a transfer of data to achieve more effective performance. When determining the choice of route, you can choose based on:

  • A path with the least number of hops.
  • A path involving the least cost.

Instant Decisions and Routing Placement

The routing decision is made based on a packet or virtual circuit. When a routing decision is based on a datagram, it is taken individually for each packet. In the case of virtual circuits, internally governed packets belonging to that circuit will follow the same route.

A third case is Source Routing, in which the source station is the decision maker rather than the network nodes.

Node Responsibility

...
Continue reading "Network Routing Strategies and Performance Criteria" »

Mastering Java: From Basics to Advanced OOP Principles

Computer science187.84 KB

Java Programming Fundamentals and Features

Java is a high-level, object-oriented, platform-independent programming language developed by Sun Microsystems (now owned by Oracle) in 1995. Java follows the principle "Write Once, Run Anywhere (WORA)", meaning a Java program can run on any system that has a Java Virtual Machine (JVM).

Key Features of Java

  • Simple: Easy to learn and use.
  • Object-Oriented: Based on the concept of classes and objects.
  • Platform Independent: Runs on any operating system using the JVM.
  • Portable: Programs can be moved easily from one platform to another.
  • Secure: Provides security through bytecode verification and the JVM.
  • Robust: Features strong memory management and exception handling.
  • Multithreaded: Supports the execution of multiple
...
Continue reading "Mastering Java: From Basics to Advanced OOP Principles" »

Mastering MATLAB: Powering Technical Computing

Computer science2.61 KB

MATLAB stands for Matrix Laboratory. It is a high-performance programming language and software environment developed by a company called MathWorks. It is primarily used for technical computing, heavy mathematical calculations, data analysis, and algorithm development.

Here is a breakdown of what makes MATLAB unique and how it is used:

Core Capabilities of MATLAB

  • Matrix Math: Unlike traditional programming languages that work mainly with single numbers, MATLAB is specifically designed to operate on whole matrices and arrays at once. This makes solving complex mathematical and engineering problems much faster.
  • Data Visualization: It has powerful built-in tools for plotting data. You can easily create 2D and 3D graphs, charts, and custom visual representations
...
Continue reading "Mastering MATLAB: Powering Technical Computing" »