Consider a demand paging system with three frames, and the following page reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2 . The contents of the frames are as follows initially and after each reference (from left to right):
The *-marked references cause page replacements.
Which one or more of the following could be the page replacement policy/policies in use?
$P=\left\{P_1, P_2, P_3, P_4\right\}$ consists of all active processes in an operating system.
$R=\left\{R_1, R_2, R_3, R_4\right\}$ consists of single instances of distinct types of resources in the system.
The resource allocation graph has the following assignment and claim edges.
Assignment edges: $R_1 \rightarrow P_1, R_2 \rightarrow P_2, R_3 \rightarrow P_3, R_4 \rightarrow P_4$ (the assignment edge $R_1 \rightarrow P_1$ means resource $R_1$ is assigned to process $P_1$, and so on for others) Claim edges: $P_1 \rightarrow R_2, P_2 \rightarrow R_3, P_3 \rightarrow R_1, P_2 \rightarrow R_4, P_4 \rightarrow R_2$ (the claim edge $P_1 \rightarrow R_2$ means process $P_1$ is waiting for resource $R_2$, and so on for others) Which of the following statement(s) is/are CORRECT?
A computer system supports a logical address space of 232 bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a b-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size. The value of $b$ is _________ . (Answer in integer)
Consider the following C program :
#include <stdio.h>
void stringcopy(char *, char *);
int main( ) {
char a[30] = "@#Hello world!";
stringcopy(a,a+2);
printf("%s\n", a);
return 0;
}
void sringcopy(char *s, char *t) {
while(*t)
*st++ = *t++;
}
Which ONE of the following will be the output of the program?