Homework #1 (100 Points)
Due 03:00pm on Tuesday 01/31/2012 through http:/blackboard.bu.edu (and
gsubmit of code).
Feel free to make assumptions, if you feel that such assumptions are justified or nece
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 17
A Bird's Eye View of System Abstractions
In this chapter, we will present a bird-eyes view of computer organization in order to und
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 12
Concurrency and Synchronization: Deadlocks and Starvation
As we have observed when discussing the dining philosophers problem, dead
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 9
The Concept of Transactions
The notion of a "transaction" is a recurring one when building computing systems in general, and databas
Computer Science
Computer Speedup
Computer Science
CS-350
Distributed Computing
Azer Bestavros
Computer Science Department Boston University
Moores Law: The density of transistors on a chip doubles ev
Computer Science
Distributed Systems
Computer Science
CS-350
Distributed Synchronization
Azer Bestavros
Computer Science Department Boston University
Examples:
Client-Server Systems
Distributed File
Computer Science
Clock Synchronization: Example Impossible to guarantee that crystals in different computers all run at exactly the same frequency clock skew clock drifts problems!
Computer Science
CS
import java.util.concurrent.Semaphore;
import java.util.*;
public class Elevator extends Thread cfw_
public static int curFloor = 0; / Keep track of currentfloor of elevator
boolean direction = true;
import java.util.concurrent.*;
import java.util.Random;
public class N_Car extends Threadcfw_
public
public
public
public
public
public
static Semaphore Nmutex = new Semaphore(1,false);
static Semapho
import java.util.concurrent.*;
import java.util.Random;
public class S_Car extends Threadcfw_
public static int southcount = 0;
public static Semaphore South = new Semaphore(1,false);
public int loop;
import java.util.*;
public class Customer extends Thread cfw_
int curFloor;
int id;
public boolean inElev;
public static Random rand = new Random();
public Customer(int i, int f)cfw_
curFloor = f;
id
public class Janitor extends Threadcfw_
public void run()cfw_
trycfw_Elevator.Elv_Jan.acquire();
catch(InterruptedException e)cfw_
System.out.println("Janitor Activated");
Requests a = new Requests(20
public class Requests cfw_
int id;
int floor;
boolean type;
/True for pickup, false for drop off
public Requests(int i, int f, boolean t)cfw_
id = i;
floor = f;
type = t;
CS-350: Fundamentals of Computing Systems
Lecture Notes
Page 1 of 10
Sampling and Confidence Intervals
Sampling
Assuming that we know the distribution of a random variable, how do we determine its
par
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 9
Concurrency and Synchronization: Basic Primitives and Constructs
So far, we have established that hardware approaches relying on dis
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 5
Concurrency and Synchronization: N-Process Mutual Exclusion
Recall that we solved the 2-process mutual exclusion problem using Dekke
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 13
Concurrency and Synchronization: Two-Process Mutual Exclusion
So far our consideration of resource management has made a fundamenta
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 13
Processes as Resource Consumers
Sources of Concurrency in a Computing System
As we alluded to before, the management of concurrency
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 14
Performance Metrics of Computing Systems
Introduction
Performance metrics of computing systems are needed in order to evaluate the
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 7
Performance Evaluation of Computing Systems
Introduction
The various performance metrics we have examined so far enable us to speak
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 15
A Basic Introduction to Probability
The study of probability is all about the study of chancethe quantification of the chance or th
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 13
Probability Distributions as Modeling Tools
Recall that a probability distribution provides a characterization of a random variable
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 9
Elementary Queuing Analysis
Notation In discussing various server queues, it will be necessary to talk about various random variable
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 4
Variations of the M/M/1 Queuing System
In the analysis of the M/M/1 system, we have been concerned with exponential service times. R
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 10
Discrete Event Simulation
As it should be obvious by now, models that are amenable to analysis, such as queuing models, ignore (or
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 11
Elementary Queuing Analysis
Multiple Server Queuing Systems Multi-server Queues
Assume that there are N servers in a system. We con
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 4
General Processor Sharing
From non-preemptive FCFS to preemptive round-robin scheduling
The queuing systems (and networks) we have s
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 12
Resource Management Basics
When we discussed the simple M/M/1 system earlier in this class, we assumed that upon completion of serv
CS-350: Fundamentals of Computing Systems Lecture Notes
Page 1 of 10
Resource Management Basics (continued)
So far we have only examined one non-preemptive scheduler-namely FCFS-and we have noted that