This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Process { | |
private ArrayList myArrayList2; | |
private int[] myArray; | |
private int size; | |
private String x; | |
public Process (String x, int size){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |