You are on page 1of 7

True or False: calloc() allocates memory and also zeroes it before returning.

Select one:
True
False
Feedback
The correct answer is 'True'.

Question 2
Correct
Mark 1.00 out of 1.00

Flag question
Question text
Segment Base Size
Code 32k 2k
Heap 34k 2k
Stack 28k 2k
True or False: The stack has been relocated to physical address 28KB in the diagram, but
with one important difference: it grows forward in physical memory.

Select one:
True
False
Feedback
The correct answer is 'False'.

Question 3
Incorrect
Mark 0.00 out of 1.00

Flag question
Question text
Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what
is the page offset?
Select one:

a.
0xAE

b.
0xF9

c.
0xA

d.
0xF900
Feedback
Your answer is incorrect.
The correct answer is: 0xF9

Question 4
Correct
Mark 1.00 out of 1.00

Flag question
Question text
Which is not a common error?

Select one:

a.
Freeing memory before you are done with it

b.
Forgetting to initialize allocated memory

c.
Forgetting to allocate memory
d.
All are common errors
Feedback
Your answer is correct.
The correct answer is: All are common errors

Question 5
Correct
Mark 1.00 out of 1.00

Flag question
Question text
Assume the value of the base and limit registers are 1200 and 350 respectively. Which
of the following addresses is legal?

Select one:

a.
355

b.
1200

c.
1551

d.
all of the above
Feedback
Your answer is correct.
The correct answer is: 1200

Question 6
Correct
Mark 1.00 out of 1.00
Flag question
Question text
A(n) ______ matches the process with each entry in the TLB.

Select one:

a.
address-space identifier

b.
process id

c.
stack

d.
page number
Feedback
Your answer is correct.
The correct answer is: address-space identifier

Question 7
Correct
Mark 1.00 out of 1.00

Flag question
Question text
True or False: A base register is used to transform physical addresses (generated by the
program) into virtual addresses.

Select one:
True
False
Feedback
The correct answer is 'False'.

Question 8
Correct
Mark 1.00 out of 1.00

Flag question
Question text
With segmentation, a logical address consists of _____.

Select one:

a.
segment number and offset

b.
segment name and offset

c.
segment number and page number

d.
segment table and segment number
Feedback
Your answer is correct.
The correct answer is: segment number and offset

Question 9
Correct
Mark 1.00 out of 1.00

Flag question
Question text
To save memory, sometimes it is useful to share certain memory segments between
address spaces. This is called:

Select one:

a.
Code swapping

b.
Code sharing

c.
Address sharing

d.
Address swapping
Feedback
Your answer is correct.
The correct answer is: Code sharing

Question 10
Correct
Mark 1.00 out of 1.00

Flag question
Question text
What is used to free heap memory no longer in use.

Select one:

a.
The malloc() Call

b.
Stack
c.
The free() Call

d.
Automatic
Feedback
Your answer is correct.
The correct answer is: The free() Call

You might also like