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

Types of RAM Modules: DIMM, DDR, RIMM, FB-DIMM, GDDR, SO-DIMM

Computer science2.93 KB

Memory Modules

Small printed circuit boards built on different memory chips:

  • DIMM (Dual In-Line Memory Module): Similar to the SIMM, physically larger, and have 168 contacts. They are distinguished by having a notch on both sides and two more in the row of contacts. The mounting of the sockets is different than that of the SIMM. DIMMs are found in 32, 64, 128, 256, 512 MB, and 1, 2 GB capacities.
  • DIMM DDR: Has gradually replaced the standard DIMMs. It has a total of 184 pins instead of the 168-pin DIMM of SDRAM. Physically, they resemble the above but have one notch in the row of contacts.
  • DIMM DDR2: Has 240 pins and a notch in a different position than DDR DIMMs.
  • DIMM DDR3: Also has 240 pins but is neither physically nor electrically compatible
...
Continue reading "Types of RAM Modules: DIMM, DDR, RIMM, FB-DIMM, GDDR, SO-DIMM" »

C++ Programming: Streams, Functions, and Memory

Computer science11.17 KB

In C++, Input/Output (I/O) operations are managed through a hierarchy of classes collectively known as streams. A stream is an abstraction that represents a flow of data between a source (like a keyboard) and a destination (like a screen).

Here is a comprehensive breakdown of how C++ handles both unformatted and formatted I/O operations, along with the core stream mechanisms.

Streams, Insertion, and Extraction

At the heart of C++ I/O are the standard stream objects:

  • cin: Standard input stream (usually the keyboard), an instance of istream.
  • cout: Standard output stream (usually the screen), an instance of ostream.

The Insertion Operator (<<)

Used with cout to output data. It "inserts" data into the output stream.

cout << "Hello, World!";
...
Continue reading "C++ Programming: Streams, Functions, and Memory" »

Mastering JavaScript Objects: A Comprehensive Reference

Computer science7.71 KB

Introduction to JavaScript Objects

In JavaScript, an object is a self-contained environment that stores data as a collection of properties and methods. A property is an association between a name (or key) and a value, while a method is a function associated with an object.

Think of an object as a real-world entity. For example, a Car is an object. It has properties like color, brand, and weight, and methods like start, drive, and brake.

// A simple conceptual look at an object
let car = {
    brand: "Tesla",       // Property (key: value)
    color: "Red",         // Property
    start: function() {   // Method
        console.log("Engine started!");
    }
};

Types of Objects in JavaScript

While almost everything in JavaScript is an object (or acts...

Continue reading "Mastering JavaScript Objects: A Comprehensive Reference" »

Part

Computer science7.52 KB

Why protection is needed
In multitasking or multi‑user systems, two programs might try to use the same memory at the same time, which can corrupt data or crash the system.
Protection mechanisms isolate user programs from each other and from the OS, and also help detect bugs by checking whether each memory access and instruction obeys certain safety rules.
Overview of 80386 protection
80386 has four protection levels (0–3), where 0 is most trusted (OS kernel) and 3 is least trusted (user apps).
It uses two main mechanisms: segment‑level protection and page‑level protection, and every memory access is checked against these rules before the actual memory cycle startsSegment‑level protection (idea)
Segment‑level protection has five parts:

...
Continue reading "Part" »

Understanding the C Programming Language: History and Structure

Computer science12.78 KB

That's a great request! C is a foundational language in computer science. Here is a comprehensive look at C, covering its history, importance, structure, and fundamental components.
📜 History of C
C is a general-purpose, procedural computer programming language developed in the early 1970s by Dennis Ritchie at Bell Labs.
 

  • Origin: It was primarily developed to write the UNIX operating system, which was previously written in assembly language.
  • Predecessors: C evolved from earlier languages:
    • ALGOL 60 (1960)
    • CPL (Combined Programming Language, 1963)
    • BCPL (Basic CPL, 1967)
    • B (developed by Ken Thompson, 1970)
  • Standardization: The language was later standardized by the American National Standards Institute (ANSI) in 1989, resulting in ANSI C or C89. This
...
Continue reading "Understanding the C Programming Language: History and Structure" »

Operating System Concepts: Hardware Interaction and Scheduling

Computer science1.45 MB

Operating System Fundamentals

The Operating System (OS) serves several critical roles:

  • It acts as a resource manager, controlling access to the hardware.
  • It provides an abstraction layer, allowing user processes to call functions that access hardware via system calls.

User Mode vs. Supervisor Mode (Kernel Mode)

The CPU enforces separation between user processes and the OS kernel:

  • User Mode: Prohibits privileged instructions.
  • Kernel Mode (Supervisor Mode): Allows access to all hardware and privileged operations.

Program Status Word (PSW)

The PSW is a special register holding vital information, such as:

  • Access privilege mode.
  • Runtime execution conditions (e.g., condition codes).
  • Program Counter (PC) and Stack Pointer (SP).

Simplified Interrupt Handling Flow

  1. A
...
Continue reading "Operating System Concepts: Hardware Interaction and Scheduling" »

Understanding Constructors and Class Variables in OOP

Computer science3.89 KB

Constructor

A constructor is a special method in object-oriented programming that is automatically called when an instance (object) of a class is created. The main purpose of a constructor is to initialize the object's attributes (properties) and allocate resources if needed. Constructors have the same name as the class and do not have a return type.

Example of a Constructor

Here is an example in Python:

class Person:
    def __init__(self):
        self.name = "John Doe"
        self.age = 30

# Creating an instance of the Person class
person = Person()

print(person.name)  # Output: John Doe
print(person.age)   # Output: 30

In this example, __init__ is the constructor method in the Person class. It initializes the name and age attributes of the...

Continue reading "Understanding Constructors and Class Variables in OOP" »

Network Security & Configuration: Routing, VLANs, DHCP, and Attack Mitigation

Computer science2.38 KB

Router-on-a-Stick Inter-VLAN Routing

The router's port connecting to the LAN has multiple sub-interfaces, each the default gateway for a specific VLAN. For example, VLAN 10 traffic destined for VLAN 20 is first forwarded to VLAN 10's default gateway (the router sub-interface). The router then routes this traffic to VLAN 20's gateway (its corresponding sub-interface) and finally to the user in VLAN 20.

Why STP Is Needed for Redundant Ethernet LANs

  • Preventing Broadcast Storms: In redundant networks, frames can loop endlessly, exponentially increasing traffic. STP prevents this by disabling redundant paths, ensuring one active path between devices.
  • Ensuring MAC Address Table Consistency: Loops cause switches to receive the same frame on different
...
Continue reading "Network Security & Configuration: Routing, VLANs, DHCP, and Attack Mitigation" »

Telephone Means and Equipment: Features and Services

Computer science9.05 KB

Telephone Means and Equipment

Fixed individual devices (copper networks have been replaced by optical fiber networks)

Private branch exchanges (PBX): it connects calls between two destinations or ends

Function: call transfers among extensions, caller ID…

Types: IP PBXs call centers, they manage just phone calls contact centres, they not only manage phone calls but emails, SMS, online messages, faxes, etc.

Mobile devices: PDA, Smartphone

Services: Internet, e-mail, videoconference, digital camera, audio an Video quality player, an agenda, GPS, own, Operating system

Additional services offered by the telephone equipment

Common features

A.Fixed telephony: -Notice of charge(aviso de cargo) you receive info on the cost of a call Call forwarding(desvio

...
Continue reading "Telephone Means and Equipment: Features and Services" »

Refer to the exhibit. When a static IP address is being configured on the host, what address should be used for the default gateway

Computer science4.69 KB

HOSTàROUTER: 1

ENABLE

CONFIGURE TERMINAL

INTERFACE GIGABITETHERNET 0/0

IP ADDRESS 192.168.1.126 255.255.255.224

NO SHUTDOWN

EXIT

INTERFACE GIGABITEETHERNET 0/1

IP ADDRESS 192.168.1.158 255.255.255.240

NO SHUTDOWN

HOSTàSWITCH 2

ENABLE

CONFIFURE TERMINAL

INTERFACE VLAN 1

IP ADDRESS 192.168.1.157 255.255.255.240

NO SHUTDOWN

HOST/ROUTER 3

EXIT (LLEGAR AL CONFIGURE TERMINAL)

HOSTNAME MIDDLE

ENABLE SECRET CISCO

LINE CONSOLE 0

PASSWORD CLASS

LOGIN

EXIT

SECURITY PASSWORD MIN-LENGTH 10

SERVICE PASSWORD ENCRYPTION

IP DOMAIN-NAME CISCO

CRYPTON KEY GENERATE RSA

1024

EXIT

USERNAME CICLOS

LINE VTY 0 4

LOGIN LOCAL

TRANSPORT INPUT SSH

EXIT

INTERFACE GIBABITEETHERNET 0/0

IPV6 ADDRESS 2001:DB8:ACAD:A::1/64

IPV6 ADDRESS FE80::1 LIN

EXIT

GIBABITETHERNET 0/1

IPV6 ADDRESS 2001:DB8:ACAD:B::1/64

IPV6

...
Continue reading "Refer to the exhibit. When a static IP address is being configured on the host, what address should be used for the default gateway" »