Skip to content

Instantly share code, notes, and snippets.

View thelittlemango's full-sized avatar

Bell Lopez thelittlemango

View GitHub Profile
@thelittlemango
thelittlemango / DeadlockSim.java
Created December 11, 2011 23:42
DeadlockSim [Final Product]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
//-----------------------------------------------------------------
// Program by: Sam Fader and Annabella Lopez
//
// This program was created to simulate deadlock prevention using the
// Banker's Algorithm. Processes must declare the maximum number of
// instances of each resource type and may not exceed the total number
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
//-----------------------------------------------------------------
// Program by: Sam Fader and Annabella Lopez
//
// This program was created to simulate deadlock prevention using the
// Banker's Algorithm. Processes must declare the maximum number of
// instances of each resource type and may not exceed the total number
@thelittlemango
thelittlemango / DeadlockSim
Created December 10, 2011 03:08
DeadlockSim
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
//-----------------------------------------------------------------
// Program by: Sam Fader and Annabella Lopez
//
// This program was created to simulate deadlock prevention using the
// Banker's Algorithm. Processes must declare the maximum number of
// instances of each resource type and may not exceed the total number
@thelittlemango
thelittlemango / Deadlock.java
Created December 8, 2011 16:59
Deadlock Hopelessness
import java.util.*;
//------------------------------------------------------------------
// Program by: Sam Fader and Bell Lopez
// The purpose of this program is to determine if processes are
// deadlocked or not.
// We pledge that this work is ours.
//-------------------------------------------------------------------
public class Deadlock {
@thelittlemango
thelittlemango / Deadlock.java
Created December 8, 2011 01:26
Deadlock Simulation
import java.util.*;
//------------------------------------------------------------------
// Program by: Sam Fader and Bell Lopez
// The purpose of this program is to determine if processes are
// deadlocked or not.
// We pledge that this work is ours.
//-------------------------------------------------------------------
public class Deadlock {
@thelittlemango
thelittlemango / process.java
Created December 8, 2011 01:25
Process Class
import java.util.*;
public class Process {
private ArrayList myArrayList2;
private int[] myArray;
private int size;
private String x;
public Process (String x, int size){
@thelittlemango
thelittlemango / Deadlock.java
Created December 8, 2011 01:24
Deadlock Simulation
import java.util.*;
//------------------------------------------------------------------
// Program by: Sam Fader and Bell Lopez
// The purpose of this program is to determine if processes are
// deadlocked or not.
// We pledge that this work is ours.
//-------------------------------------------------------------------
public class Deadlock {