Question 57

CSNAT2 marksNeeds review
Consider the following two-dimensional array D in the C programming language, which is stored in row-major order:
int D[128][128];
Demand paging is used for allocating memory and each physical page frame holds 512 elements of the array D. The Least Recently Used (LRU) page-replacement policy is used by the operating system. A total of 30 physical page frames are allocated to a process which executes the following code snippet:
for (int i = 0; i < 128; i++) for (int j = 0; j < 128; j++) D[j][i] *= 10;
The number of page faults generated during the execution of this code snippet is ________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

EXPLORE & PRACTISE

Paper and topic context

See where this question comes from and choose what to practise next.

2023CS

GATE CSE 2023 · Paper 1

Computer Science and Information Technology · Original paper archive

Section
Computer Science and Information Technology
Question type
Numerical answer (NAT)
Marks
2 marks

Practise related topics

Explore more previous year questions using this question’s imported topic tags.

computer science

GATE CSE previous year questions

information technology

GATE CSE previous year questions

computing

GATE CSE previous year questions

computer organization and architecture

GATE CSE previous year questions

Comments

Ask a question, share your approach, or help someone understand.

Log in to view the discussion

You’re not logged in. Log in or create an account to see discussions and add comments.