class: title # Introduction ## CSC 213 – September 3, 2025 --- # Agenda for Today 1. Introductions 2. Course Information 3. Upcoming Work 4. Discussion 5. C Practice 6. Wrap Up --- class: section blue # Introductions --- # Hello... 1. My name is .blank[]. 2. I would like to be called .blank[]. 3. I use the pronouns .blank[]. .light[(they/them, she/her, he/him, ...)] --- class: section, blue # Course Information --- # Basic Information ## Course Website
## Textbook Operating Systems: Three Easy Pieces by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau ## Class Mentors - Alyssa Trapp (morning) - Jana Vadillo (morning) - Che Glenn (afternoon) --- class: section, gray # Class Website Tour --- class: section, blue # Upcoming Work --- # Assignment 1: Ngram Generator **Due:** Monday, September 8th by 11:59pm Submit your work to Gradescope, which has an autograder configured for most assignments. You can submit as many times as you like up until the deadline. Let's look at the assignment instructions now. --- class: section, blue # Discussion --- # Discussion Format We'll follow a ***think, pair, share*** model for discussions in this class. I will ask questions, usually on a slide. For each question, you should: -- 1. Think about the question yourself and try to come up with an answer. -- 2. Discuss your idea with a neighbor(s), and try to reach some agreement. -- 3. Be prepared to share your thoughts when I call on you. -- I will let you know when to move on from each step. Please don't shout out answers, and make sure you're working respectfully with your partners. --- # Discussion: Course Details **Questions for think, pair, share:** -- 1. What should you do if you need to miss class? -- 2. What resources are you permitted to use for assignments and labs in this course? -- 3. One of your lab group members suggests using an AI tool to complete part of our first lab. What are the restrictions on AI use, and how should you respond? -- 4. This class includes a significant amount of group work. Based on your prior experience, what can you do (or avoid doing) to help your group be successful? -- *Start by thinking of answers on your own. I will let you know when to start discussion.* --- # Questions Do you have any questions about course policies before we move on? --- # Discussion: Operating Systems **Questions for think, pair, share:** -- 1. Why do we (usually) write programs to run on top of an operating system instead of directly on the hardware? -- 2. What does it mean to "virtualize" something like the CPU or memory, and why would we want this? -- 3. What do you think are the three most important responsibilities of an OS? -- *Start by thinking of answers on your own. I will let you know when to start discussion.* --- class: section, green # C Practice --- # C Practice: The Problem We are going to write a C program called `charsort` together as a class (I will drive). The program should do the following: 1. The program must accept exactly one string as a command line argument. 2. The output should be all of the letters in the input string, but printed in sorted order. -- For example: ```shell $ ./charsort hello ehllo ``` -- Take a minute to consider how you might approach this problem and what you might need to look up to implement your approach. --- class: section, gray # C Practice: Live Coding --- # C Practice: Style Guide Good C code should do the following: .left-col[ - Indent every block of code - Always use curly braces around blocks - Write explanatory comments, with at least one by each block of code - Cite resources in comments next to the relevant code - Use descriptive variable names - Use whitespace to break code into logical chunks - Validate user input - Print helpful error messages ] .right-col[ - Use standard library functions instead of re-implementing them. - Try to follow modern C conventions - Check return values from library functions - Fix code that generates compiler warnings - Use resources, and cite them appropriately - Use local memory whenever possible (instead of calling `malloc`) - Free allocated memory when you are done with it ] -- **Is this list missing anything?** --- class: section, blue # Wrap Up --- # Reminders ## Assignment The Ngram Generator assignment is due on Monday evening. Start early so you have time to get stuck. ## Reading - **Beej's Quick Guide to GDB**