Questions: 338

Answers by our Experts: 279

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Consider a physical memory of size 2128 KB which is managed by buddies’ scheme. Suppose a set of four programs namely P, Q, R and S demand memory requirement of size 1030KB, 520KB, 70 KB and 130 KB respectively. What would be the size of the memory blocks allocated to these four programs? Is it fair allocation? Justify.
3. Consider the following disk access request queue: -- 95, 180, 34, 119, 11, 123, 62, 64
with the Read-write head initially at the track 50 and the tail track being at 199.
Show the sequence in which the requests will be fulfilled for
(a) First Come First Server b) Shortest Seek Time First
2. How many page faults will occur for the below reference string by applying
i) FIFO
ii) LRU and
iii) Optimal page replacement algorithms,
by considering three frames.
1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2.
Check for Belady’s anomaly.
Consider a physical memory of size 2128 KB which is managed by buddies’ scheme. Suppose a set of four programs namely P, Q, R and S demand memory requirement of size 1030KB, 520KB, 70 KB and 130 KB respectively. What would be the size of the memory blocks allocated to these four programs? Is it fair allocation?
Make an assembly program that solves for the value of J.
J = (A+B)*C-D/E
where:
A=B1h
B=3Ch
C=20h
D=FE0h
E=C1h
Write a MIPS assembly program for the following C program.
int fun (int x, int y);
int recur (int n);
int main(){
printf("input a: ");
scanf("%d", &a);
printf(“input b:”);
scanf("%d", &b);
printf("input c: ");
scanf("%d", &c);
int sum = 0;
sum = a * b + fun( a+1, b-1 ) ;
printf(“ans: %d\n”, sum);
sum += recur(c);
printf(“ans: %d”, sum);
}
int fun ( int x, int y ){
return ( x < y ) ? ( x*y + fun ( x+1, y-1 ) ) : 0 ;
}
int recur (int n){
if(n <= 0)
return 0;
else if (n == 1)
return 1;
else
return recur (n-1) + n;
}
⦁ (Branch Loop, System call)
Please convert C code to assembly code. Write a new assembly file for this part. Must have: one input (positive int)
#++++++++ C code ++++++++++++++++++++++++++
# if ($t0<=0)
# printf("$t0 is %d\n out of boundary, enter a number > 0", $t0);
# else if ($t0 > 15)
# printf("$t0 is %d\n out of boundary, enter a number < 16", $t0);
# else {
# int $t1 = 0;
# for (i=0; i<$t0; i++)
# $t1 += i*i;
# printf("%d\n , $t1);
# }
#++++++++++++++++++++++++++++++++++++++++++

The “Run I/O” may show like this: (input : 13)
please enter a positive int:13
819

The “Run I/O” may show like this: (input : 0)
please enter a positive int:0
$to is out of boundary enter a number>0

The “Run I/O” may show like this: (input : 16)
Write a mips assembly function that takes a register as input and return the number of ones in the registers hint ( use addi and shif)
Write a program that reads two integer numbers A and B. The program must to indicate if one of these numbers is multiple of the other one.
1) Write a program, using the MIPS 32 assembly language, to calculate the sum of the first 100 numbers. The result must be stored in register $v0.
2) Modify the program in 1 in order to print the result.
LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS