220k views
2 votes
Can we determine whether a process is likely to be CPU-bound orI/O-bound by analysing the source code? How can this be determinedat run time?

1 Answer

2 votes

Answer:

Yes, we can determine if a process is CPU bound or I/O bound by the analysis of source code

Step-by-step explanation:

In order to know whether the process is CPU bound or I/O bound by looking at different profiles, execution time for each instruction, run time and number of commands/ instructions used.

This can be achieved by performing run-time analysis of the code using different profiles with the help of compiler or by keeping a track hardware usage

For CPU bound process we look into the involvement of loops, calculations and non I/O data access

For I/O data access we look for read write files, I/O data access and databases.

User Mitchell Model
by
8.4k points