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

Essential PC Hardware Troubleshooting Techniques and Fixes

Computer science2.75 KB

Essential PC Hardware Troubleshooting Topics

  • POST Routine Familiarity

    The Power-On Self-Test (POST) routines perform entry-level hardware troubleshooting as a PC starts. Be familiar with the abilities of the POST and its use.

  • Diagnosing Port Issues

    When a port isn't functioning, make sure you know the steps to take to ensure that it's physically connected, enabled in BIOS, and recognized in Windows.

  • Troubleshooting Hard Disk Systems

    Be aware of the common causes of hard-disk problems, including improper jumper configuration, BIOS Setup, and formatting/partitioning issues.

  • Identifying Overheating Issues

    Overheating can cause spontaneous rebooting or shutdown. It's often caused by nonfunctioning cooling fans or improper airflow through the PC.

  • Determining

...
Continue reading "Essential PC Hardware Troubleshooting Techniques and Fixes" »

Operating System Memory Management: Principles and Techniques

Computer science2.2 KB

Memory Management Objectives

  • Compare operating system types based on memory management.
  • Analyze machine performance based on demand paging and memory allocation.

Fundamentals of Memory Management

Main memory is a linear array of storage locations, each one byte in size.

  • Access Time: The duration between the start and end of a read or write operation.
  • Memory Cycle Time: The hardware-imposed delay between the end of one operation and the start of the next.
  • Address: Physical memory is a sequence of bytes or words, each with a unique address for direct access.

Types of Operating Systems

  • Naked Machine: A computer lacking an operating system.
  • Dedicated Memory: A system where the programmer directly accesses and manages hardware memory.
  • Resident Monitor: Early
...
Continue reading "Operating System Memory Management: Principles and Techniques" »

Essential Linux Commands and Quota Management

Computer science4.68 KB

Here's a list of essential Linux commands:

  • lime - Displays the current calendar.
  • lime 1980 - Shows the calendar for the year 1980.
  • cal 12 1980 - Displays the calendar for December 1980.
  • date - Displays the current date.
  • date -s "2009-11-05 18:55" - Changes the system time.
  • who - Shows who is currently logged into the system.
  • who -u - Displays the process ID (PID) of logged-in users.
  • kill -9 3525 - Terminates the process with PID 3525.
  • uname - Outputs the machine's name.
  • uname -a - Shows detailed information about the machine.
  • uptime - Displays how long the machine has been running.
  • du - Displays disk space usage by folders.
  • du -k - Displays disk space usage in 1024-byte blocks.
  • df - Displays disk usage statistics.
  • ps - Displays a general list of running processes.
...
Continue reading "Essential Linux Commands and Quota Management" »

Assembly Language Fundamentals: Interrupts, Memory, and MASM Directives

Computer science4.57 KB

Understanding System Interrupts and Functions

System interrupts are crucial for managing CPU operations and external device interactions. They can be broadly categorized into:

  • CPU Interrupts: These are internal events, often referred to as software interrupts or exceptions, triggered by the CPU itself.
  • Hardware Interrupts: Caused by external devices, signaling the CPU for attention (e.g., keyboard input, disk I/O).

Essential System Services and Functions

Beyond interrupts, various basic services are available for program interaction with the system:

ROM BIOS Functions

Functions available directly in the system's Read-Only Memory (ROM).

DOS BIOS Services

Basic functions provided by the Disk Operating System (DOS).

DOS Functions

High-level functions for...

Continue reading "Assembly Language Fundamentals: Interrupts, Memory, and MASM Directives" »

Comparative Analysis of Operating System Memory Management (Linux, Solaris, W2K)

Computer science3.34 KB

Memory Management in Linux

Page Allocation Mechanism

Linux defines a mechanism for dealing with contiguous blocks of pages corresponding to blocks of contiguous page frames in main memory. For this, it uses the buddy system, where the kernel maintains a list of groups of contiguous page frames of fixed size.

Page Replacement Algorithm

The Linux page replacement algorithm is based on the Clock algorithm (also known as NUR or NRU), which associates a use bit and a modification bit with each page in main memory.

Memory Management in Solaris

Paging System

Machine-Independent Data Structures

For paged virtual memory, Solaris uses a series of data structures that are independent of the machine:

  • Page Table: Each process has a table with an entry for every
...
Continue reading "Comparative Analysis of Operating System Memory Management (Linux, Solaris, W2K)" »

Understanding Relational Database Models: Concepts and Operations

Computer science3.26 KB

Relational Model: An In-Depth Look

The relational model allows users to obtain information from the database without needing assistance from information management professionals. The data is stored in a way that:

  • Users understand it more easily.
  • The data is stored as tables.
  • Relationships between rows and tables are visible within the data.

Features of Relational Models

  • It is important to know that the entries in the table are atomic.
  • All entries in any column are of a single type. The table columns are called attributes.
  • No two rows in the table are identical.

Structure of Relational Databases

At the conceptual level, the relational database model is represented by a collection of stored relations.

Submodel Data

External schemas of relational sub-models...

Continue reading "Understanding Relational Database Models: Concepts and Operations" »

Guide to Buttons in Java Applets: Types and Examples

Computer science4.39 KB

Buttons in Java Applets

Introduction

Buttons are essential UI elements in Java applets, allowing user interaction and triggering specific actions. This guide explores various button types and their implementation.

Basic Buttons

Buttons can be created using the Button class. They are displayed on the screen and trigger events when clicked. Each button has an identifier used for event handling.

Example:

Button button;button = new Button("Button");

Button Events

When a user clicks a button, an event is generated. These events can be captured using the action() method:

public boolean action(Event evt, Object obj) {    if (evt.target instanceof Button) {        System.out.println((String) obj);    } else {        System.out.println("Event No-Button");
...
Continue reading "Guide to Buttons in Java Applets: Types and Examples" »

Packet and Circuit Switched Networks: Core Concepts

Computer science3.21 KB

Packet Switched Networks

IP Protocol

The IP protocol is a connectionless protocol used by both the origin and the destination for data communication over a packet-switched network.

IP Address

An IP address is a 32-bit integer that identifies a network interface. It is classified by type according to the value of the first byte.

Available Private Addresses
  • Class A: 10.0.0.0
  • Class B: 172.16.0.0 - 172.31.0.0
  • Class C: 192.168.0.0 - 192.168.255.0

Netmask

A 32-bit integer associated with an IP address that indicates which bits belong to the network portion (binary 1) and which belong to the host (binary 0).

Fragmentation

The IP protocol includes fragmentation to fit the Maximum Transmission Unit (MTU). This divides an IP packet into smaller segments using the...

Continue reading "Packet and Circuit Switched Networks: Core Concepts" »

Essential Data Structures and Algorithms Reference

Computer science131.13 KB

Arrays and ArrayLists

Definition: A contiguous block of memory holding same-type elements, accessed by index.

  • Fixed-size array vs. dynamic ArrayList: ArrayLists auto-resize.
  • Operations: Access O(1), search O(n), insert/delete at end O(1) amortized, insert/delete at middle O(n) due to shifting.
  • When to use: Known size, frequent random access reads.
  • When NOT to use: Frequent insertions/deletions in the middle.
  • Worked example: ArrayList ops add("A"), add(1,"B"), add("C") → Array state: ["A"] → ["A", "B"] → ["A", "B", "C"].

Linked Lists

Definition: Nodes containing a value and a pointer to the next node (and previous for doubly linked).

  • Operations: Access O(n), insert at head O(1), insert at tail O(1) if tail pointer is kept, search O(n).
  • Why insert
...
Continue reading "Essential Data Structures and Algorithms Reference" »

Operating Systems: System Calls, Processes, and Forking

Computer science2.83 KB

Operating Systems: System Calls and File Descriptors

OS vs. User ModeRead vs. Write OperationsSpecial File Descriptors

System Calls and Kernel Mode

Public functions provided by the OS.

open(*pathname, Flags): Returns a file descriptor; returns -1 on error.

int main(int argc, char *argv[]) {
  int fd = open(argv[1], O_WRONLY | O_CREAT | O_EXCL, 0644);
  if (fd == -1) {
    printf("There was a problem creating \"%s\"!\n", argv[1]);
    return 1;
  }
  close(fd);
  return 0;
}

Handling Data Streams

read may not return all requested bytes; it returns the actual count read. It only returns 0 at the end of the file.

void copyContents(int sourceFD, int destinationFD) {
  char buffer[kCopyIncrement];
  while (true) {
    ssize_t bytesRead = read(sourceFD,
...
Continue reading "Operating Systems: System Calls, Processes, and Forking" »