A program written in C/C++ is stored in one or more source modules as plain ASCII text files. These are compiled into object modules. Because we are focused on all memory-
When we request the operating system to execute a program, its load module is loaded into memory - that is, the program address space is created and mapped to physical addresses. Now the program can be executed one instruction at a time, in the usual way. Thus, on a certain level of abstraction, we can
2.1 In a C/C++ program, can you define a global variable that is not accessible by a certain function?
2.2 Can a global variable in a C/C++ program be located in the static data section of the object module of the program? Can it be located in the dynamic section of the load module?
2.3 What is the difference between logical address and physical address?
2.4 What is the difference between object module and load module?
2.5 What does "address space" refer to?
2.6 What is the system stack for?
2.7 Why does the load module have no dynamic data section even though the address space does?
2.8 The statements of a C/C++ program are translated by the compiler to machine instructions. Where are these instructions stored?
2.9 Is there any difference between linking and relocation? If so, describe it.
Some very good contemporary
Crowley, Ch., Operating Systems, A Design-Oriented Approach , Irwin/McGraw-Hill, New York, 1997 .
Silberschatz, A., Galvin, P. B., and Gagne, G., Operating System Concepts , Wiley, New York, 2002 .
Stallings, W., Operating Systems - Internals and Design Principles , Prentice-Hall, Englewood Cliffs, NJ, 2001 .
Tanenbaum, A. S., Modern Operating Systems , Prentice-Hall, Englewood Cliffs, NJ, 2001 .
An
Sutter, H., Exceptional C++ , Addison-Wesley, Reading, MA, 2000 .
Fundamentals of compilers principles and techniques; an oldie, but still the best text around:
Aho, A. V., Sethi, R., and Ullman, J. D., Compilers - Principles, Techniques, and Tools , Addison-Wesley, Reading, MA, 1988 .
Other
Pittman, T., and Peters, J., The Art of Compiler Design, Theory and Practice , Prentice-Hall, Englewood Cliffs, NJ, 1992 .
Waite, W. M., and Carter, L. R., An Introduction to Compiler Construction , HarperCollins, New York, 1993 .
Fundamentals of computer architecture:
Hamacher, C., Vranesic, Z., and Zaky, S., Computer Organization , McGraw-Hill, New York, 2002 .
Hennessy, J., and Patterson, D., Computer Architecture: A Quantitative Approach , Elsevier, New York, 2002 .
{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}
Murdocca, M., and Heuring, V. P., Principles of Computer Architecture , Prentice-Hall, Englewood Cliffs, NJ, 1999 .
Stallings, William, Computer Organization and Architecture - Principles of Structure and Function , Prentice-Hall, Englewood Cliffs, NJ, 1996 .
Fundamentals of programming languages:
Clark, R. G., Comparative Programming Languages , Addison-Wesley, Reading, MA, 2001 .
Mitchell, J. C., Concepts in Programming Languages , Cambridge University Press, 2002 .
Pratt, T. W., and Zelkowitz, M. V., Programming Languages - Design and Implementation , Prentice-Hall, Englewood Cliffs, NJ, 2001 .
The Internet is an excellent source for technical details about memory
and memory management in various operating systems, but there is no
guarantee of how the links will be
Gorman, M., "Code Commentary on the Linux Virtual Memory Manager", http://www.csn.ul.ie/~mel/projects/vm/guide/pdf/code.pdf .
Gorman, M., "Understanding the Linux Virtual Memory Manager", http://www.csn.ul.ie/~mel/projects/vm/guide/pdf/understand.pdf .
Myers, N. C., "Memory Management in C++", C++ Report , July/August 1993 (part 1) and December 1993 (part 2); also at http://www.cantrip.org/wave12.html .
Russinovich, M., "Inside Memory Management", part 1, Windows & .NET Magazine , http://www.winntmag.com/Articles/Index.cfm?IssueID=56&ArticleID=3686 .
Russinovich, M., "Inside Memory Management", part 2, Windows & .NET Magazine , http://www.winntmag.com/Articles/Index.cfm?IssueID=58&ArticleID=3774 .
An excellent site for links concerning technical knowledge of memory management for various operating systems:
http://www.memorymanagement.org .