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

Understanding Cache Memory and CPU Hazards

Computer science2.83 KB

1. General Questions (35%)

1.1. (5%) What is the difference between a write-back cache and a write-through cache?

Write-back cache: A store only writes data to the cache and marks the corresponding line as dirty. The modified line is written to the lower level of the memory hierarchy only when it is evicted.

Write-through cache: Data is written to the caches and the memory every time a store is executed.

1.2. (15%) Name the 3 Cs in cache misses and provide a brief explanation for each C.

Compulsory miss: A cache miss caused by the first access, a cold start effect.

Capacity miss: A cache miss due to the capacity limitation. Even with full associativity, it cannot accommodate all the working sets of an application.

Conflict miss: A cache miss that...

Continue reading "Understanding Cache Memory and CPU Hazards" »

Introduction to Computer Networks

Computer science2.57 KB

Servers

A server stores data to be used by other computers on a network. A server could be a specialized machine, or it can be a normal PC running server software. The server stores data and responds to requests for data or files, such as web pages.

Types of Server

There are many different types of servers. Some popular examples follow.

Web Servers

Web servers host websites and generally handle requests for static information such as HTML pages or images. They are used to manage the website on the server and often include FTP software, which can easily host and share large files. The Apache web server is a popular type of open-source web server software.

Application Servers

Many websites are classed as web applications, which contain programming and...

Continue reading "Introduction to Computer Networks" »

Revit Elements and Tools: A Comprehensive Dictionary

Computer science4.2 KB

Annotation Elements

Used to notate and clarify the information presented.

Annotate Ribbon

Buttons: Aligned, Linear, Angular, Radial, Diameter, Arc Length, Spot Elevation, Spot Coordinate, Spot Slope, Detail Line, Region, Component, Revision Cloud, Detail Group, Insulation, Text, Check Spelling, Find/Replace, Tag By Category, Tag All, Beam Annotations, Multi-Category, Material Tag, Area Tag, Room Tag, Space Tag, View Reference, Tread Number, Keynote, Duct Legend, Pipe Legend, Color Fill Legend, and Symbol.

Annotate Ribbon Tab

Panels: Dimension, Detail, Text, Tag, Color Fill, and Symbol.

Application Menu

File access and management tools are grouped in this menu. This menu is designated by the large ‘R’ in the top left corner of the Revit screen....

Continue reading "Revit Elements and Tools: A Comprehensive Dictionary" »

Understanding Computer Systems: Hardware, Software, and Key Concepts

Computer science3.17 KB

1. Computer System

The set of physical elements (Hardware) and software (Software) that allow information processing.

2. Physical Subsystem

Commonly known as hardware.

3. Logical Subsystem

Referred to as software.

4. Computer

An electronic device capable of processing data, performing load, arithmetic, and logic operations without human intervention.

5. Informatics

The science that studies the automatic and rational treatment of information.

6. Automatic and Rational

  • Automatic: Tasks are performed by machines.
  • Rational: Processes follow human reasoning.

7. Central Processing Unit (CPU)

Responsible for implementing programs and comprises the main memory, control unit, and arithmetic-logic unit.

8. Supercomputer

A specialized machine designed for tasks requiring...

Continue reading "Understanding Computer Systems: Hardware, Software, and Key Concepts" »

Image and Sound Processing, Networks, and Digitalization

Computer science3.34 KB

Image Processing

Imaging Technique

  • Bitmap (Raster): Formed by pixels, each with a color. Programs: GIMP, Photoshop. Formats: GIF, JPEG, BMP, TIFF, PNG, PCX (Paintbrush), RAW, TGA, PSD (Photoshop), XCF (GIMP).
  • Vector: Obtained using lines. Programs: Corel Draw, OpenOffice.org Draw, AutoCAD, QCad. Formats: DXF, CDR, DWG, ODG/SXD, SWF, AI, SFHx.
  • 3D: Three-dimensional figures. Widely used in games. Programs: Virtual Hammer.

Memory Cards

  • SD
  • MMC
  • XD
  • Memory Stick

Image Properties

  • Color Depth: Total number of bits used to encode an image. More depth means more shades.
  • Brightness: Related to light intensity emitted over a given area.
  • Contrast: Brightness difference between the maximum and minimum brightness.

Color Specification Systems

  • RGB (Red, Green, Blue): Used
...
Continue reading "Image and Sound Processing, Networks, and Digitalization" »

Workshop Workload and Production Capacity Management

Computer science3.82 KB

Workshop Planning and Control

Planning

Planning aims to coordinate workload with available resources and equipment to perform the required services in production, or the quantity and quality required, at the lowest cost and meeting the deadline.

Organization

Methods, order, time > budget OR > acceptance > delivery term.

Workload

The workload is the amount of work available for the workshop, consisting of the OR already issued and accepted by clients.

Production Capacity

Production capacity is the amount of work that the workshop can perform based on available operators, equipment, and facilities.

The workload can be defined in a working or time to implement and scale, or are uncertain about working with an open OR work involving a diagnostic...

Continue reading "Workshop Workload and Production Capacity Management" »

Operating System Free Space and File Allocation Methods

Computer science5.36 KB

Free Space Management in OS

Free Space Management is a technique used by the operating system to keep track of unused disk blocks. It helps the file system allocate space to new files and deallocate space when files are deleted.

Objective: To efficiently manage and utilize available disk space.

Need for Free Space Management

  • To identify free disk blocks quickly.
  • To allocate storage space for new files.
  • To reclaim space when files are deleted.
  • To improve disk utilization and system performance.

Methods of Free Space Management

1. Bit Vector (Bitmap) Method

In this method, each disk block is represented by a bit.

  • 0 → Free block
  • 1 → Allocated block

Example

Block Number01234567
Bitmap10110010

Here, blocks 1, 4, 5, and 7 are free.

Advantages

  • Easy to find contiguous
...
Continue reading "Operating System Free Space and File Allocation Methods" »

Evolution of the World Wide Web: From Web 1.0 to Web 3.0

Computer science8.53 KB

Evolution and History of the World Wide Web

1. Introduction and Origins of the Web

The World Wide Web (WWW) is an information system where documents and other web resources are identified by Uniform Resource Locators (URLs), interlinked by hypertext links, and accessible via the Internet.

  • The Genesis: Invented by British scientist Sir Tim Berners-Lee in 1989 while working at CERN (European Organization for Nuclear Research).
  • The Core Motivation: Developed to automate information-sharing among scientists globally, overcoming compatibility barriers between different computers and operating systems.
  • The Core Building Blocks: By 1990, Berners-Lee defined the three fundamental technologies that remain the backbone of the modern web:
  1. HTML (HyperText Markup
...
Continue reading "Evolution of the World Wide Web: From Web 1.0 to Web 3.0" »

Classic Algorithm Solutions: Step-by-Step Examples

Computer science5.78 KB

1) DIJKSTRA (SSSP) — STEP TABLE (PAST-PAPER INSTANCE A)

Given edges: a→b(2), a→c(7), a→e(10), b→d(2), c→d(1), c→g(2), d→f(2), e→g(1), f→g(2). Source = a.
Rule: Pick unsettled vertex with minimum dist; relax outgoing edges.

Vertices:   a   b   c   d   e   f   g

Init:
Dist      = 0   2   7   ∞  10   ∞   ∞
S = ∅

Step 1: Pick a (min=0), S={a}
Relax from a: already set b=2, c=7, e=10
Dist      = 0   2   7   ∞  10   ∞   ∞

Step 2: Pick b (min=2), S={a,b}
Relax b→d: dist(d) = dist(b)+2 = 2+2 = 4
Dist      = 0   2   7   4  10   ∞   ∞

Step 3: Pick d (min=4), S={a,b,d}
Relax d→f: dist(f) = 4+2 = 6
Dist      = 0   2   7   4  10   6   ∞

Step 4: Pick f (min=6), S={a,b,d,f}
Relax f→g: dist(g) = 6+2 = 8
Dist
...
Continue reading "Classic Algorithm Solutions: Step-by-Step Examples" »

File Systems, Kernels, and High-Performance Networking

Computer science25.6 KB

Fast File System (FFS)

Writes

Writes: Writes data to blocks chosen by cylinder groups. Tries to place related blocks near each other and rotationally optimize access. Metadata updates (inodes, directories) are also written in-place within the same group.

Reads

Reads: Very fast because data is grouped by cylinder, minimizing seeks. Sequential reads benefit from rotational optimization and large block sizes (4–8 KB). The first read goes through the inode, then the inode's data block pointers.

Appends

Appends: Allocates the next block near the previous one. Uses rotational delay tables to place the next block just in time for the disk head. Large blocks plus fragments allow efficient small-file appends.

Crash Recovery

Crash Recovery: Uses fsck to walk...

Continue reading "File Systems, Kernels, and High-Performance Networking" »