1
GATE CSE 2024 Set 2
Numerical
+2
-0.66

Consider a disk with the following specifications: rotation speed of 6000 RPM, average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors. A file has content stored in 3000 sectors located randomly on the disk. Assuming average rotational latency, the total time (in seconds, rounded off to 2 decimal places) to read the entire file from the disk is _________

Your input ____
2
GATE CSE 2024 Set 2
Numerical
+2
-0.66

Consider a 32-bit system with 4 KB page size and page table entries of size 4 bytes each. Assume 1 KB = $2^{10}$ bytes. The OS uses a 2-level page table for memory management, with the page table containing an outer page directory and an inner page table. The OS allocates a page for the outer page directory upon process creation. The OS uses demand paging when allocating memory for the inner page table, i.e., a page of the inner page table is allocated only if it contains at least one valid page table entry.

An active process in this system accesses 2000 unique pages during its execution, and none of the pages are swapped out to disk. After it completes the page accesses, let $X$ denote the minimum and $Y$ denote the maximum number of pages across the two levels of the page table of the process.

The value of $X+Y$ is __________.

Your input ____
3
GATE CSE 2024 Set 2
MCQ (Single Correct Answer)
+1
-0.33

Consider the following C program. Assume parameters to a function are evaluated from right to left.


#include <studio.h>

int g(int p) { printf("%d", p); return p; }

int h(int q) { printf("%d", q); return q; }

void f(int x, int y) {

   g(x);

   h(y);

}

int main() {

   f(g(10),h(20));

}

Which one of the following options is the CORRECT output of the above C program?

A

20101020

B

10202010

C

20102010

D

10201020

4
GATE CSE 2024 Set 2
MCQ (More than One Correct Answer)
+1
-0.33

Consider the following C function definition.

 int fX(char *a) {

   char *b = a; 

   while(*b) 
        b++; 

   return b - a; }  

Which of the following statements is/are TRUE?

A

The function call fX("abcd") will always return a value

B

Assuming a character array c is declared as char c[] = "abcd" in main(), the function call fX(c) will always return a value

C

The code of the function will not compile

D

Assuming a character pointer c is declared as char *c = "abcd" in main(), the function call fX(c) will always return a value

EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12