Home » , , , » Download PDF System Programming with C and Unix by Adam Hoover

Download PDF System Programming with C and Unix by Adam Hoover


Sinopsis

Computer systems are made up of hardware and software. Software generically refers to the programs running on the computer. While both hardware and software can be modified or upgraded, it tends to happen more often with software. In fact, the major reason to have software is to provide the ability to change the instruction stream executed on the computer. This means that it is often expected that new programs will be written, or old programs will be modified or evolved, during the life cycle of a computer system. Given this expectation, it is natural to look for methods to allow the computer system to support program development. A number of tools and resources have evolved over the last 30 years to assist program development. These include standard libraries (also called system libraries), system calls, debuggers, the shell environment, system programs, and scripting languages. Knowledge of these tools greatly enhances the ability of a programmer.While it is important to learn the details of some specific tools, it is more important to understand when and how to best use a tool. A number of good reference manuals can provide detailed information on a specific language or tool. This book is intended to provide a broader understanding of the concepts in system programming.

We may define system programming as the use of system tools during program development. Proper use of these tools serves several purposes. First and foremost, it saves a great deal of time and effort. Using system libraries saves a programmer the time it would take to independently develop the same functions. Using a debugger saves an enormous amount of time in finding and fixing errors in a program. Common tasks, such as searching for text within a set of files or timing the execution of a program, are facilitated by the existence of system programs. Second, system tools provide opportunities for program development that are otherwise extremely difficult to come by. System calls provide access to the core functions of the operating system, including memory management, file access, process management, and interprocess communication. Some standard libraries implement complex functions that are beyond the capability of most programmers.

For example, the math library includes trigonometric functions and other real-valued operations that require iterative methods to reach a solution. Third, consistent use of system tools promotes standards, so that code developed for one computer system is more easily ported to another computer system. System libraries provide a layer of abstraction, implementing the same function calls on multiple computing systems. An application can call a system library without worrying about the details of the underlying hardware. In this manner, the application can be ported as long as the destination system possesses the same system libraries. For graphics, this has become increasingly important as the number and variety of hardware display capabilities has expanded. Knowledge of the basic system file structure assists in program management.

A Unix computer system typically includes well over 10,000 files related to system operation (this does not include user data files). Over time, a standardmethod for organizing these files has evolved. There are common places for libraries, system programs, device files (connections to hardware), applications, and user data. Finally, there is the shell environment. The shell environment is rich with options, capabilities, and configurability, to the point that it is overwhelming to novice programmers. However, once some proficiency has been gained, the shell is a powerful tool for any serious system programmer. It offers tremendous flexibility in process control, system management, and program development.

This text was written with three goals. First, it supports teaching about the tools and concepts of system programming. Second, it should help the reader elevate his or her programming skill beyond an introductory level. Third, it provides a rigorous regimen of programming exercises and examples that allow the reader to practice and develop the skills and concepts of system programming. To help achieve these goals, example code pieces and programs are provided throughout the text. Each chapter ends with numerous questions and exercises that can be undertaken to strengthen understanding of the material.

Besides the concepts of system programming, this text explores the lowerlevel data types: bits and bytes, bit operations, arrays, strings, structures, and pointers. This material is covered with an emphasis on memory and understanding how and why these different data types are used. It is common for a student to be less comfortable with these topics than with other basic programming concepts, such as loops and conditionals. The coverage of the lower-level data types is intended to reinforce an earlier exposure to these topics. The goal is to advance the programming skill of the reader to the point where these lower-level data types are well and comfortably used.

Content

  1. Introduction
  2. Bits, Bytes, and Data Types
  3. Arrays and Strings
  4. Pointers and Structures
  5. Input/Output
  6. Program Management
  7. System Calls
  8. Libraries
  9. Scripting Languages





0 komentar:

Posting Komentar