Using Java
using Code please , sorry
The program simulates the maintenance of one flow(thread) ofprocesses by two central processors of the computer with thegeneral queue. If the next process is generated in an instant, whenany of the processors is free, the process enters processing,otherwise the process becomes in the queue. If one of theprocessors is released, and there are processes in the queue, theprocess is removed from the queue. Determine the maximum queue sizefor two identical processors.
Thanks Sir.
Solution
//————ProcessorsSimulation.java——————–
// —————–start———————
import java.util.LinkedList;
import java.util.Queue;
import java.util.Random;
import java.lang.*;
public class ProcessorsSimulation
{
//there are two queue, one for each processor
private Queue<String> Q1 = new LinkedList<>();//processor 1 queue
private