For the following questions answer them individually
A particular paralle! program computation requires 100 seconds when executed on single CPU. If 20% of this computation is strictly sequential, then theoretically the best possible elapsed times for this program running on 2 CPUs and 4 CPUs respectively are
Consider the following C code.
#include <stdio.h>
#include <math.h>
void main()
{
double pi = 3.1415926535;
int a = 1;
int i;
for(i = 0; i <3; i++)
if(a = cos(pi * i/2) )
printf("%d ",1);
else printf("%d ", 0);
}
What would the program print?
Whatis the output of the following Java program?
Class Test
{
public static void main (String [] args)
{
int x = 0;
int y = 0;
for (int z = 0; z <5; z++)
{
if((++x > 2) || (Hy > 2))
{
x+H+;
}
}
System.out.printIn( x +" + y);
}
}
Consider the list of page references in the time line as below:
9 6 2 3 4 4 4 4 3 4 4 2 5 8 6 8 5 5 3 2 3 3 9 6 2 7
What is the working set at the penultimate page reference if $$\triangle$$ is 5?
Whatis the cyclomatic complexity of a module which has seventeen edges and thirteen nodes?
If a program calls two subprograms P11 and P2 and P1 can fail 50% of the time and P2 can fail 40% of the time, what is the failure rate of program P.
Whichof the following strategy is employed for overcoming the priority inversion problem?