Question

In: Computer Science

Given a system with 2T bytes of address space per process, 1T bytes of physical memory,...

Given a system with 2T bytes of address space per process, 1T bytes of physical memory, and pages of size 32M bytes. How many entries are there in a linear page table?

Select one:

a. 64K

b. 32K

c. 32M

d. 1T

Given a system with 8G bytes of address space per process, 2M bytes of physical memory, and pages of size 2K bytes. How bits are needed to specify the virtual page number?

Select one:

a. 22

b. 10

c. 33

d. 21

Given a system with 512M bytes of address space per process, 4T bytes of physical memory, and pages of size 8K bytes. How rows are there in a linear page table?

Select one:

a. 4T

b. 512M

c. 64K

d. 1G

Solutions

Expert Solution

Solution:

(1)

Given,

=>Logical address space size = 2 TB

=>Physcial address space size = 1 TB

=>Page size = 32 MB

The answer will be an option,

(a) 64 K

Explanation:

Logical address:

Page number Page offset

16 bits                                                        25 bits

Calculating number of bits for page offset:

=>Number of bits for page offset = log2(page size in bytes)

=>Number of bits for page offset = log2(32 MB)

=>Number of bits for page offset = log2(32*2^20 B) as 1 MB = 2^20 B

=>Number of bits for page offset = log2(2^25)

=>Number of bits for page offset = 25 bits

Calculating number of bits for page number:

=>Number of bits for page number = log2(logical address space size in bytes) - page offset bits

=>Number of bits for page number = log2(2TB) - 25

=>Number of bits for page number = log2(2*2^40 B) - 25 as 1 TB = 2^40 B

=>Number of bits for page number = 41 - 25

=>Number of bits for page number = 16 bits

Calculating number of entries in linear page table:

=>Number of entries in linear page table = page table size/entry size

=>Number of entries in linear page table = number of pages*frame number bits/frame number bits

=>Number of entries in linear page table = number of pages

=>Number of entries in linear page table = 2^page number bits

=>Number of entries in linear page table = 2^16 entries

=>Number of entries in linear page table = 64 K

=>Hence option (a) is correct and other options are incorrect.

(2)

Given,

=>Logical address space size = 8 GB

=>Physical address space size = 2 MB

=>Page size = 2 KB

The answer will be an option,

(a) 22

Explanation:

Logical address:

Page number Page offset

                22 bits                                                 11 bits

Calculating number of bits for page offset:

=>Number of bits for page offset = log2(page size in bytes)

=>Number of bits for page offset = log2(2 KB)

=>Number of bits for page offset = log2(2*2^10 B) as 1 KB = 2^10 B

=>Number of bits for page offset = log2(2^11)

=>Number of bits for page offset = 11 bits

Calculating number of bits for page number:

=>Number of bits for page number = log2(logical address space size in bytes) - page offset bits

=>Number of bits for page number = log2(8 GB) - 11

=>Number of bits for page number = log2(8*2^30 B) - 11 as 1 GB = 2^30 B

=>Number of bits for page number = 33 - 11

=>Number of bits for page number = 22 bits

=>Hence option (a) is correct and other options are incorrect.

(3)

Given,

=>Logical address space size = 512 MB

=>Physical address space size = 4 TB

=>Page size = 8 KB

The answer will be an option,

(c) 64 K

Explanation:

Logical address:

Page number Page offset

16 bits                                                        13 bits

Calculating number of bits for page offset:

=>Number of bits for page offset = log2(page size in bytes)

=>Number of bits for page offset = log2(8 KB)

=>Number of bits for page offset = log2(8*2^10 B) as 1 KB = 2^10 B

=>Number of bits for page offset = log2(2^13)

=>Number of bits for page offset = 13 bits

Calculating number of bits for page number:

=>Number of bits for page number = log2(logical address space size in bytes) - page offset bits

=>Number of bits for page number = log2(512 MB) - 25

=>Number of bits for page number = log2(512*2^20 B) - 25 as 1 MB = 2^20 B

=>Number of bits for page number = 29 - 13

=>Number of bits for page number = 16 bits

Calculating number of rows in linear page table:

=>Number of rows in linear page table = linear page table size/entry size

=>Number of rows in linear page table = number of pages*frame number bits/frame number bits

=>Number of rows in linear page table = number of pages

=>Number of rows in linear page table = 2^page number bits

=>Number of rows in linear page table = 2^16 rows

=>Number of rows in linear page table = 64 K

=>Hence option (c) is correct and other options are incorrect.

I have explained each and every part with the help of statements attached to it.


Related Solutions

Given a system with 4M bytes of address space per process, 64M bytes of physical memory,...
Given a system with 4M bytes of address space per process, 64M bytes of physical memory, pages of size 1K bytes, and page table entries of 8 bytes. How many entries can fit in one page? Select one: a. 128 b. 1K c. 8 d. 64K Given a system with 16G bytes of address space per process, 8G bytes of physical memory, and pages of size 16K bytes. How many entries are there in a linear page table? Select one:...
Given a system with 512G bytes of address space per process, 2G bytes of physical memory,...
Given a system with 512G bytes of address space per process, 2G bytes of physical memory, and pages of size 2K bytes. How bits are needed to specify the offset? Select one: a. 39 b. 28 c. 11 d. 20 Given a system with 4M bytes of address space per process, 8M bytes of physical memory, pages of size 8K bytes, and page table entries of 4 bytes. How many entries can fit in one page? Select one: a. 8K...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes),...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes), and the disk block size is 2KB. The file control block (FCB) contains an index table of 512 bytes. Answer the following questions: (2) [4 MARKS] Suppose that the index table area adopts the following structure: the first 8 bytes (0 ~ 7 ) use <start block number, number of blocks> to represent the pre-allocated continuous storage space during file creation, in which the...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes),...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes), and the disk block size is 2KB. The file control block (FCB) contains an index table of 512 bytes. Answer the following questions: (1) [4 MARKS] Suppose that the index table only adopts the direct index structure, and stores the disk block numbers occupied by the file. How many bytes are required for each index table entry to represent a disk block number? What...
What's the memory address for the following elements arrays given: Base Address: 1000, Dimensions: 10 rows,...
What's the memory address for the following elements arrays given: Base Address: 1000, Dimensions: 10 rows, 5 columns, 4 byte elements. Elements: 0,0; 9,4; 2,2; 4,1; Base Address: 500, Dimensions: 10 rows, 15 columns, 4 byte elements. Elements: 0,0; 9,14; 2,2; 4,11; Base Address: 800, Dimensions: 4 rows, 5 columns, 2 byte elements. Elements: 0,0; 3,4; 2,2; 3,4;
13. (10 pts) The address space of a process is the set of addresses to which...
13. (10 pts) The address space of a process is the set of addresses to which it has access. (a) In modern systems, the address spaces of most processes are sparse. What does this mean? (b) Referencing an address not in the address space results in a: (c) Referencing a valid address that is not currently in main memory results in a: (d) Referencing a valid address but without proper permissions (e.g., writing to a read-only location) results in a:...
Consider a memory system with a 14 bit long address. Produce the answer to each of...
Consider a memory system with a 14 bit long address. Produce the answer to each of the following parts using hexadecimal numbers. a. There is a 1.5k byte RAM device, starting at address $200. What is its last address? b. There is a 1k byte EPROM device, starting at address $900.What is is last address? c. There is a 7k byte ROM device, its last address is at the highest system address. What is its first address? d. Use your...
In a system employing a paging scheme for memory management; wasted space is due to: External...
In a system employing a paging scheme for memory management; wasted space is due to: External fragmentation Internal fragmentation Pages and frames of different specified sizes None of these are reasons for wasted space in a paging scheme The page table for each process maintains: The frame location for each page of the process The page location for each frame of the process The physical memory location of the process None of these are what the page table maintains The...
7. A random process is given by X(t) = A0e −2t + A1 cos(200πt + Θ),...
7. A random process is given by X(t) = A0e −2t + A1 cos(200πt + Θ), where A0, A1, and Θ are independent random variables. Both Ao and A1 have uniform distributions in the interval (0, 5), while Θ is uniformly distributed in the interval (0, 2π). (a) Determine the mean value of X(t). (b) Determine the variance of X(t). (c) Determine the autocorrelation function RX(t1, t2). (d) Is X(t) wide-sense stationary? Why or why not?
For a given password system, calculate the search space for a general user and a lazy...
For a given password system, calculate the search space for a general user and a lazy user. Suppose only 11 special characters can be input. Program in java.   Input (by the evaluator): 1st line: number of characters 2nd line: numbers allowed [Y/N]? must be included [Y/N]? 3rd line: letters allowed [Y/N]? case sensitive [Y/N]? must be included [Y/N]? 4th line: special character allowed [Y/N]? must be included [Y/N}
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT