topic # Topic Reading Homework Slides
1 administrativa

primitive computers and binary number representation
 - my junior high classmate's hardware-store science project computer
 - Ed Roberts, Altair (1st microcomputer)
 - Leonard Kleinrock,  first IMP (interface message processor)
 - SDS Sigma / Xerox 500 series (Kleinrock's host 1969,
   West LA College computer center 1979)

chapter 1 of the textbook (it's dense, and we'll spend a couple weeks on it)

read - Why "binary" in every computer conversaion?

these links about binary and other number systems

Number bases:
 - Hex tutorial
 - Hex arithmetic (video)

 - Hex advocacy
  -Binary numbers
  -Number systems
 - binary number system (video)
 -
hexadecimal number system (video)
conversion tools:
  Table, or
  Calculator
   - binary
   - hexadecimal


Demo installation of
1) minix OS:
 - part1 (video 17m)
 - part2 (video 12m)
2) fedora (video 30m)

this write-up about "Remote Unix access with ssh"and this one about your remote unix acccount.

 

 

transfer - a text file named "introduction.txt". You have an account on sputnik.smc.edu. I want you to know how to transfer a text file to your home directory there, or its "assignments" subdirectory. Create one that declares your name, e.g. "My name is David Morgan," and says something (short) about you. "I like the good L.A. weather and chocolate ice cream." The file must be a text file, not some other format like .doc or .pdf. The purpose is to make sure you know how to transfer files, since I will you to submit some homework this way. See: Remote Unix system account  

listen - to this podcast about operating systems (transcript here)
Skip the part from the 6:00 minute mark to the 39:00 minute mark. This spans a lot of topics that we'll encounter in coming weeks, in a broad summary touching on
the jobs that operating systems do. 

Job description for an OS:
Internal jobs
 memory management
 process management
 device management
 file management
 offer callable  system service functions
External job
 user interface

You won't understand some of it, and I considered not asking you to listen to it on the grounds that it bites off more than you can chew. But that's what the coming weeks are for. Listen to it now. Then, it would be interesting if you did so again after the course to see if I taught you anything.

watch - this video that summarizes the spectrum of main OS themes in a condensed but accurate way.

listen - to this 9-minute video about hardware underpinnings of information representation.

anticipate, from assignment 1.5, the book's problem 1.1 at the end of Chapter 1, by reviewing the instruction execution example in Figure 1-4 of the textbook and associated discussion (which will be discussed in class).

listen - to this video from the 7:30 timing mark to the end, describing addition with switches for inputting addends, lights for outputting sums, and a 74xx Texas Instruments chip to hold the "wiring" that does the math.

OS Installation  (static slides version)

OS Installation (narrated lecture version 2h2m)

 

2

science-project adding-machine computer
 could change addends but not operation
 re-engineer: more switches to select operations
  leads to "instruction set"

circuits/gates as basis for binary storage
 (reference to disk, CD, coins)

publically callable system services
 (an OS feature)

doing binary addition

show-and-tell, instruction sets

in-class exercise:
 installing an operating system on a (virtual) PC

as above


Programing the ENIAC

The Von Neumann Architecture of Computer Systems (paper by H. Riley)

von Neumann architecture (wiki)

do - binary and hexadecimal addition problems  
Here is a supporting how-to video.

Prepare your answers in this form and submit them by this file transfer method, depositing your answer file in your "assignments" subdirectory on the remote server. Please name your file "sums.txt". I will grade these using an automated script, so the format of the answer is critical to intelligibility, as is the case (lower) of the filename. (Wrongly named or placed, your file will get overlooked by the grading script.)

----------------------------------------
line termination conventions per OS
 - explanatory document
 - exercise

MBR dump

Parition table under the microscope

Tools:
od command usage  - to dump files (and other data) in octal (and other) formats

for reference - 3 low-level dump/edit commands
  xxd's documentation
  od's documentation
  bvi's documentation

2 more, for Windows:
 HxD
 XVI32

von Neumann architecture  (static slides version)

von Neumann architecture (narrated lecture version 32m)

 

Ch 1 Computer Overview  (static slides version)

Ch1-part1-instruction-execution
 Computer Overview (narrated lecture version, part 1; 55m)

3

chapter 1 discussion
 -PC and CPU components/architecture
 -instruction execution (figure 1.4)

in-class exercise:
   use of debugger on "hello world" sample program, as model
    (video 8m)
   explanation of 3+2=5 exercise (video 10m)
   3+2=5 exercise in debugger (implementing textbook figure 1.4)

demo, executing data as code
 exploit advisory and my demonstration

 

 

show-and-tell tour of IBM PC

demo - speculative, out-of-order execution for efficiency a.k.a. branch prediction
 - demo program source
 - demo program run (video 20m)

read - about instruction sets

   -Intel chip architecture

  -Intel instruction set reference
     instructions A-M
      instructions N-Z

  -a CPU instruction
 

  -Other chips/makers/instruction sets

  -CPU registers

view video on word sizes (8m)

view videos on instruction set manuals:
 general (8m)      intel specifically (36m)

read - selections from the "IA-32 Intel Architecture Software Developer's Manual, Volume 1: Basic Architecture."
 pp3-13 to 3-15 about registers in the Pentium
 pp3-20 to 3-22 about the EFLAGS status register (ie, Intel's PSW program status word)
 p 3-24 about the EIP instruction pointer register
 p 3-26 about operands
 p 3-33 secion 3.7.7 "I/O Port Addressing." This relates to the assignment wherein you are asked to consider directing code to an I/O device (e.g., disk), as opposed to memory, for data source and destination.
 pp 5-2 to 5-9 about general-purpose instructions, described and listed

note availability of the current Intel manuals (2021)

read - the overview of interrupts at the very beginning of this article

read - this short page about interrupts. 

of interest on linux systems: dstat program and /proc/interrupts pseudofile. Try:
 cat /proc/interrupts > one
 sleep 1
 cat /proc/interrupts > two
 vimdiff one two

 Linked list of states

do - some assembly language.
study, assemble, and run the given "hello world"  assembly language program. (Your doing so will leave evidence on the remote computer as basis for grading.) This program uses one of the operating system's system calls (4 write) to do the real work. 
View this description of the program (video 15m)
and explanation of the assignment regarding it (8m)

do - make a variation on figure 1.4

Datastructures

 lists,queues,stacks  (static slides version)

 lists,queues,stacks  (narrated slides version 34m)

 

 binary trees

4

 

chapter 1 further discussion
 -interrupts
read - begin chapter 2, "Operating System Overview." Specifically, the section entitled "The Operating System as Resource Manager" through the one entitled "OS Design Considerations for Multiprocessor and Multicore." You can skip the section on fault tolerance. Optionally read the sections at the end specific to Windows, linux, and android and how they implement the chapter's concepts.

read - this information about system calls

listen - to a discussion of hardware interrupts (transcript here- pg 14-19) by Steve Gibson from his online podcast series "Security Now." (28 min. duration)
"y-cruncher" is an example of a pure-cpu-bound process that computes digits of pi
 - y-cruncher home page
 - y-cruncher demo (video 28m)

Specialized processing chips - GPUs, DSPs, SoCs

More CPUs than 1
 cluster
 multiprocessor
 multicore

Ch1-part2-interrupts
 Computer Overview (narrated lecture version, part 2; 1h 36m)
5

 

chapter 1 further discussion
 -memory hierarchy
 -cache memory

in-class exercise:
 waste time (video explanation 9m)

read/continue reading ch 2 listen - Memory Hierarchy
lecture from course
Intro. to Computer Architecture (2013)
by Onur Mutlu
Carnegie Mellon U.
listen from 4:30-8:15, 10:45-14:20, and 30:20 to 44:10

caching concept commentary
(Prof. Kubiatowicz, Berkeley)

demonstrations:
  demo1 - turning linux caching on and off (3m)
  demo2 - ordering of array element access (16m)
 

do - an assignment about caching using the memory heirarchy, on paper

Ch 1-part3-caching Computer Overview (narrated lecture version, part 3; 1hr 3m)
6

 

chapter 2 discussion
 historical evolution of operating systems
read/continue reading ch 2

view - old school photos

- Ch 2 Software Overview

Ch 2-part1-history Software Overview (narrated lecture version, part 1; 1hr 14m)

Ch 2-part2-OSoverview Software Overview (narrated lecture version, part 2; 1hr 33m)

 

 

7

 

chapter 2 discussion -outcomes of efficient utilization
 process management challenge
 memory management challenge

deadlock

processes
 demo - creating processes; insert pre-loop fork() calls in busy-timewaster.c

in-class exercise:
 deadlock (video explanation 29m)

read - textbook chapters we will cover on the topic of processes. Those are chapters 3 and 9 (process scheduling). 

Important concepts about processes:
 - what they are
 - states they can have
 - instruction trace: processes' vs cpu's
   perspectives
 - how they get queued and scheduled
   (i.e., chosen/switched)

Chapter 3 - read through p 139 7th edition,138 8th edition

Chapter 9 - read through p412 in 7th edition, 414 in 8th (to enable "process scheduling exercise")

- -
8

 

processes


demo - interprocess communication and mutual exclusion

read - commentary by scheduler author Ingo Molnar

read - Completely Fair Scheduler articles from ibm developerworks:
article 1     article 2

read - concurrency related topics
textbook chapter 5
 sections 5.1, 5.3 thru pg 220
textbook chapter 6
 short sections on unix/linux concurrency mechanisms, sections 6.7 and 6.8
textbook chapter 10
 section 10.1
textbook Appendix A, Peterson's Algorithm, pp A-7 - A-8

view - process scheduler video animation

doorder is unpredictable
a program to demonstrate the unpredictable autonomy of the process scheduler
 (explanatory lecture video 9m)

do - process scheduling exercise
 (explanatory lecture video 35m)

do - process states exercise
 (explanatory lecture video 14m)

Textbook's:

Ch 3 processes  (static slides version)

Ch3 (narrated slides version 45m)

 

Ch 9 process scheduling  (static slides version)

Ch 9 process scheduling  (narrated slides version 22m)

 

Prof's:

Processes  (static slides version)

Processes (narrated slides version 44m)

 

Homemade shell

IPC and mutual exclusion
(static slides version)

IPC and mutual exclusion
(narrated slides part1 1hr 18m and part2 32m)

 

9 linux process scheduling in detail - demonstration programs - as shown in class, with a readme file explaining how to use them, in file "process_priority.zip" Examine and play with these on your own if you wish.

 

linux process scheduling  (static slides version)

linux process scheduling  (narrated slides version 40m)

 

10 threads


in-class exercises:

process scheduling and prioritization
  instructions
   video demonstration 40m

top utility (process display) exercise
  instructions
  video demonstration 51m

operation of threads
 video demonstration 28m

read - textbook chapter 4, section 4.1 only, on the subject of threads

Threads

- Ch 4 threads
11 test

memory management

read - textbook chapter 7, on the subject of general memory management. Include the appendix, about loading and linking. do - address translation. Name the file you submit "pageaddr.txt" please. Here is an explanatory video (25m)

do - buddy system, textbook problem 7.7a. Produce, freehand or electronically, a figure like the book's Figure 7.6 that depicts the evolving state of memory allocation following each of the problems 8 steps. Submit an image file that shows your figure under the name "buddy.jpg" or "buddy.png"  please. Here is an explanatory video (16m). (The requirement is as written above, not the differing one given verbally in the video.)


----------------------------------------

address calculation under memory segmentation

Ch 7 Mem Mgmt
(static slides version)

Ch 7 Mem Mgmt
(narrated slides version 1h 30m)

12 virtual memory

in-class exercise(s):
 Virtual memory (swap)

read - textbook chapter 8, on the subject of virtual memory management. (Skip coverage of segmentation.) More specifically, read pp 341-347, 349-355, 358-371

listen - to a simplified explanation of the operation of translation lookaside buffers

explore dirty pages and page writeout 
try sysctl -a | grep dirty
in light of this documentation

scan or read lightly - this article about memory exhaustion in linux. It uses a sample memory-exhauster very similar to our memory3.c, and describes in more detail how the kernel is handling the situation. [link died]

do - page replacement.  Name the file you submit "pagerepl.jpg" (or .png) please. Here is an explanatory video (25m)

 


----------------------------------------

Linux memory management
illustrating effect of using virtual memory
Here is an explanatory video about how virtual memory staves off memory exhaustion


Ch 8 Virtual Mem

Ch 8 Virtual Mem
(narrated slides version 1h 24m)

13 filesystems

in-class exercise(s):
 device vs file
     
explanatory video (1hr 11m)

read - textbook chapter 12 section titled "Secondary Storage Management" (12.7 in recent editions)

compare - in your "ext2 filesystem" assignment we dissect the internal structure of the ext2 filesystem. For comparison, the same kind of thing is done at this tutorial on the FAT filesystem. FAT (file allocation table system) prevailed on PCs of the 1980s and 90s. Skim the tutorial and take note of its graphics. 

ext2 filesystem analysis

visit an ext2 analysis page; and another

 

 
do - ext2 filesystem. Read the write-ups at the links it contains. Annotate a page, specifically a copy of the Excel spreadsheet indicated in the assignment write-up (not acceptable in any other form). Submit an image of your annotated page. Name the image file you submit "filesystem.jpg" or "filesystem.png".
Here is supporting video detailing the ext2 filesystem and explaining the assignment
  part1 (37m)     part2 (1m)     part3 (45m)

 

Ch 12 File Mgmt

Ch12 File Mgmt
(narrated slides part1 30m and part2 7m)

Linux landscape
(filesystem slides)

14 concurrency topics textbook, Appendix A on Peterson's Algorithm implement Peterson's Algorithm in C

video explanation
 - part 1     part 2

-