|
Dec 21, 2024
|
|
|
|
CS 205 System Programming and Architecture Lecture Hours: 4 Credits: 4
Introduces how high-level software runs on a computer system. Covers C programming and the assembly that C code becomes. Presents the fundamentals of computer architecture and how instructions and data are represented at the machine level. Provides experience analyzing compiled code to build necessary skills for future work in cybersecurity, operating systems, compilers, and other CS topics involving low-level computation.
Prerequisite: Placement into WR 115 or completion of WR 090 and CS 161 , each with a grade of C or better; or consent of instructor. Student Learning Outcomes:
- Describe the major components of computer architecture; explain their purposes and interactions and the instruction execution cycle.
- Describe a basic instruction set architecture, including the arithmetic, logic, and control instructions; user and control registers; and addressing modes.
- Do simple arithmetic in hexadecimal, decimal, and binary notation, and convert among these notations.
- Explain how data types such as integers, characters, pointers, and floating point numbers are represented and used at the assembly level.
- Write C language programs that use control structures, functions, IO, arrays, and dynamic memory.
- Describe each step of the compilation process by which C language programs are transformed into machine code.
- Explain how high-level programming constructs such as arrays, structures, loops, and stack-based function calls are implemented in machine code. Recognize and reverse engineer same.
- Demonstrate and use a debugger to analyze program flow, inspect register and stack contents.
- Identify and fix performance issues in C programs that are caused by machine level concepts.
- Explain how the information in this course is important within the overall context of computer science.
Content Outline
- Introductions to Systems
- Fundamentals of architecture and the machine cycle
- Memory hierarchy
- Role of operating systems
- C Fundamentals
- Basic C syntax
- IO and File instructions
- Compiling, Running, and Debugging
- Compiling, Linking, And Loading
- Compilation process and tools
- Object files
- Linking & symbol resolution
- Data Representation
- Binary and Hex
- Representation of fundamental C data types
- Representation of machine instructions
- Arithmetic in C and Assembly
- Signed and unsigned integer representations
- Floating point number system
- Bitwise Operations
- Logic operations
- Shifts and rotates
- Control Structures in C and Assembly
- Implementation of C control structures in assembly
- Jump and branch tables
- Memory and Pointers
- Accessing and referencing memory in C and assembly
- Layout of stack and using it to store data
- Dynamic Memory
- Memory management in C
- The heap and standard memory model
- Functions
- Functions in C
- Implementation of C functions in assembly
- Call stack organization and conventions
- Arrays and C-strings
- Arrays and strings in C and relation to pointers
- Array access in assembly
- Buffers and overflow attacks
- Heterogeneous Structures
- Structs and unions
- Data alignment and byte packing
- Optimizations in C
- Basic compiler optimizations
- Relative performance of different operations
- Optimizations available to high level programmers based on systems concepts
- Systems Programming in Context
- Ideas applied to Operating Systems, Cybersecurity, or another area of CS
|
|