Calculating CPU idle time with priority order method - operating-system

I am doing a question about calculating the idle time of the CPU when using the priority order method in task scheduling. According to the paper, the correct answer is b, but I have no idea how the 3 milliseconds is calculated. The total idle time for the CPU below should be 9 milliseconds according to my calculation. Can anyone explain to me what I am missing from the question? Thank you.

Related

How to calculate the probability of a customer having to wait more than 5min in the queue?

I have to calculate the probability of a customer waiting more than 5 min in the queue in anylogic. I've already implemented the timemeasureend and-start block, but I have seriously no clue how to compute the probability of a customer waiting longer than 5min? What do I need to write where? Help is highly appreciated
Thanks!
There are two objects in a process modelling library: TimeMeasureStart and TimeMeasureEnd. You can put those around a queue and record the time for each entity after they exit the queue. Save that time to a Statistics object and from there your probability if waiting more that 5 mins should be (no of samples over 5 mins)/(total number of entities). Also, make sure that your model time unit is set to minute to make it easier.

How does CPU know how much time a process take to complete?

I studying various CPU scheduling algorithm in OS, I was asked this question once I was not able to answer it. Can anyone explain me?
OS can compute the total needed time for each task, by means of first calculating its CPI (cycles per instruction). There is a weighted average CPI for each job. I hope this answers the question. But if you are talking about burst time then there is a default value to those unknown processes.

SJF Scheduling: Selecting Process based on predicted CPU Burst Time

In SJF Algorithm, we predict the next CPU Burst time using the formula:
τ(n+1) = α*t(n) + (1-α)*τ(n). And then we select the process with the shortest predicted burst time.
Now my question is: do we already have an idea about the CPU burst times of the processes arriving?
If yes, then why predict the CPU burst time? We could rather just use the shortest time process for scheduling.
If no i.e., we do not have any idea about the burst times of the processes, how is the predicted burst time τ(n+1) helping us to pick a process?
Hope I am able to explain my confusion.
Thanks.
The answer is in the question itself. The later condition is true we don't have an idea about burst time of incoming processes this is the reason that we are predicting their burst time τ(n+1). Our prediction may not be 100% right all the time but it'll server the purpose of SJF to a very great extent !
I hope you would've coded this and saw the results if not then i recommend to do so, it'll help a lot understanding this.
This is the application I developed, for my teacher, on some scheduling techniques.enter image description here

Higher concurrency vs lower concurrency

In doing a load test (by using Siege for example) for servers, is a lower concurrency number better?
What does this number signify?
The Siege docs go into detail on concurrency here: https://www.joedog.org/2012/02/17/concurrency-single-siege/
From that page:
The calculation is simple: total transactions divided by elapsed time. If we did 100 transactions in 10 seconds, then our concurrency was 10.00.
Higher concurrency measure CAN mean that your server is handling more connections faster but it can also mean that your server is falling behind on calculations and causing connections to be queued. So your concurrency measure is only valuable when taken in context of time elapsed.

Round Robin Scheduling

I have a question here about round-robin and I was wondering if this answer is correct(it is the dr.'s answer).
We are supposed to get the average turnaround time of the processes who all come at same time which came in order as in the picture, it uses round robin with quantum of 5 seconds
Given answer was like that
But I think there are some extra counted time in there so my answer is like that
(26+27+12+16+30) / 5 = 22.2
I was wondering which one is correct, in my answer I tracked each process got its finish time and subtracted from start time which is 0 in this case.
According to the question given, the correct answer is 22.2