Bryn Mawr College
CMSC 223: Systems Programming
Fall 2023
Course Materials
Prof. Deepak Kumar
General Information
Instructor(s)
Deepak Kumar
202 Park Science Building
526-7485
dkumar at brynmawr dot edu
https://cs.brynmawr.edu/~dkumar/
Lecture Hours: Mondays & Wednesdays from 1:10p to 2:30p
Office Hours: 4:00 to 5:00p on Mondays & most Wednesdays (not all!)
Lecture Room: Room 159 Park Science Building
Lab:
- Lab: Mondays 2:40p to 4:00p in Room Park 230
Laboratories
- Computer Science lab Room 230 (Science Building)
Texts & Software
Main Texts (Required)
- [Buy] C Programming: A Modern Approach, 2nd Edition, by K. N. King
W. W. Norton & Company, 2008. Amazon price: $80.85 (as of 8/29/2023)
- [Can buy, but also available online for free] The Linux Command Line: A Complete Introduction, 2nd Edition, by William E. Shotts. Amazon Price $33.76 (as of 8/29/2023)
No Starch Press, 2019. First Edition available online at this link.
- [Do Not Buy, for reference only] The C Programming Language, 2nd Edition, Brian Kernighan & Dennis Ritchie
Pearson, 1988
Software
- Visual Studio Code
Installed on all Lab machines. You can also download on your own computer, if you like.
- GNU C/C++ Compiler
Installed on all lab machines.
|
|
Syllabus
Course Description: Class Number: 2179
This is a course in systems programming using the C programming language in the Linux environment. C undergirds the world of modern computers and runs on anything. Learning C will also teach how a computer really works under the hood and it will power your knowledge of programming and system building on any platform. In this class, students will gain hands-on experience implementing low-level algorithms and data structures using C. Furthermore, students will build technical skills related to makefiles, interactive debugging, version control, and command-line shell interaction. Students must register for the weekly lab. Prerequisites: CMSC B151 or CMSC H106 or CMSC H107, and MATH/CMSC 231.
A secondary goal of this course is to give you a chance to learn some fundamental technologies in widespread use. As a computer scientist, you will be expected to know about Makefiles, and command-line execution in the Linux environment.
By the end of this course, you will be able to…
- Write standalone programs in the C programming language
- Understand computer memory management and pointers
- Work with linked structures (lists, trees, and graphs)
- Use the Linux command line
- Become familiar with programming tools and environment in Linux
During the course, you will…
- Code lots of C programs
- Setup and use Make files, and other Linux tools
- Learn how to debug
Lab Attendance: Attendance in Lab is optional, but will be required during specific weeks. Look for announcements below during the semester. Prof. Kumar will be available in the Lab during all Lab times throughout the semester.
Important Dates
September 6 |
First class meeting |
Exam 1 |
October 4 |
Exam 2 |
November 13 |
December 11 |
Last class meeting |
Exam 3 |
December 13 |
Creating a Welcoming Environment
All members of the Instruction Staff are dedicated to the cause of improving diversity, equity, and inclusion in the field of computing, and to supporting the wellness and mental health of our students.
Diversity and Inclusion
It is essential that all members of the course community – the instructor, TAs, and students – work together to create a supportive, inclusive environment that welcomes all students, regardless of their race, ethnicity, gender identity, sexuality, or socioeconomic status. All participants in this course deserve to and should expect to be treated with respect by other members of the community.
Class meetings, lab sessions, office hours, and group working time should be spaces where everyone feels welcome and included. In order to foster a welcoming environment, students of this course are expected to: exercise consideration and respect in their speech and actions; attempt collaboration and consideration, including listening to opposing perspectives and authentically and respectfully raising concerns, before conflict; refrain from demeaning, discriminatory, or harassing behavior and speech.
Wellness
Additionally, your mental health and wellness are of utmost importance to the course Instruction Staff, if not the College as a whole. All members of the instruction staff will be happy to chat or just to listen if you need someone to talk to, even if it’s not specifically about this course.
If you or someone you know is in distress and urgently needs to speak with someone, please do not hesitate to contact BMC Counseling Serices: 610-526-7360 (610-526-7778 nights and weekends). If you are uncomfortable reaching out to Counseling Services, any member of the Instruction Staff will be happy to contact them on your behalf.
We understand that student life can be extremely difficult, both mentally and emotionally. If you are living with mental health issues such as anxiety, depression, ADHD, or other conditions that may affect you this semester, you are encouraged to discuss these with the Instructor. Although the details are up to you to disclose, the Instruction Staff will do their best to support and accommodate you in order to ensure that you can succeed this course while staying healthy.
Accessibility
Bryn Mawr College is committed to providing equal access to students with a documented disability. Students needing academic accommodations for a disability must first speak with Access Services. Students can email accessservices@brynmawr.edu to request an appointment to begin this confidential process. If eligible for accommodations as per Access Services, students should schedule an appointment with the professor as early in the semester as possible to share their verification form and make appropriate arrangements. Please note that accommodations are not retroactive and require advance notice to implement. More information can be obtained at the Access Services website. (http://www.brynmawr.edu/access-services/)
Because some students with a disability may be eligible to record lectures - and it is state law in Pennsylvania that individuals are given advance notice that they may be recorded - professors also need to include the following statement in their syllabus:
Any student who has a disability-related need to record this class must first be found eligible to do so by Access Services and must share this eligibility with me, the instructor. Class members need to be aware that this class may be recorded.
Assignments
- Assignment#1 (Due on September 20): Click here.
- Assignment 2: (Due on September 27): Click here.
- Assignment 3: (Due on Wed October 4): Click here.
- Assignment 4: (Due on Wed, November 1): Click here.
- Assignment 5: (Due on Mon, November 13): Click here.
- Lab 12/Assignment 6 (Due by start of class on Wednesday, December 13): Click here.
Lectures
- Week 1 (September 4. 6)
September 4: Labor Day. No Class.
September 6: First class meeting. Introduction & administrivia. Meeting Linux & C: WIMP vs CLI, basic shell commands. a brief history of the evolution of C, a quick overview of C (aka C for Java programmers), writing, compiling, and running C programs.
Lecture slides: 01-Introduction*
Lab: A printed handout for this week's Lab will be given in the class. Agenda: Getting familiar with the Linux command line (BASH): ls, pwd, cd, cp, cat, less, more, mv. Creating and editing text/program files. Writing, compiling, and running C programs (several!).
Read: Chapters 1-6 from King. Chapters 1-4 from Shotts.
- Week 2 (September 11, 13)
September 11: Overview of C: Basic data types (int, float), variables, initializers, idenitifiers, macros, arithmetic operators, expressions, operator precedence, assignment operator.
Assignment#1 (Due on September 20): Click here.
Read: Chapters 1-6 from King. Chapters 1-4 from Shotts.
September 13:
Compound assignment, increment/decrement operators, statments, relational and logic operators, compound statements, conditionals, repetition. Writing simple programs.
Read: Chapters 1-6 from King. Chapters 1-4 from Shotts.
Lab: Lab 2 is posted. Click here. Complete Lab 2 by Wednesday, September 20. After completing Lab 2, just send an email to your instructor that you have completed it.
- Week 3 (September 18, 20)
September 18: Basic types: integers, floating point numbers, characters: type names, values/literals, input/output, type conversions. Arrays: defining, representation. Multi-dimensional arrays. Some C idoms.
Read: Chapter 7 & 8 from King.
Lab 3: Click here. (to be completed by Monday, September 25)
September 20:
Arrays: defining, representation. Multi-dimensional arrays. Some C idoms. Functions. Defining and declaring functions. Function terminology: invocation, parameter passing, returning, prototypes, call stack. Recursive functions in C. C Program Structure. Examples.
Read: Chapter 7, 8 and 9 from King.
Assignment 2: (Due on September 27): Click here.
- Week 4 (September 25, 27)
September 25: More Linux cmmands (type, which, help, man, whatis, info, alias). Arrays as function parameters.Recursive Functions. Examples of writing functions.
Read: Chapters 8 & 9 from King, Chapters 5 & 6 from Shott.
September 27:
Writing functions. Generating random numbers, seeding the random number generator. Shuffling an array of numbers. Sorting: Selection Sort, Insertion Sort.
Read: Chapters 8 & 9 from King.
Lab#4: (Due on Monday, October 2): Click here.
Assignment 3: (Due on Wed October 4): Click here.
- Week 5 (October 2, 4)
October 2: Writing functions. Sorting: Selection Sort, Insertion Sort. Review for Exam 1. C Program Structure. Variables and scoping rules: automatic variables, block scope, static variables, local and non-local variables, global variables.
October 4:
Exam 1 is today.
Lab#5: (Due on Wed, October 10). Click here. Please send e-mail when completed.
- Week 6 (October 9, 10)
October 9: Exam 1 review. Pointers in C: pointer variables, operators, assignment, arguments, return values. Examples.
Read: Chapter 11 from King.
October 10:
Pointers in C: pointer variables, operators, assignment, arguments, return values. Examples. Pointers and Arrays.
Read: Chapter 12 from King.
Lab#6: (Due on Wednesday, October 24). Click here. Please send e-mail when completed.
- Week 7 (October 16, 18)
Fall Break, no classes.
- Week 8 (October 23, 25)
October 23: Strings in C: array of char, null termination, reading and writing strings, the <string.h> library, arrays of strings, command line arguments.
Read: Chapter 13 from King.
Assignment 4: (Due on Wed, November 1): Click here.
October 25:
Arrays of Strings. Command Line Arguments. Linux File Permissions and how to change them (using chmod). The C Preprocessor: Macros, Parameterized Macros, Conditional Compilation.
Read: Chapter 14 from King, and Chapter 9 from Shott.
Lab 7: Click here (Due on Wed, November 1)
Week 9 (October 30, November 1)
October 30: Structures in C. Using OOP design ideras to design using structures (Back to the future, again!), File I/O, parsing CSV files (using strtok()).
Read: Chapter 16, Chapter 22 (pages 543-545, 570), and Chapter 23 (pages 620-622) from King.
Lab 8: Click here. (Due on Wed, November 8)
November 1:
C Structures. Designing an abstract data type (Back to the Future!) in C: Stack, separate Compilation. Make files.
Read: Chapter 15 from King.
Assignment 5: (Due on Mon, November 13): Click here.
- Week 10 (November 6, 8)
November 6: Designing an abstract data type (Back to the Future!) in C: Stack, separate Compilation. Make files.
Read Chapter 15 from King.
NO Lab this week. Lab 9 will be posted next week.
November 8:
Designing ADTs in C (using Java design principles). Introduction to Dynamic Storage Allocation.
Read: Section 17.1 from King.
- Week 11 (Novmber 13, 15)
November 13: Exam 2 is today.
Lab 9: Click here. (Due by Wednesday, November 22)
November 15:
Exam 2 Review.
Dynamic Memory Allocation in C, Dangling pointers.
Read: Chapter 17 from King.
- Week 12 (November 20, 22)
November 20: Linked Lists in C.
Read: Chapter 17 from King.
Lab 10: Click here. (Due on Wednesday, November 29)
November 22:
No class today.
November 23- Happy Thanksgiving!
- Week 13 (November 27, 29)
November 27: Using assertions (from <assert.h>). Queue and modeling example: Discrete Event Simulation.
Read: Page 628 from King.
November 29:
Discrete Event Simulation using queues. Function pointers. Using function pointers.
Read: Section 17.7 from King.
Lab 11: Click here. (Due on Wednesday, December 6)
- Week 14 (December 4, 6)
December 4: A tutorial on AWK.
Read: AWK Tutorial.
Lab 12/Assignment 6 (Due by start of class on Wednesday, December 13): Click here.
December 6: No class today. I will have Office Hours instead (during class time).
- Week 15 (December 11, 13)
December 11: Course Wrap up.
December 13:
Exam 3 is today.
Course Policies
Submission and Late Policy
No assignment will be accepted after it is past due.
No past work can be "made up" after it is due.
No regrade requests will be entertained one week after the graded work is returned in class.
Any extensions will be given only in the case of verifiable medical excuses or other such dire circumstances, if requested in advance and supported by your Academic Dean.
Communication
As you will discover, we are proponents of two-way communication and we welcome feedback during the semester about the course. We are available to answer student questions, listen to concerns, and talk about any course-related topic (or otherwise!). Come to office hours and labs! This helps us get to know you. You are welcome to stop by and chat. There are many more exciting topics to talk about that we won't have time to cover in-class.
Please stay in touch with, particularly if you feel stuck on a topic or project and can't figure out how to proceed. Often a quick e-mail, phone call or face-to-face conference can reveal solutions to problems and generate renewed creative and scholarly energy. It is essential that you begin assignments early, since we will be covering a variety of challenging topics in this course.
Grading
All graded work will receive a grade, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7,
1.3, 1.0, or 0.0. At the end of the semester, final grades will be calculated as a weighted average of all grades according to the following weights:
Exams |
65% |
Exam 1 |
20% |
Exam 2 |
20% |
Exam 3 |
25% |
Weekly Labs |
10% |
Assignments |
25% |
Incomplete grades will be given only for verifiable medical illness or other such dire circumstances.
Study Groups
All submitted work should be solely your individual work. We encourage you to discuss the material and work together to understand it. Here are our thoughts on collaborating with other students:
- The readings and lecture topics are group work. Please discuss the readings and associated topics with each other. Work together to understand the material. We highly recommend forming a reading group to discuss the material -- we will explore many ideas and it helps to have multiple people working together to understand them.
- It is fine to discuss the topics covered in the homeworks, to discuss approaches to problems, and to sketch out general solutions. However, you MUST write up the homework answers, solutions, and programs individually without sharing specific solutions, mathematical results, program code, etc. If you made any notes or worked out something on a white board with another person while you were discussing the homework, you shouldn't use those notes while writing up your answer.
- Under ABSOLUTELY NO circumstances should you share computer code with another student. You are not permitted to use or consult code found on the internet for any of your assignments.
If you have any questions as to what types of collaborations are allowed, please feel free to ask.
Created on August 29, 2023.