Lab 5: Configuring GRUB Boot and Kernel Modules

Overview

This lab covers configuring the GRUB boot loader and inserting/removing modules onto a running kernel. It is recommended to perform these steps in a controlled environment like the 401lab to allow for rebooting in case of errors.

Key Concepts

  • rpm (Red Hat Package Manager): Installs, verifies, and queries packages.
  • Hot-plugging: A feature (especially in SuSE Linux) that allows the system to detect newly added hardware like USB or FireWire devices.
  • lsmod: Lists all loaded modules.
  • diff: Compares
Read More

Learn Go in Y Minutes: A Crash Course in Golang Programming

Learn Go in Y Minutes

Introduction

This is a crash course in the Go programming language. It covers the basics of syntax, data types, control flow, and concurrency.

Getting Started

Go is a statically typed, compiled language with a focus on simplicity and efficiency. It’s known for its built-in concurrency features and fast compilation times.

Package Declaration

Every Go source file starts with a package declaration. The main package is special and declares an executable program.

package main

Import Declaration

Import

Read More

Pipeline Performance and Hazard Detection in Computer Architecture

Given a non-pipelined architecture running at 2.5GHz that takes 5 cycles to finish an instruction. You want to make it pipelined with 5 stages. The increase in hardware forces you to run the machine

at 2GHz. The only stalls are caused by:

  • memory – (30% of the total instructions) a stall of 50 cycles happens in 2% of the memory instructions
  • branch – (20% of the total instructions) a stall of 2 cycles happens in 20% of the branch instructions

What is the speedup? Clearly show all work.

Equation

For the following

Read More

Functional Programming Examples: Recursion, Streams, and More

Bisection Method & Polynomial Root Finding

fun bisection (f,a,b) =
let val mid = (a+b) / 2.0 in
if Math.abs (a-b) < 0.00001 then mid
else
if (f mid) * (f a) < 0.0 then bisection (f,a,mid)
else bisection (f,mid,b)
fun mypoly x = x*x*x -7
val root = bisection (mypoly, 6.0, 0.0, 7.0)

Cube and Sum of Cubes

fun cube a = a*a*a
fun sumCubes (a,b) =
if (a>b) then 0 else cube (a) + sumCubes (a+1,b)

Tree Traversal and Filtering

fun gather (p : int -> bool) (T : string tree)

Read More

Understanding Computer Systems: A Deep Dive into Operating Systems, Memory Management, and Assembly Language

1. For the following questions circle True or False The operating system has the power to suspend your program when it is running. TRUE FALSE The only reason the operating system is “special” is because it is the first program Loaded. TRUE FALSE In a time sharing system multiple process take turns running on the CPU. TRUE FALSE Caches would work well for a program that randomly accesses locations in memory.
TRUE FALSE An an Interrupt Drive I/O system the hardware is responsible for doing all

Read More

Introduction to Programming with Python: Fundamentals and Data Structures

Programming Languages

Programs are found in many places such as on your computer, your cell phone, or on the internet. A program is a set of instructions that are run or executed. There are many programming languages and, for this course, we will use the Python programming language.

Arithmetic Operators

Operator

Operation

Expression

English description

Result

+

Addition

11 + 56

11 plus 56

67

Subtraction

23 – 52

23 minus 52


-29

Multiplication

4 * 5

4 multiplied by 5

20

Exponentiation

2 ** 5

2 to the power of 5

32

/

division

9

Read More