Suppose that in a single processor system, an average of 6 process arrive each minute. Each process needs an average service time of 8 seconds. How would you calculate the fraction of time the CPU is kept busy ?What I have done is -:Since a 6 new processes arrive each minute and 8 seconds is required to complete one then in total 6x8=48 seconds would be required. So the CPU would be kept busy for 48 seconds out of 60 seconds.Am I right ?
How do you calculate the CPU usage?
scheduling;high level
In the usual terminology, processes don't arrive. Processes roughly corresponds to the programs running on a machine. What can arrive (and cause some processing to be done) are requests and/or events. I will assume you meant those when using process in the question.Assuming that the processing of a request is CPU-bound (meaning that a single request keeps the CPU fully occupied for 8 seconds, with no spare time to do anything else), then your calculation of6 requests/minute * 8 seconds processing time = 48/60 = 80% loadis a reasonable estimate for the average processor load.If the processing of a single request isn't CPU-bound, then the 8 second response time is not a correct figure for calculating CPU load, because you need to subtract the time that the process is waiting for external systems, like the disk drive or database.