Systems Programming Course Gustavo RodriguezRivera CS Common Core

  • Slides: 18
Download presentation
Systems Programming Course Gustavo Rodriguez-Rivera

Systems Programming Course Gustavo Rodriguez-Rivera

CS Common Core Courses Problem Solving and Object Oriented Programming n Programming in C

CS Common Core Courses Problem Solving and Object Oriented Programming n Programming in C n Foundations of Computer Science n Data Structures and Algorithms n Computer Architecture n n Systems Programming

Objective Consolidate the programming skills from the previous core courses. n The System Programming

Objective Consolidate the programming skills from the previous core courses. n The System Programming course concentrates on how programs run in user space and how the interact with the OS. n It does not cover OS internals. That will be covered in the Operating Systems Course. n

Objective (cont. ) It solidifies the programming skills by having the students write large

Objective (cont. ) It solidifies the programming skills by having the students write large programs (>1000 lines). n The students will use tools like IDEs, debuggers, profilers, and source control to help them write good and maintainable code. n The students will learn how to work on teams. n

Objective (cont. ) Use of Scripting Languages. n The students will learn to write

Objective (cont. ) Use of Scripting Languages. n The students will learn to write multiprocess and multi-threaded programs. n

Topics n n n Address space. Structure of a Program. Text, Data, BSS, Stack

Topics n n n Address space. Structure of a Program. Text, Data, BSS, Stack Segments. Review of Pointers, double pointers, pointers to functions Use of an IDE and debugger to program in C and C++. Executable File Formats. ELF, COFF, a. out. Development Cycle, Compiling, Assembling, Linking. Static Libraries Loading a program, Runtime Linker, Shared Libraries.

Topics (cont. ) n n n n Scripting Languages. sh, basic UNIX commands. File

Topics (cont. ) n n n n Scripting Languages. sh, basic UNIX commands. File creation, read, write, close, file mode. IO redirection, pipes Fork, waitpid, signals. Directories, creating, directory list. Project: Writing your own shell. Source Control Systems (CVS, SVN) and distributed (GIT, Mercurial)

Topics (cont. ) n n n n Programming with Threads, thread creation. Race Conditions,

Topics (cont. ) n n n n Programming with Threads, thread creation. Race Conditions, Mutex locks. Socket Programming. Iterative and concurrent servers. Project: Implementing your own web server with threads and process concurrency. Memory allocation. Problems with memory allocation. Memory Leaks, Premature Frees, Memory Smashing, Double Frees. Execution Profiling.

Textbook n No official Textbook. ¨ Class Notes ¨ Selected Documents and Tutorials available

Textbook n No official Textbook. ¨ Class Notes ¨ Selected Documents and Tutorials available in the Internet n Recommended Textbook. ¨ Advanced Programming in the UNIX Environment, Addison-Wesley, 1992.

Credits Dr. Douglas Comer wrote the initial proposal for the Systems Programming Course. n

Credits Dr. Douglas Comer wrote the initial proposal for the Systems Programming Course. n The proposal was reviewed by Tim Korb, Gustavo Rodriguez-Rivera and the Systems Faculty. n

Hardware Lab in the Computer Architecture Course By Gustavo Rodriguez-Rivera

Hardware Lab in the Computer Architecture Course By Gustavo Rodriguez-Rivera

Introduction n n We want to teach the students that computer programs are everywhere

Introduction n n We want to teach the students that computer programs are everywhere and not only in Windows, Linux, and Macintosh computers. The students also program in ¨ Robots ¨ Phones ¨ Embedded n Processors The students get hands on experience with both hardware and software.

The Hardware Kit n n n The students buy a kit from the department

The Hardware Kit n n n The students buy a kit from the department at cost. The kit contains, breadboard, wires, gates, PIC 18 processor, LED display, speaker, and everything they need to do projects with the PIC 18 processor: ¨ ¨ ¨ 8 bit architecture 2 K RAM, 64 KB Flash Memory for Programs USB communication Digital Input/Outputs, Analog inputs Timers, interrupts Assembly and C programming with Microchip’s MPLAB IDE

The Hardware Kit

The Hardware Kit

Programming the PIC 18 The students write the Assembly or C program in a

Programming the PIC 18 The students write the Assembly or C program in a PC running Windows and the MPLAB IDE environment. n The program is assembled/compile and downloaded to the PIC 18 using a programmer called PICKit 2. n

The MPLAB IDE

The MPLAB IDE

Projects n n Implementing a 7 -Segment display decoder using AND, OR, NOT gates.

Projects n n Implementing a 7 -Segment display decoder using AND, OR, NOT gates. Ambient light using an RGB Full Color LED, Pulse Wide Modulation (PWM), push buttons, and the segment display. Configurable Alarm Clock with selectable ring tones and interrupts. Interfacing the PC and a servo motor using the USB port.

n. You are invited to see some of the student’s projects here in the

n. You are invited to see some of the student’s projects here in the room. n. The URL of the course is http: //www. cs. purdue. edu/homes/cs 250 Thanks!