CSCI 3614 - Systems Programming

Course Description

This course is an introduction to systems programming concepts and techniques. Topics covered will include the user/kernel interface, fundamental concepts of Unix, user authentication, basic and advanced I/O, leystems, signals, process relationships, and interprocess communication. Fundamental concepts of software development and maintenance on Unix systems (development and debugging tools such as "make" and "gdb") will also be covered. The functions of an operating system, operating system utilities and programming embedded systems for set-top devices will be taught using C.

Syllabus

Full text of the syllabus can be downloaded from here.

Assignments

1.File I/O (deadline 20.03.2017)
2.Simple Shell (deadline 21.04.2017)
3.Signals and Threads (deadline extended 30.04.2017)
4.Mini Web Server (deadline 12.05.2017) (new)
(Sample Web Page)

Lectures

1.Introduction
2.Unix Overview
3.File I/O
4.Files and Directories
5.Filesystems
6.System Data Files, Date and Time
7.Process Environment
8.Process Control
9.Signals
10.Threads
11.IPC (Pipes & Sockets) (new)

Extra Project (Sandbox) (new)

This project requires from you to do some research and create a prototype of sandboxing environment. The term "sandbox" refers to isolating an executable into a limited environment, with restricted time, memory, output limits, additional constraints for accessing file system and even more. Your task is to prepare a single application that provides all of the mentioned functionality.
Following are tips for your research, terms that should guide you in right direction:
  • chroot "jail"
  • SELinux
  • seccomp
  • nice
  • cgroups
  • setrlimit, getrlimit
  • fork, wait
  • Signals
Apply to this project only if you need extra points. The deadline for the project is 18.05.2017. By this date you should send source code for the prototype app (it shouldn't be fully functional, but be compilable and run to some reasonable extent), make an appointment with instructor for presentation. You will have 20 minutes to present your application.

Labs

File I/O: rwbuf.c argv.c hole.c lseek.c rwex.c
Files and Directories: access.c chmod.c simple-ls-stat.c simple-ls.c simple-stat.c size.c umask.c cd.c wait-unlink.c
Processes: entry.c exit-handlers.c forkflush.c vfork-example.c zombies.c
Signals: alarm.c eintr.c pending.c vfork-reentrant.c sigusr.c
Threads: fetch_exit.c print_thread_ids.c thread_cleanup.c
Use -lpthread to link the threads library.
Pipes: pipe1.c pipe2.c popen.c mkfifo_reader.c mkfifo_writer.c socketpair.c dgramread.c dgramwrite.c streamread.c streamwrite.c

Exams

Literature

Other

Tutorials

Tools

Linux/UNIX images