CS 270, Systems Programming, Spring 2018

CS 270 is a general introduction to computer systems. Its goal is to provide an overall view of the components that make up a computer system and the ways in which programs interact with those components. The course touches on a broad range of topics, including hardware, assembly language, compilers, operating systems, networking, and client-server interaction. It presents topics from a programmer's perspective, hoping to develop a complete understanding of what happens when a program is executed. The course also introduces useful programming and debugging tools that can assist students in creating robust and efficient code. The course provides foundational programming skills required by many upper level classes.

More specifically, the course touches on hardware instruction sets, data representations, assembly and machine-level program representations, translation from C to assembly language, linking and loading, multiprogramming and multitasking, process and thread management, memory management, virtual memory, file I/O, network programming, and client-server protocols.

Learning Outcomes

Students will acquire knowledge of computer systems and how to program them. More specifically, students will be able to

  1. understand overall computer system structure and operating system design.
  2. understand how specific high-level language program constructs are implemented in assembly language.
  3. effectively use a debugger.
  4. understand the concepts of processes and threads and use them to achieve concurrent execution.
  5. understand the interfaces provided by the memory-management component of the operating system.
  6. use the interfaces provided by the file system in developing applications.
  7. use a networking API to create networked applications.

Times and places

Class BS 116 MWF 9:00a ‒ 9:50a
Instructor Raphael Finkel
Web http://www.cs.uky.edu/~raphael/courses/CS270.html
Email raphael @cs.uky.edu
Office Hardymon 230 (7-3885)
Office hours M 11:00a-12:30p, R 2:00p-3:30p.

Course Prerequisites

The course assumes a basic understanding of computer hardware. It also assumes a basic level of proficiency in the C or C++ programming language. Students should have completed or be simultaneously enrolled in EE 280. Students must have taken CS 216. Completion of CS/EE 380 is helpful but not required. It is helpful to have more advanced programming skills; see http://www.cs.uky.edu/~raphael/programming.html for a refresher.

Assignments

The class has five in-class laboratories and five projects. These exercises all use virtual machines that students can access from their own computers. Students must bring laptop computers to the in-class laboratories. The purpose of all these exercises is to make the course topics real and to expose students to the challenges of developing robust and efficient software.

Students submit all projects and in-class lab assignments electronically via the CS Portal: https://www.cs.uky.edu/csportal.

References

The required textbook is Randal E. Bryant and David R. O'Hallaron, Computer Systems: A Programmer's Perspective (3rd edition), Pearson, 2016, ISBN-13: 978-0-13-409266-9. The webpage for the book is at http://csapp.cs.cmu.edu. The textbook has an associated "student site" at http://csapp.cs.cmu.edu/3e/students.html, with pointers to helpful resources for the C language and the Linux operating system/programming environment, as well as additional resources for specific textbook chapters. One can likely get a 2nd edition copy for much less money, and it will mostly serve, although the 3rd edition is more complete with respect to 64-bit instructions.

The following books are not required, but they may be helpful as additional sources of information.

  1. Andrew S. Tannenbaum, Structured Computer Organization 5th edition, Prentice Hall, 2006
  2. Kernighan and Richie, The C Programming Language 2nd edition, Prentice Hall, 1988.
  3. B. Stroustrup, The C++ Programming Language, 3rd edition, Addison Wesley, 1997.
  4. Brian Kernighan and Rob Pike, The Unix Programming Environment, Prentice-Hall, 1984.
  5. Rodriguez, Fischer, and Smolski, The Linux Kernel Primer Prentice Hall, 2006
  6. William Stallings, Operating Systems: Internals and Design Principles, 6th edition, Prentice Hall, 2009.
  7. Andrew S. Tanenbaum, Modern Operating Systems, 4th edition, Prentice Hall, 2015.
  8. Andrew S. Tanenbaum, Operating Systems Design and Implementation, 3rd edition, Prentice Hall, 2006.
  9. Raphael Finkel, An Operating Systems Vade Mecum, 2nd edition, Prentice Hall, 1988. ftp://ftp.cs.uky.edu/cs/manuscripts/vade.mecum.2.pdf

Exams

There will be two exams: an in-class midterm and a final. The final exam will only test material in the course covered after the midterm.

Schedule

The following is a very tentative with respect to subjects covered.

 F
Jan 8 
Jan 15 
Jan 22 La 
Jan 29  
Feb 5 
Feb 12 Lb 
Feb 19 
Feb 26  
Mar 5 9c 
Mar 12 
Mar 19 10 10 
Mar 26 11 11 11d
Apr 2 11 11 
Apr 9 11 11 11 
Apr 16 11 11 11e 
Apr 23 11 11f 11 
May 2  i
Code Meaning
1‒15 Chapter in the textbook
Project 1 due at 9:00 AM
Project 2 due at 9:00 AM
Project 3 due at 9:00 AM
Project 4 due at 9:00 AM
Project 5 due at 9:00 AM
Absolute deadline for submitting work
Midterm exam
Discuss midterm exam
In-class laboratory
No class - University holiday
No class - Religious holiday
Final: Wednesday May 2 8:00‒10:00am

Grading

Students will be graded 50% on projects, 40% on exams (30% on each student's better exam, 10% on the other one), 5% on attendance, and 5% on in-class lab assignments. Final grades will be assigned according to the following scale: A=90-100%, B=80-89%, C=70-79%, D=60-69%, E=0-59%. I generally do not give incomplete grades.

Late penalty

Projects are due at the start of class on the days indicated above. Laboratory assignments should be done during class on the indicated days, but they will be accepted until midnight that night. After that time they will get a 0 grade.

Late projects are penalized 3% (of the total possible points) per day for each day late, not including weekend or holidays. The maximum penalty is 7 days late; after that, one may hand in an assignment and still get 79%. However, the absolute deadline is class time on Wednesday of the last week of classes. No extra credit is available on late projects. A student who turns in a project early gains early credits (which also ignore weekends and holidays), which are only used to offset late penalties on other assignments but have no other value.

Attendance policy

Attendance is mandatory. Part of your grade depends on attendance. Of course, I'll make reasonable allowances for family emergencies, medical events (suitably documented at Tier 2 or Tier 3), job interviews (with verification) or religious observances (inform me in writing during the first week of class).

Responsible use of computers

Students must use the computing facilities on campus in accordance with standards of honesty and personal conduct. Those standards, outlined in the University of Kentucky Policy governing access to and use of University of Kentucky computing resources , available at https://www.uky.edu/regs/sites/www.uky.edu.regs/files/files/ar/ar10-1.pdf, call for all members of the community to act in a responsible, ethical, and professional way.

Cheating

All academic work, written or otherwise, that you submit is expected to be the result of your own thought, research, or self-expression. You may certainly discuss the assignments with each other, but you must not show each other your work; everyone must develop the assignments completely independently. It is a serious offense to allow other students to copy your work or to copy the work of other students (even if it is in a public computer file or on github based on similar assignments). If you borrow ideas, algorithms, wording, or code from other sources, you must acknowledge that fact or you have committed plagiarism. If you directly take more than about 4 words in a row from any source, you must indicate that you have done so, typically with a footnote or an in-line citation, using indentation or quote marks to set off the quoted text. (Some of this text was taken years ago from an online plagiarism guide that I can no longer find.)  I punish offenses against this policy quite strictly.