COMP SCI 370 Linux Systems Programming

Fall 2007

Course web site: [http://www.uwgb.edu/shayw/courses/370]

Meeting times: TR 2:00-3:15 in MAC 122

 

Professor: Bill Shay                                                                                Office: MAC C308                                                                    

Phone:  465-2316/5038                                                                             email: shayw@uwgb.edu

Office Hours:  MWF: 9:00-10:00; TR:  3:30-4:30; or by appointment.

Prerequisites:  COMP SCI 241 Discrete Mathematics I; COMP SCI 371 Advanced Object Design in C++ (Concurrent enrollment is sufficient)

Required Texts:           Beginning Linux Programming (3rd edition) by Matthew and Stones.

                                        PHP & MySQL by Vikram Vaswani             

 

Course:  The primary focus on this course is to learn how to work within a Linux environment and to explore a few of the productivity tools that run on a Linux system. Specifically we will spend some time on the following:

 

 

Linux is a popular choice of many, especially those in the area of systems development & maintenance and network programming.  It is a powerful operating system with a cryptic shell allowing its users to perform complex tasks not easily done in other systems. Linux is a very different environment from what you are likely used to. Window’s GUI environments were designed to make windows resources available to a wide range of users, including those with little or no computing experience. Though there are GUI front ends to Linux, it is traditionally a command driven system requiring knowledge of its commands to make things happen. There are fewer computer resources devoted to a friendly interface and more devoted to performing tasks. As a result, Linux has evolved into a powerful operating environment capable of performing complex tasks with minimal input from the user. However, that user must know the system well to use it to its maximum potential and also to avoid costly problems. With power comes responsibility and Linux users can perform tasks that adversely affect others on the system if appropriate measures are not taken.

The class will be a mix of lecture, demonstration, and hands-on exercises. I will demonstrate many programs and I will make them available on the course web site. I recommend getting copies of these programs and downloading them into your Linux account, as we will use some of these programs for the hands-on portion of the class.

The workload for this class will consist primarily of designing and writing programs to demonstrate knowledge of the items above (You have all been given accounts on the UW-Green Bay Linux server, icsd).  You can expect to write about 8-9 programs/scripts during the semester.  This averages about two programs every three weeks. 

 

Grading:        Programs:  40%;           Exam 1:  20%;        Exam 2: 20%;   Final exam:  20%.       

                        According to the registrar the final exam is scheduled for Tuesday, December 18, 2007 from 1:00-3:00.  This date is known months in advance and any plans such as work schedules must be planned around this date.

 

Syllabus (approximate):    MS represents the Matthew/Stone book and V represents the Vaswani book. Each topic is supplemented by demo programs found on the course web site. Since I will make frequent references to the textbook I encourage you to bring the books to class each day.

 

Week

Topics

1

Intro to Linux. Files, directories, permissions, shell commands, and vi editor (Notes. MS Chapter 1 & 2, & 19)

2-3

Shell scripts: environment variables, loops, decision making, file and directory processing, recursive scripts (demos, MS Chapter 2).

4-5

Introduction to web applications, html, forms, and CGI programming. PHP and simple web-based interaction (V Chapter 1, 3, and 4)

5-6

PHP Arrays, custom functions, file access, session-based web applications. Analysis of a shopping cart program (V Chapters 5-7). EXAM.

7-8

Relational databases, SQL, and MySQL. PHP and database access in a web environment (V Chapter 8-10, 13; MS Chapter 8)

8-9

Introduction to GNU C, C I/O, formatting, loops and ifs, header files, functions and function arguments, file I/O, makefiles, debugging in C (Notes; MS: Parts of chapters 3, 4).

9

Bit level operations, bit flags, logical operations, status checking, bucket sort, binary representations, and encryption. Debugging tools (Class notes).

10

Dynamic memory management: pointers, memory allocation, relationship to arrays, casting, arrays of pointers, dynamic arrays, linked lists. Debugging tools (MS: Parts of chapters 7 and 10)

11

C-style strings, string operations (Class demos).

12

CGI programming in C, implementing a search engine (Class demos). EXAM.

13

Process management, fork, exec, pipe commands, client/server models (MS: Chapter 11 & 13).

14

Client/server programming, sockets, Establishing communication between a C++ .NET program and a Linux C program (MS: Chapter 15; Class notes).

15 (If time)

Screen Management with the curses library or POSIX Threads (MS: Chapter 6 or 12).