Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

OSTEP TEXT CAN BE FOUND HERE: http://pages.cs.wisc.edu/~remzi/OSTEP/ Reading ass

ID: 3814519 • Letter: O

Question

OSTEP TEXT CAN BE FOUND HERE:

http://pages.cs.wisc.edu/~remzi/OSTEP/

Reading assignment. Read Chapters 13 and 14 of the OSTEP (Operating Systems: Three Easy Pieces) text and answer the following questions by editing file hw6.txt attached to the homework.

What is the main aim of virtual memory?

a program behaves as if it has its own private memory space

I/O accesses are treated as memory accesses

memory addresses can vary in length

If your C code outputs a pointer value, is it a virtual or physical address? a) virtual b) physical.

If free() a system call?

What’s the problem with the following C code? (include statements not shown) Select one of the numbers 1-3 listed below: __________________

main() {

char *s = "testing";

char *t = malloc(strlen(s));

strcpy(t, s);

printf("%s ", t);

exit(0);

}

the problem is with the malloc call

the problem is with the strcpy call

the problem is with the declaration of variable s

Can the size of the heap part of a process’ address space change over the lifetime of the process? (Yes/No) ___________

OSTEP TEXT CAN BE FOUND HERE:

http://pages.cs.wisc.edu/~remzi/OSTEP/

Explanation / Answer

Multiple Questions : Answering two

If free() a system call?
No, free is a function frees the memory space pointed to by a pointer.

If your C code outputs a pointer value, is it a virtual or physical address?
a) virtual or logical address