blems I'm st
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
I've been having a hard time with these questions will you be able to help me
I have been told that this is the answer to the problems I'm stuck on but I don't know what they mean
3e) O(32*256)
3d) O(256*32)
![3. Virtual memory
Study the two functions given below. Both use the same array declared as: static int data[256*256*8];
void function1()
{
int i;
int j;
for (i = 0; i< 32; i++)
for (j = 0; j< 256; j++)
data] = i;
}
void function2)
{
int i;
int j;
for (i = 0; i< 32; i++)
for (j = 0; j< 256; j++)
dataj*2048] = i;
}
Assume the following behaviors in a virtual memory system. Reading or writing physical memory requires
50 nanoseconds. Reading or writing disk writing 10 milliseconds. Page size is 8 kilobytes. Presume that
the program has 1 megabyte of physical memory available. You may consider everything except the array
access itself to take no time. You should also assume that the first 1 megabyte of the array is in physical
memory initially. You may ignore any memory used by the program or stack to execute these functions.
Using this information, answer the following questions. In each case, show the work you use to calculate
the answer. Give your answer in a reasonable unit.
3d) Just considering virtual memory access time, how long will it take for function1() to execute?
3e) Just considering virtual memory access time, how long will it take for function2() to execute?
Remember to account for both read and write activity.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4c21a762-17f7-42c8-a7f2-d22f3df67d8f%2F21fa4542-77da-4e4d-9580-bff83898b16a%2F2letfgeb_processed.jpeg&w=3840&q=75)
Transcribed Image Text:3. Virtual memory
Study the two functions given below. Both use the same array declared as: static int data[256*256*8];
void function1()
{
int i;
int j;
for (i = 0; i< 32; i++)
for (j = 0; j< 256; j++)
data] = i;
}
void function2)
{
int i;
int j;
for (i = 0; i< 32; i++)
for (j = 0; j< 256; j++)
dataj*2048] = i;
}
Assume the following behaviors in a virtual memory system. Reading or writing physical memory requires
50 nanoseconds. Reading or writing disk writing 10 milliseconds. Page size is 8 kilobytes. Presume that
the program has 1 megabyte of physical memory available. You may consider everything except the array
access itself to take no time. You should also assume that the first 1 megabyte of the array is in physical
memory initially. You may ignore any memory used by the program or stack to execute these functions.
Using this information, answer the following questions. In each case, show the work you use to calculate
the answer. Give your answer in a reasonable unit.
3d) Just considering virtual memory access time, how long will it take for function1() to execute?
3e) Just considering virtual memory access time, how long will it take for function2() to execute?
Remember to account for both read and write activity.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education