systems programming course

18
Systems Programming Course Gustavo Rodriguez- Rivera

Upload: jerry-cook

Post on 30-Dec-2015

55 views

Category:

Documents


1 download

DESCRIPTION

Systems Programming Course. Gustavo Rodriguez-Rivera. CS Common Core Courses. Problem Solving and Object Oriented Programming Programming in C Foundations of Computer Science Data Structures and Algorithms Computer Architecture Systems Programming. Objective. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Systems Programming Course

Systems Programming Course

Gustavo Rodriguez-Rivera

Page 2: Systems Programming Course

CS Common Core Courses

Problem Solving and Object Oriented Programming

Programming in C Foundations of Computer Science Data Structures and Algorithms Computer ArchitectureSystems Programming

Page 3: Systems Programming Course

Objective Consolidate the programming skills from

the previous core courses. The System Programming course

concentrates on how programs run in user space and how the interact with the OS.

It does not cover OS internals. That will be covered in the Operating Systems Course.

Page 4: Systems Programming Course

Objective (cont.) It solidifies the programming skills by

having the students write large programs (>1000 lines).

The students will use tools like IDEs, debuggers, profilers, and source control to help them write good and maintainable code.

The students will learn how to work on teams.

Page 5: Systems Programming Course

Objective (cont.)

Use of Scripting Languages. The students will learn to write multi-

process and multi-threaded programs.

Page 6: Systems Programming Course

Topics 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.

Page 7: Systems Programming Course

Topics (cont.)

Scripting Languages. sh, bash, basic UNIX commands.

File creation, read, write, close, file mode. IO redirection, pipes Fork, wait, waitpid, signals. Directories, creating, directory list. Project: Writing your own shell. Source Control Systems (CVS, SVN) and

distributed (GIT, Mercurial)

Page 8: Systems Programming Course

Topics (cont.) 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.

Page 9: Systems Programming Course

Textbook

No official Textbook.Class NotesSelected Documents and Tutorials available

in the Internet Recommended Textbook.

Advanced Programming in the UNIX Environment, Addison-Wesley, 1992.

Page 10: Systems Programming Course

Credits

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

The proposal was reviewed by Tim Korb, Gustavo Rodriguez-Rivera and the Systems Faculty.

Page 11: Systems Programming Course

Hardware Lab in the Computer Architecture Course

By Gustavo Rodriguez-Rivera

Page 12: Systems Programming Course

Introduction

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 Processors

The students get hands on experience with both hardware and software.

Page 13: Systems Programming Course

The Hardware Kit

The students buy a kit from the department at cost. The kit contains, breadboard, wires, gates, PIC18

processor, LED display, speaker, and everything they need to do projects with the PIC18 processor.

PIC 18 processor: 8 bit architecture 2K RAM, 64KB Flash Memory for Programs USB communication Digital Input/Outputs, Analog inputs Timers, interrupts Assembly and C programming with Microchip’s MPLAB IDE

Page 14: Systems Programming Course

The Hardware Kit

Page 15: Systems Programming Course

Programming the PIC18

The students write the Assembly or C program in a PC running Windows and the the MPLAB IDE environment.

The program is assembled/compile and downloaded to the PIC18 using a programmer called PICKit2.

Page 16: Systems Programming Course

The MPLAB IDE

Page 17: Systems Programming Course

Projects 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.

Page 18: Systems Programming Course

Thanks!

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

The URL of the course is http://www.cs.purdue.edu/homes/cs250