Notes, summaries, assignments, exams, and problems for Computers

Sort by
Subject
Level

Computer Architecture Basics and Performance

Posted by thorng and classified in Computers

Written on in English with a size of 3.43 KB

Introduction to Architecture

  • Instruction Set Architecture (ISA): An assembly language programmer's view of the microprocessor.
  • Assembler: Translates symbolic assembly language code into binary machine language code.

Computer Performance Metrics

  • Execution Time (Response Time): Time to complete a program or task.
  • Throughput (Bandwidth): Number of programs or tasks completed per time unit.
  • Execution Time (texec, i.e., elapsed time, wall time, real time, response time): Elapsed seconds from start to finish. Includes:
    • Executing instructions
    • Disk access
    • Memory access
    • I/O activities
    • OS overhead
  • User CPU Time (tcpu(user)): Seconds the CPU spends executing the program's instructions.
  • System CPU Time (tcpu(sys)): Seconds the CPU spends executing OS (kernel) instructions
... Continue reading "Computer Architecture Basics and Performance" »

Computer Architecture Essentials and Cheat Sheet

Classified in Computers

Written on in English with a size of 3.32 KB

Certainly! Here is a cheat sheet for computer architecture:

1. Central Processing Unit (CPU)

  • The "brain" of the computer that executes instructions.
  • Consists of the Control Unit (CU) and the Arithmetic Logic Unit (ALU).
  • Fetches instructions from memory, decodes them, and executes them.

2. Memory Hierarchy

  • Registers: Fastest and smallest storage units located within the CPU.
  • Cache: High-speed memory that stores frequently accessed data.
  • Main Memory (RAM): Larger storage used to hold data and instructions.
  • Secondary Storage: Non-volatile storage devices like hard drives and SSDs.

3. Instruction Cycle

  • Fetch: The CPU fetches the next instruction from memory.
  • Decode: The instruction is decoded to determine the operation.
  • Execute: The instruction is executed
... Continue reading "Computer Architecture Essentials and Cheat Sheet" »

MATLAB Data Analysis and Trigonometric Plotting

Classified in Computers

Written on in English with a size of 2.6 KB

MATLAB Statistical Analysis of Student Weights

Analyze the weight of 30 students to find the minimum, maximum, average, standard deviation, and plot a histogram.

>> a=[ 71 82 65 75 77 91 59 84 89 81 73 91 82 75 96 85 69 76 81 92 84 79 77 95 81 79 84 85 76 82]

a = Columns 1 through 12
    71 82 65 75 77 91 59 84 89 81 73 91

Columns 13 through 24
    82 75 96 85 69 76 81 92 84 79 77 95

Columns 25 through 30
    81 79 84 85 76 82

>> max(a)
ans = 96

>> min(a)
ans = 59

>> mean(a)
ans = 80.5333

>> std(a)
ans = 8.4516

>> hist(a)

Plotting Trigonometric Functions in MATLAB

Follow these steps to plot trigonometric functions:

  • Plot the value of the cosine within [0, 2π] with a step of π/20.
  • Label the axes and add
... Continue reading "MATLAB Data Analysis and Trigonometric Plotting" »

MPEG Multimedia Standards and Descriptors Quiz

Classified in Computers

Written on in English with a size of 2.4 KB

1. Which of the following statements about MPEG is not correct?

  • a. MPEG-1/2/4 are multimedia standards related to video and audio compression.
  • b. MPEG-7 is a multimedia content description standard that standardizes the extraction process and usage of audiovisual descriptors.
  • c. MPEG-7 is a multimedia content description standard that standardizes the syntax and semantics of audiovisual descriptors.

2. The Dominant Color Descriptor (DCD) captures…

  • a. The spatial distribution of the colors in an image using by default the YUV color space.
  • b. A maximum of eight representative colors using by default the RGB color space.
  • c. All the colors in the RGB color space with a larger percentage than 10.

3. The Color Structure Descriptor (CSD)…

  • a. Does not capture
... Continue reading "MPEG Multimedia Standards and Descriptors Quiz" »

Java Sudoku Solver: Backtracking Algorithm Implementation

Classified in Computers

Written on in English with a size of 5.57 KB

Building a Sudoku Solver in Java with Backtracking

This document presents a Java implementation of a Sudoku solver, utilizing a classic backtracking algorithm. The code demonstrates how to represent a Sudoku board, check for valid moves, and recursively find a solution to the puzzle.

Initial Sudoku Puzzle Setup

The Sudoku board is represented as a 2D integer array. A value of 0 indicates an empty cell that needs to be filled.

int[][] board = {
  { 8, 0, 0, 0, 0, 0, 0, 0, 0 },
  { 0, 0, 3, 6, 0, 0, 0, 0, 0 },
  { 0, 7, 0, 0, 9, 0, 2, 0, 0 },
  { 0, 5, 0, 0, 0, 7, 0, 0, 0 },
  { 0, 0, 0, 0, 4, 5, 7, 0, 0 },
  { 0, 0, 0, 1, 0, 0, 0, 3, 0 },
  { 0, 0, 1, 0, 0, 0, 0, 6, 8 },
  { 0, 0, 8, 5, 0, 0, 0, 1, 0 },
  { 0, 9, 0, 0, 0, 0, 4, 0, 0 }
};

Implementing

... Continue reading "Java Sudoku Solver: Backtracking Algorithm Implementation" »

Essential Computer Terms and Definitions

Classified in Computers

Written on in English with a size of 3.75 KB

Essential Computer Hardware and Components

  • ROM: Primary memory that is used to read data.
  • USB: A slot in the motherboard where you can plug in input devices.
  • Headset: An output device used to listen and to speak.
  • Printer: A peripheral device used to convert digital documents into paper.
  • Tablet: A portable computer.
  • Keyboard: An input device used to type data into the PC.
  • Key: Every unit of a keyboard used for typing.
  • Mainframe: A professional, powerful computer used to offer a service.
  • CPU: A component of the motherboard that manages all the processes of the computer.
  • Scanner: An input peripheral device used to convert documents into digital format.
  • Magnetic Disk: Analogous secondary storage.
  • Megabyte: A measurement unit used in IT representing memory
... Continue reading "Essential Computer Terms and Definitions" »

Layer 3 Versus Layer 2 Packet Fragmentation Analysis

Classified in Computers

Written on in English with a size of 3.45 KB

Packet Fragmentation: Layer 3 vs. Layer 2

As mentioned in the “Link-Layer Fragmentation and Interleaving” section, PPP, Frame Relay, ATM, and other WAN technologies support fragmenting packets (frames) at Layer 2. As you may have learned in basic networking classes, IP can also fragment packets at Layer 3. What are some advantages and disadvantages of fragmenting at Layer 3 versus fragmenting at Layer 2?

Advantages and Disadvantages

  • Advantages (Layer 3 Fragmentation): Large packets can be transmitted at Layer 2 as fragmentation is done at Layer 3. This reduces the number of acknowledgment exchanges. Also, maintaining the order of fragments to ensure the order of transmission and reassembly is not required.
  • Disadvantages (Layer 3 Fragmentation)
... Continue reading "Layer 3 Versus Layer 2 Packet Fragmentation Analysis" »

"entirely belongs to" shareholding

Classified in Computers

Written on in English with a size of 359.9 KB

Chapter 1 Introduction to Services

3.1. Service Terminology Service

a service is a software program that makes its functionality available via a technical interface, called a service contract.

Image

Figure 3.1. The symbol used to represent an abstract service.

Service Contract

The symbol used to represent a service contract is displayed in Figure 3.2.

Image

Service Capability

A service contract can be broken down into a set of service capabilities, each of which expresses a function offered by the service to other software programs.

Image

Figure 3.4. A Purchase Order service contract with four service capabilities.

Service Consumer

A service consumer is software program when it accesses and invokes a service—or, when it sends a message to a service capability


Service

... Continue reading ""entirely belongs to" shareholding" »

Implementing Akka Clusters and Sharding in Lagom

Classified in Computers

Written on in English with a size of 2.4 KB

Akka Clusters and Sharding with Lagom

This configuration demonstrates how to set up Akka Clusters and Sharding within a Lagom microservices project using Scala.

SBT Configuration

organization in ThisBuild := "com.example"
version in ThisBuild := "1.0-SNAPSHOT"
scalaVersion in ThisBuild := "2.11.8"

val macwire = "com.softwaremill.macwire" %% "macros" % "2.2.5" % "provided"
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.1" % Test

lazy val `lagom-persistent-entity-demo` = (project in file("."))
  .aggregate(`user-api`, `user-impl`)

lazy val `user-api` = (project in file("user-api"))
  .settings(
    libraryDependencies ++= Seq(
      lagomScaladslApi
    )
  )

lazy val `user-impl` = (project in file("user-impl"))
  .enablePlugins(LagomScala)
... Continue reading "Implementing Akka Clusters and Sharding in Lagom" »

10 Usability Heuristics for User Interface Design

Classified in Computers

Written on in English with a size of 2.46 KB

1. Visibility of System Status

The system should always keep users informed about what is going on, through appropriate feedback within a reasonable time.

2. Match Between System and the Real World

The system should speak the user's language, with words, phrases, and concepts familiar to the user, rather than system-oriented terms. Follow real-world conventions, making information appear in a natural and logical order.

3. User Control and Freedom

Users often choose system functions by mistake and will need a clearly marked "emergency exit" to leave the unwanted state without having to go through an extended dialogue. Support undo and redo.

4. Consistency and Standards

Users should not have to wonder whether different words, situations, or actions... Continue reading "10 Usability Heuristics for User Interface Design" »