Answers for "public void runNewSimulation(long totalSimulationTimeMs, int numThreads, int numTasks, long minBurstTimeMs, long maxBurstTimeMs, long sleepTimeMs) {"

C#
0

public void runNewSimulation(long totalSimulationTimeMs, int numThreads, int numTasks, long minBurstTimeMs, long maxBurstTimeMs, long sleepTimeMs) {

public static void main(String args[]) {
		// TODO: replace the seed value below with your birth date, e.g., "20001001"
		final long rngSeed = 00000000;  
        MultithreadedService service = new MultithreadedService();
        
        final int numSimulations = 3;
        final long totalSimulationTimeMs = 15*1000L; // 15 seconds
        
        final int numThreads = 4;
        final int numTasks = 30;
        final long minBurstTimeMs = 1*1000L; // 1 second  
        final long maxBurstTimeMs = 10*1000L; // 10 seconds
        final long sleepTimeMs = 100L; // 100 ms

        for (int i = 0; i < numSimulations; i++) {
            System.out.println("Running simulation #" + i);

            service.runNewSimulation(totalSimulationTimeMs,
                numThreads, numTasks,
                minBurstTimeMs, maxBurstTimeMs, sleepTimeMs);

            System.out.println("Simulation results:"
					+ "\n" + "----------------------");	
            service.printResults();

            System.out.println("\n");
        }

        System.out.println("----------------------");
        System.out.println("Exiting...");
Posted by: Guest on January-17-2021

Code answers related to "public void runNewSimulation(long totalSimulationTimeMs, int numThreads, int numTasks, long minBurstTimeMs, long maxBurstTimeMs, long sleepTimeMs) {"

C# Answers by Framework

Browse Popular Code Answers by Language