CS 162, Spring 2007

Section notes for 23 January 2007

Sections 102/103

GSI: Thomas Kho <cs162-ta@inst.eecs.berkeley.edu> / <tkho@eecs>


Based on notes by Hakim Weatherspoon and Karl Chen


Agenda

  1. HW1
  2. Multithreading
  3. Nachos Walkthrough

Administrivia


HW1


Event-driven simulation
• Event list
• Events: start job, stop job
• Each event on event list contains event time
• Advance clock to next event -- don't "tick"

Code should look like:
(get next event)
(reset clock to event time)
(update system statistics)
(update system state)
(generate any new events and put them on event list)
(continue loop).
SCHEDULING SIMULATION!
• FCFS, RR (Q=2), SJF, SRPT (Q=2), SET (Q=2)

• Job, Arrival time, service time:
A 1 1
B 4 3
C 6 5
D 15 10
E 19 6
F 19 4
G 20 1

• Calculate: flow time, service time - mean, std dev

Program vs Process
<=> Play vs Script