Notes, summaries, assignments, exams, and problems for Computer science

Data Link Layer Protocols: MAC, LLC, Token Ring, VLAN, STP Essentials

Computer science2.76 KB

Understanding the Data Link Layer

The MAC sublayer operates at the bottom of the Data Link Layer (OSI Layer 2).

MAC Sublayer: Core Functions

The Ethernet MAC sublayer has two primary responsibilities:

  • Data Encapsulation
  • Medium Access Control

Some key functions of the MAC sublayer include:

  • Controlling access to the physical medium.
  • Adding the MAC address to frames.
  • Frame delimitation (determining the beginning and end of a data frame within a string of bits received by the physical layer).
  • Performing transmission error detection.
  • Discarding duplicate or erroneous frames.

LLC Sublayer: Data Transfer and Control

The LLC (Logical Link Control) sublayer defines how data is transferred on the physical environment, providing services to higher layers. The LLC...

Continue reading "Data Link Layer Protocols: MAC, LLC, Token Ring, VLAN, STP Essentials" »

Local Area Networks (LAN) and High-Speed Networks: Fundamentals

Computer science3.01 KB

Chapter 1: Local Area Network (LAN) Fundamentals

A local area network (LAN) includes the components, both software and hardware, that enable microcomputers, PCs, and peripherals within a limited geographical area to communicate with each other. LANs also facilitate the distribution and sharing of all system resources between different units.

Key Characteristics of a Local Area Network

  • Limited geographical area
  • High transmission speed (from 1 Mbit/s to 1 Gbit/s)
  • Low error rate
  • Entire network is owned and managed by the user

These LANs can be interconnected in various ways using repeaters, bridges, gateways, routers, or switches.

Local Area Network Objectives

  • Allow secure communication at a reasonable cost
  • Be structured in levels, allowing changes by level
...
Continue reading "Local Area Networks (LAN) and High-Speed Networks: Fundamentals" »

Network Configuration Essentials: VLANs, STP, and VTP

Computer science3.61 KB

1. Analyzing Exhibit Information for Network Conclusions

Refer to the exhibit. Which two statements can be concluded from the information shown in the exhibit? (Choose two.)

  • All ports listed in the exhibit are access ports.
  • A router connected to the switch is required to forward traffic between hosts.

2. Router Packet Forwarding on Uplink Trunk

A router is configured to connect to an uplink trunk, as shown in the exhibit. A packet is received on the FastEthernet 0/1 physical interface from VLAN 10. The packet's destination address is 192.168.1.120. What will the router do with this packet?

  • The router will forward the packet to the FastEthernet 0/1.2 interface with VLAN tagging for 60.

3. BPDU Information Usage in Spanning Tree Protocol

For which two...

Continue reading "Network Configuration Essentials: VLANs, STP, and VTP" »

ArcView GIS Data Management and Mapping Techniques

Computer science4.17 KB

This document provides practical instructions and solutions for common tasks and challenges encountered when working with ArcView GIS, covering topics from database integration and map creation to geocoding and spatial analysis.

Core ArcView GIS Operations

Joining External Data in ArcView GIS

To join an external database with attributes of the current theme:

  • Open the properties of the item table (theme).
  • Open the external table to be joined.
  • Identify the common field in both tables.
  • Select the common field in the external table.
  • Select the corresponding common field in the item table's properties.
  • Click the Join icon.
Adding and Arranging Themes in ArcView

To add a new theme to a view and display it in the background:

  • Add the theme using the Add Theme
...
Continue reading "ArcView GIS Data Management and Mapping Techniques" »

Object Identity, Complex Objects, and Persistent Programming

Computer science2.77 KB

Object Identity Types

There are three main types of object identity:

  • Asset (Data Value as Identity): This form of identity, commonly used in relational systems, utilizes a data value as the identifier. For instance, the primary key value in a tuple uniquely identifies that tuple.
  • Name (User-Defined Identity): This type of identity relies on a name assigned by the user. File systems often employ this approach, where each file has a unique name regardless of its content.
  • Incorporated (System-Generated Identity): This concept integrates identity directly into the data model or programming language, eliminating the need for user-provided identifiers. Object-oriented systems commonly use this method, automatically assigning a unique identifier to each
...
Continue reading "Object Identity, Complex Objects, and Persistent Programming" »

Computer Main Memory Types: RAM and ROM Details

Computer science2.96 KB

1.3 Main Memory Fundamentals

The main memory can be defined as a device capable of storing information. This information is made up of bits, which are the basic elements of memory. A bit is the basic unit of information and can only take two values: (0 or 1). The quantity of bits of information that can be stored in a given memory defines its capacity. Main memory can be distinguished into two main groups: RAM and ROM memory.

RAM (Random Access Memory)

RAM is characterized as being very fast for reading and writing and is volatile (loses data when power is off).

RAM Divisions

  • SRAM (Static RAM): In static memory cells, the storage of information resides in a bistable state; each bit is formed by a continuous bistable order so that the information
...
Continue reading "Computer Main Memory Types: RAM and ROM Details" »

Page Replacement Algorithms and Thrashing Explained

Computer science2.49 KB

Page Replacement Algorithms

  • Random: The least efficient method, though simple to implement.
  • FIFO (First-In, First-Out): Replaces the page that has resided in real memory the longest. It is easy to implement using a list to track page order.
  • LRU (Least Recently Used): Replaces the page that has not been referenced for the longest period. It is highly effective because past behavior is often a reliable indicator of future needs.
  • NUR (Not Used Recently): Selects a victim page cyclically, specifically targeting pages that have not been accessed or modified within a recent time window.
  • LFU (Least Frequently Used): Replaces the page with the lowest reference count. This requires maintaining reference counters for each page.
  • The Clock: A variant of LRU
...
Continue reading "Page Replacement Algorithms and Thrashing Explained" »

Operating System Memory Management: Paging and Segmentation

Computer science3.19 KB

Page Fault Handling

  • Hardware triggers the trap and saves the Program Counter (PC).
  • The trap handler (interrupt routine) saves the registers.
  • The OS detects a page fault.
  • The OS searches for a free page frame. If none are available, it selects a victim page and evicts it.
  • The OS initiates I/O for the page that triggered the fault.
  • Once the disk interrupt handler notifies that the page has arrived, the process is scheduled for execution again.

Page Table Management

During each context switch, the current page table must be saved in the Process Control Block (PCB) and the new process's table must be loaded. Tables can be stored in:

Registers

  • Provides faster access.
  • If there is significant RAM, the table will have too many entries to fit in registers.
  • Every
...
Continue reading "Operating System Memory Management: Paging and Segmentation" »

Dining Philosophers Problem: C Implementation with Pthreads

Computer science2.22 KB

C Implementation of the Dining Philosophers Problem

This program simulates the Dining Philosophers problem using C and Pthreads to demonstrate concurrency and synchronization concepts.

Global Variables

  • num_filosofos (int): Number of philosophers.
  • seed (int): Seed for random number generation.
  • holders (pthread_mutex_t*): Array of mutexes representing forks.
  • timeIni (long): Initial time in milliseconds.

Functions

long dameTiempo()

Returns the current time in milliseconds.

int eat(int n)

Simulates a philosopher eating.

  • TimeWait (long): Random wait time (0-500 ms).
  • Prints a message indicating the philosopher is eating.
  • Waits for TimeWait milliseconds.
  • Releases the left and right forks (mutexes).

int sleep(int n)

Simulates a philosopher sleeping.

  • TimeWait (long):
...
Continue reading "Dining Philosophers Problem: C Implementation with Pthreads" »

Common Types of Computer Malware Explained

Computer science6.04 KB

1. Boot Sector Virus

  • It is a type of virus which infects the master boot record (portion of the hard disk which helps to load the OS) or hard disks.
  • The infected code runs when the system is booted from an infected disk.
  • They infect at a BIOS level (BIOS checks hardware and loads the OS).
  • They use DOS commands (text-based commands used to perform tasks such as file management, disk management, and running programs) to spread to other floppy disks. Since floppy disks are rarely used now, the propagation of boot sector viruses has almost ended.
  • With the boot-sector safeguards in operating systems, boot-sector viruses can no longer infect computers.
  • This virus can infect a computer only during boot-up. Once the system has started and the OS is running,
...
Continue reading "Common Types of Computer Malware Explained" »