Chapter 2 Questions
1. System Software on a Unix System perform the same basic services as System Software on a Microsoft Windows System. However, there are some fundamental differences in how the system software is designed and developed. Describe at least two differences.
• The code for MS Windows is proprietary and closed source, while the code for many Unix distributions (such as Linux) is free and open source. • MS Windows is a single, monolithic, integrated system, while Unix is modular, with users able to switch out pieces of the system. • MS Windows is designed to make operating a computer as easy as possible; many details of how the system operates are hidden from users. In a Unix system, all the details are easier to access, for study or for modification.
2. Briefly describe two operations that a debugger can perform (i.e., commands that you can give to a debugger? What two things does the compiler do to assist a debugger?
Set a breakpoint to pause execution of the program at a given line number. It can also print the value of a variable during execution also run a single line of program code, pausing after it completes.
3. Why must a program specifically be compiled for debugging to be able to execute that program in a debugger? What two things does the compiler do to assist a debugger?
The compiler adds a symbol table to the executable so that variable names from the source code can be understood. The compiler avoids optimizing operations so that lines of code in the executable can be related to the original lines of source code.
4. Describe two ways a text editor can assist with writing program code (as opposed to writing generic text using a word processor).
The text editor emacs, the bracket matching feature can briefly move the cursor to the opening bracket every time a closing bracket is typed, animating the grouping. Some text editors...