OSU CSE 2421
CSE 2421 – Systems I
Introduction to Low-level Programming and Computer Organization
Janis Jones
jones.5684@osu.edu
http://clipartmag.com/cartoon-sunshine-pictures https://creativeartslifestyle.com/all-products/word-stencil-welcome-english-vintage-arched-9-1-2-x-2-5-8-word-size/
J.E.Jones
OSU CSE 2421
Computer Systems: A Programmer’s Perspective, 3rd Edition, by Randall E. Bryant and David R. O’Hallaron, (Required)
◦ This link contains all known errors to the 3rd edition of the text: http://csapp.cs.cmu.edu/3e/errata.html
(Every text has errors. Editors/authors aren’t perfect.)
Pointers on C, by Kenneth Reek 1997 (Recommended, not required) ◦ This link contains all know errors for Reek:
https://www.cs.rit.edu/~kar/pointers.on.c/errata.html
If you chose not to purchase Reek (since it was recommended but not required), keep a note to the title and author. If you end up in a position where C is a part of your daily responsibilities, buy it. It’s the best book I’ve seen. There is a copy of this text in the Engineering Library.
J.E.Jones
OSU CSE 2421
The syllabus is posted on Piazza.
Reading the Course Syllabus is a required reading assignment for this class. Due
date for this assignment is tomorrow.
Choosing to not read and/or retain the information within the Course Syllabus, is
not a valid excuse for not knowing the information within it.
If you ask a question that information in the syllabus answers, I’ll answer with “syllabus”.
J.E.Jones
OSU CSE 2421
If you have questions or need help, please ask, either during class, by posting on Piazza, or by Zoom meeting with me or one of the graders during their office hours (or by making an appointment).
My office hours and the graders names/office hours are (will be) posted on Piazza
I do not check email on Carmen, use Piazza or jones.5684@osu.edu
Most slides will be posted to Piazza
Grades will only be posted to Carmen.
Labs and homework will be submitted to Carmen.
There are no make-ups for in-class assignments (note caveats in syllabus)
J.E.Jones
OSU CSE 2421
If you see a link to anything within the slides or any of the items on Piazza under Resources, the information found there is “fair game” for questions on the midterm and/or the final. I’m notorious for putting a few questions about them on the midterm and final to help me determine who gets the A’s and who gets something less.
There are required readings specified in the Date Calendar. Don’t procrastinate.
Reading textbooks is definitely not one of my favorite things. If I don’t like to do something, I won’t have you do it. If I’m telling you to read something, it’s because I consider it to be a significant help with respect to you being able to understand the concepts in this class.
J.E.Jones
OSU CSE 2421
Copyright disclaimer
◦ The materials used in connection with this course may be subject to copyright protection and are only for the use of students officially enrolled in the course for the educational purposes associated with the course. Copyright law must be considered before copying, retaining, or disseminating materials outside of the course.
◦ This means that if you upload any course content to Chegg, CourseHero, etc., you are violating copyright law.
◦ Be aware that posting lab, homework, or exam questions from this course to Chegg or other coursework help web sites or searching for and reading answers to any question that are already posted is also considered academic misconduct.
◦ Note that many of these sites cooperate with OSU with respect to identifying instances of academic misconduct. Ask a bunch of students that took Chemistry last Spring about that.
If you have SLDS accommodations, get that information to me ASAP. Accommodations are not applied retroactively.
J.E.Jones
OSU CSE 2421
I take Ohio State University’s policies regarding Academic Integrity and Misconduct seriously. I expect all of you to take them seriously as well. It’s how we all contribute to keeping the value of your future degree high and in demand by employers. Students who choose to violate this policy are stealing the integrity of the degree everyone else works hard to earn.
Please be sure to familiarize yourself with the OSU academic misconduct rules and policies which include examples and details defining academic misconduct: http://oaa.osu.edu/coamfaqs.html.
It is your responsibility as a student to be aware of actions that are considered prohibited by the university. The COAM committee does not consider not knowing that a particular behavior is considered academic misconduct a valid excuse.
If you have not yet taken the time to read these links on prohibited conduct, now is the time: https://trustees.osu.edu/rules/code-of-student-conduct/3335-23-04.html https://oaa.osu.edu/academic-integrity-and-misconduct/student-misconduct
You should make a point of checking out the Ten Suggestions for Preserving Academic Integrity
J.E.Jones
OSU CSE 2421
ACADEMIC INTEGRITY (ACADEMIC MISCONDUCT)
Academic integrity is essential to maintaining an environment that fosters excellence in teaching, research, and other educational and scholarly activities. Thus, The Ohio State University and the Committee on Academic Misconduct (COAM) expect that all students have read and understand the University’s Code of Student Conduct, and that all students will complete all academic and scholarly assignments with fairness and honesty. Students must recognize that failure to follow the rules and guidelines established in the University’s Code of Student Conduct and this syllabus may constitute Academic Misconduct.
The Ohio State University’s Code of Student Conduct (Section 3335-23-04) defines academic misconduct as: Any activity that tends to compromise the academic integrity of the University or subvert the educational process. Examples of academic misconduct include (but are not limited to) plagiarism, collusion (unauthorized collaboration), copying the work of another student, and possession of unauthorized materials during an examination. Ignorance of the University’s Code of Student Conduct is never considered an excuse for academic misconduct, so I recommend that you review the Code of Student Conduct and, specifically, the sections dealing with academic misconduct.
If I suspect that a student has committed academic misconduct in this course, I am obligated by University Rules to report my suspicions to the Committee on Academic Misconduct. The committee determines whether there has been misconduct.
If COAM determines that you have violated the University’s Code of Student Conduct (i.e., committed academic misconduct), the sanctions for the misconduct could include a failing grade in this course and suspension or dismissal from the University.
If you have any questions about the above policy or what constitutes academic misconduct in this course, please contact me or read the OSU links on the previous slide.
J.E.Jones
OSU CSE 2421
I expect this certification to be at the top of each file:
BY SUBMITTING THIS FILE TO CARMEN, I CERTIFY THAT I HAVE STRICTLY ADHERED TO THE TENURES OF THE OHIO STATE UNIVERSITY’S ACADEMIC INTEGRITY POLICY WITH RESPECT TO THIS ASSIGNMENT.
If it’s not there, you may receive 0 points for the assignment
J.E.Jones
OSU CSE 2421
Your grade for this class will be determined by: Description Percentage of Grade Programming Assignments* 12% Homework Assignments* 12%
In-class Assignments* 6% Midterm 30%
Final Exam – must pass 40%
You must pass the final exam in order to pass the course.
*These items prepare you for the Midterm and Final
J.E.Jones
OSU CSE 2421
The principal goal of education is to create men and women who are capable of doing new things, not simply repeating what other generations have done
In other words, men and women who can “think” rather than those who can “memorize answers”. If I could tell you everything you needed to know to work in IT for the next 40 years, I would have a different job*.
As an educator, I can only open the door. You, as a student, must decide to walk in.
– Jean Piaget
– Janis Jones *and I’d probably be living in Tahiti.
– Unknown
J.E.Jones
OSU CSE 2421
That you make a reasonable effort to be in class
That you attend class prepared and pay attention while here
That you ask questions if you don’t understand what’s being discussed in class
That you tell me what you DO know prior to asking a question so that I know where to start the explanation.
◦ Many topics we discuss spiral; give me a baseline on where to start.
◦ If you don’t do this, expect me to ask you questions before answering yours so that I can ferret out this
information, especially in office hours or when you ask me an email or piazza question.
Ensure that there is a photo of you in your Carmen and Zoom profile that clearly shows your face and only your face. I love dogs/cats/scenic photos but that doesn’t tell me who you are. Not only do I want the social interaction, but so do your classmates.
J.E.Jones
OSU CSE 2421
That sometimes I will be going over concepts that you already know and understand
That I will be fair
◦ “fair” means that I will grade your work consistently with everyone else’s
◦ “fair” means that any extra credit will be offered to everyone
◦ “fair” means that, if there are extenuating circumstances, then the exception will apply to everyone with the same circumstances
◦ “fair” means that I don’t sanction exceptions for procrastination or not putting in the effort for this class that everyone else has
That I will be serious about the work
That the course material builds off previously discussed topics
◦ Unfortunately, this means that if you don’t stay current, your problems with this class will likely snowball
To be successful, you must put in the effort
◦ Note that for each hour of class time, OSU expects you to spend 2 additional hours outside of class
◦ That means plan to spend an average of 8 hours/week on this class in addition to class time. If you are having trouble with a topic, it will likely be more than this.
Bad Jokes. It’s only for one semester; you’ll live through it.
J.E.Jones
OSU CSE 2421
If you were successful in Foundations I and/or Foundations II, then you can easily be successful here.
This material isn’t any harder, it’s just different.
Some of the material in this class that seems to give students trouble used to be taught in the “Intro to Computing” class back in the Dark Ages.
◦ It’s not taught there now because we start with “higher level” stuff and work our way down.
J.E.Jones
OSU CSE 2421
The course material is divided into two large parts: ◦ Part 1: The C programming language
programming & debugging in C along with the tools to do so
◦ Part 2: Introduction to computer systems and X86-64 assembly language
programming & debugging in x86-64 along with the tools to do so Sprinkled liberally within the two sections:
◦ Binary, octal, decimal, hexadecimal and ASCII number representations ◦ Performing mathematical and logical operations on the above
(e.g., addition, subtraction, XOR, AND, OR, L/R shifting)
Anything else related to these topics that I can find that will make you better employees and better computer scientists
J.E.Jones
OSU CSE 2421
Lack of structure and procrastination are your enemies! This article may help you:
Why you’re procrastinating more By Alexander Besant, Editor at LinkedIn
If you find yourself procrastinating more these days, you’re likely not alone, says a report in Fast Company. Our current crisis may have something to do with it. Factors like added stress and anxiety, a lack of mental preparation for work that comes with a commute, massive outside stressors making work seem trivial by comparison and less friendly socializing, among other things, feeds our need to procrastinate as a coping mechanism.
Here are some articles about overcoming procrastination:
• Managing the discomfort of starting
• The importance of mindfulness
• Focusing on just one thing
• Break work into smaller pieces
• Minimize distraction
If you want to see the original article, go here: https://www.linkedin.com/feed/news/why-youre-procrastinating-more-4901532/ You may find other useful information in the comments that accompany the article. I did.
Here are a couple others:
◦ https://www.fastcompany.com/90527143/5-reasons-why-youre-probably-procrastinating-more-right-now
◦ Procrastination isn’t about being lazy; it has way more to do with our self‐worth. Here’s why: https://ideas.ted.com/tired‐of‐procrastinating‐to‐overcome‐it‐take‐the‐time‐to‐understand‐ it/?utm_source=linkedin.com&utm_content=2020‐7‐16&utm_medium=referral&utm_campaign=social
J.E.Jones
OSU CSE 2421
How to setup the lab environment we’ll be using for the remainder of the semester
An overview of Java vs. C
◦ After tomorrow, the “Java” word in this classroom will only refer to coffee
A quick summary of the lab assignment if we have time
J.E.Jones
OSU CSE 2421
You are expected to do all lab work on the stdlinux servers for this class.
You can access stdlinux in two ways:
Highly Recommended!!
◦ 1. Go to a CSE lab location: info on labs at https://cse.osu.edu/computing-services/computing-labs/locations-hours ◦ 2. Remote access from your own device: https://cse.osu.edu/computing-services/resources/remote-access
I am told by the CSE Help Desk that: when logging in from one of the CSE labs, you “will not need to log in with PulseVPN. Pulse is only necessary to allow access to the CSE environment from machines that aren’t on the network”.
I cannot help you with remote access issues. Your best bet is to seek help at an ETS Help Desk if you have problems.
Make sure you can access stdlinux ASAP. You don’t want to run in to problems 2 hours before the due date of an assignment. Any lack of planning on your part is not an emergency or a reason for allowing an exception on my part (on any assignment – not just labs).
J.E.Jones
OSU CSE 2421
The Engineering Technology Services (ETS) Team is there to support you. There is a Help Desk area in Baker 392 to expand poster printing support that is adjacent to several of the ISE and CSE labs.
Online Zoom help:
◦ http://go.osu.edu/etsvirtualhelpdesk ◦ 8am-5pmMonday-Friday
ETS’s main Help Desk area, 1012 Smith Lab ◦ Phone: (614) 688-2828
◦ Email: etshelp@osu.edu
◦ Service Desk Location: 1012 Smith Lab
◦ Business Hours: M-F 7:00 A.M.-5:00 P.M.
Don’t forget you also have access via The Buckeye Bar: https://ocio.osu.edu/help/locations ◦ Currently by appointment only
◦ 24-hoursupportviaphone/online
J.E.Jones
OSU CSE 2421
You will want to use: ◦ PulseVPN
◦ FastX2 (maybe, Putty instead if on a Mac)
◦ See the remote access information at the CSE link on the preceding slide to get instructions. Read the sections labeled
UNIX and FastX2
◦ To minimize response time issues, use xterm windows. DO NOT use MATE.
To minimize potential problems, formally logout of FastX and PulseVPN.
◦ Sometimes, if you just click window out, the connection doesn’t shut down correctly on stdlinux
◦ This causes stdlinux to think you have multiple sessions up and at some point, you “hit the limit” and it won’t let you create any more sessions. (And, you don’t think you have any current sessions up.) Experience in past semesters says that this will happen as you try to log in to stdlinux that final time to submit your labs as the due date/time approaches, CSE Help Desk has already closed for the night, and I’m asleep.
J.E.Jones
OSU CSE 2421
C Labs for this course must build on stdlinux with gcc –ansi -pedantic ◦ Do not use IDEs – they will be more trouble than they are worth!
A lot of students write a perfect lab in Windows with Visual Studio, etc.,
. . . then fail the lab because they can’t get it to compile in a Linux
environment
It’s not worth the time to convert from one to the other, and you lose the benefits of learning to work in a Linux/Unix environment, which you may very well need to do later in your career.
Note: If you do things this way, any resulting problems are your responsibility. I will not help you with IDE problems nor will I help you debug a program using an IDE.
A few students in prior semesters chose not to heed this warning and ended up with no points on labs they put a lot of work in.
J.E.Jones
OSU CSE 2421
Excellent tools: IDE, CI, etc.
Many 3rd party libraries
Lots of documentation
Platform independent
Classes and the advantages of OOP. Memory management (garbage
Reasonable performance
Well thought out exception
Security (partly related to the absence of pointers)
handling
Native Threads
Easy to Learn
Lots of available jobs
Larger libraries (no need to re- create the wheel)
collection)
Ability to put something together more quickly that works and *does* something
J.E.Jones
OSU CSE 2421
I assume that each of you is proficient at programming in Java and/or C++
This means you know how loops work and you know a reasonable amount of programming logic
As you work in the industry, you will have to change the programming language you are using from time to time. It’s part of the deal. And it’s not hard.
J.E.Jones
OSU CSE 2421
You might all be asking yourselves these questions:
Why study C?? It’s old technology, Java and C++ are what’s being used now!
◦ See the next few slides
Why would ANYONE want to study assembler in this day and age?!?!?!?
◦ Assemblerlanguageisstilloftenusedforperformance-criticalpartsofaprogramorincybersecurityapplications
◦ Interfacing with or fixing code for which you have no source code
◦ Assembler code knowledge is indispensable when diagnosing malware (security jobs)
◦ QuotefromastudentemailIgotlastyear:“ThissummerIaminterningwiththeCyberSecurityteamatGEAviation,anditturns out that hackers love to use assembly. I’ve actually spent quite a bit of time learning how to reverse engineer the assembly code! ”
I’m not an EE. I’m not planning to create circuit boards. Why do I need to know about processor architecture?
◦ Ifyouaregoingtoprogram,knowledgeofthehardwaremakesyouabetterprogrammer
Are you a “one-trick pony”? Do you want to be? Where you be in 10 years? 20 years? 30 years? Is it where you will want to be?
J.E.Jones
OSU CSE 2421
TIOBE Index for December 2019
December Headline: The winners continue to win
TIOBE will announce the programming language of the year next month. There are 4 candidates for this title: Java (+1.3%), C (+1.8%), Python (+1.9%) and C# (+1.4%). These 4 languages are all in the top 5. Only C++ lost some ranking points in 2019.
Python is top favorite for the title. It was already programming language of the year 2018, but its popularity keeps growing. This is mainly due to the lack of programmers in the world and the ease of learning this language if compared to other languages. C is also doing well thanks to the rise of Internet of Things. Why Java and C# are doing well is unclear, but it would be the first time that C# becomes the programming language of the year. Let’s see what will happen next month!
J.E.Jones
OSU CSE 2421
TIOBE Index for January 2020
January Headline: Programming Language C awarded Programming Language of the Year 2019*
◦ Everybody thought that Python would become TIOBE’s programming language of the year for the second consecutive time. But it is good old language C that wins the award this time with a yearly increase of 2.4%. Runners up are C# (+2.1%), Python (+1.4%) and Swift (+0.6%). Why is the programming language C still hot? The major drivers behind this trend are the Internet of Things (IoT) and the vast amount of small intelligent devices that are released nowadays. C excels when it is applied to small devices that are performance-critical. It is easy to learn and there is a C compiler available for every processor. Congratulations to C! Other interesting winners of 2019 are Swift (from #15 to #9) and Ruby (from #18 to #11). Swift is a permanent top 10 player now and Ruby seems to become one soon. Some languages that were supposed to break through in 2019 didn’t: Rust won only 3 positions (from #33 to #30), Kotlin lost 3 positions (from #31 to #35), Julia lost even 10 positions (from #37 to #47) and TypeScript won just one position (from #49 to #48). Let’s see what 2020 has in store for us!
◦ *C won in 2017, too
J.E.Jones
OSU CSE 2421
Python won this past year, but C is still very popular.
Jan 2021 Jan 2020
Change
Programming Language Ratings
Change
1 2 2 1 3 3 4 4 5 5 6 6
C 17.38% Java 11.96% Python 11.72% C++ 7.56% C# 3.95% Visual Basic 3.84%
+1.61% -4.93% +2.01% +1.99% -1.40% -1.44%
7 7
JavaScript 2.20%
-0.25%
J.E.Jones
OSU CSE 2421
The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third- party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.
The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system. The definition of the TIOBE index can be found here: https://www.tiobe.com/tiobe-index//
J.E.Jones
OSU CSE 2421
C is universal;
C runs directly on the hardware, rather than requiring an Interpreter which slows down the execution speed (i.e., C runs faster than just about anything except assembly language);
It has a very powerful and varied repertoire of operators;
Elegant syntax
Ready access to the hardware when needed;
Compile once, run anytime;
Preferred language for implementing other programming languages and compilers;
Still a highly popular language. Make yourself more marketable.
J.E.Jones
OSU CSE 2421
“High Level” languages provides everything the programmer might want to do already provided for in the language (e.g. Java)
C is considered a “Middle Level” programming language. It has the capability to access the system’s low-level functions. It provides building blocks that you will need to produce the results you are being asked to provide.
“Low Level” languages (assembler) provide nothing but access to the machines basic instruction set.
J.E.Jones
OSU CSE 2421
3/7/2016 blog https://www.pluralsight.com/blog/software-
development/why-every-programmer-should-learn-c
“Before we begin, let me defend the somewhat outrageous title of this article with an analogy: You can make your own bread with a prepackaged mix, a bread machine and some electricity—or, you can assemble the raw ingredients, a mixing bowl, a stout spoon, a dough blade, fire up the oven and get some cardio through kneading. If it’s just fresh bread you’re after, the machine gets you there.
But if you want to understand the underlying process and have the most options when it comes to the final product, you need to put in the effort of the manual method. This is a lot like tackling the C programming language: You have to dig down into the flour and get your hands dusty, but you end up understanding the process at an intimate level.”
You should read the entire blog post…
J.E.Jones
OSU CSE 2421
6/19/2019 Infoworld Article:
https://www.infoWorld.com/article/3402023/why-the-c-programming- language-still-rules.html
“No technology sticks around for 50 years unless it does its job better than most anything else— especially a computer technology. The C programming language has been alive and kicking since 1972, and it still reigns as one of the fundamental building blocks of our software-defined world.”
This article compares C with other current programming languages, it’s not always a positive commentary on C, but still well worth the time to read.
J.E.Jones
OSU CSE 2421
Have you created an email account that you can use to “register” on websites that isn’t your day-to-day email account?
◦ That you can use as a valid email account – because it is ◦ That you can check out from time to time if you want
◦ That keeps a lot of spam out of your day-to-day account
Have you created an email account that you only use for job searches? That has a “professional” look?
◦ crazyhackerdude@gmail.com doesn’t cut it as a professional email address
Or do you plan to use your OSU account forever?
Just a thought…
J.E.Jones
OSU CSE 2421
Please mark your calendars for the following career fairs:
Engineering Expo 2020 (presented by Engineers’ Council)
Monday Sept 21st and Thursday September 24th
11:00 – 5:00pm, virtual via Handshake
(I hear that more information about Handshake was emailed to you last Friday)
TIMES/LOCATIONS BELOW SUBJECT TO CHANGE IF VIRTUAL
SWE Career Fair 2021 (hosted by the Society of Women Engineers, open to all engineering students)
Wednesday, February 3rd
1:00 – 6:00pm, Ohio Union
Next Day interview event: Thursday, Feb 4th (students must be invited to interview)
Spring Into Your Career Fair 2021
Tuesday, April 6th
2:00 – 5:00pm, Ohio Union – Performance Hall
“Just in time” style hiring event hosting 30‐35 employers.
J.E.Jones
OSU CSE 2421
ECS and the Office of Diversity Outreach and Inclusion have partnered to organize a Career Closet for Ohio State Engineering students.
Items donated will be available to students in the weeks leading up to the Engineering Expo.
I haven’t heard how COVID-19 has affected this program
Questions: contact Caitlin Mashhadian (mashhadian.2@osu.edu), ECS Recruiting and Events Coordinator.
J.E.Jones
OSU CSE 2421
Add these to your resume now:
◦ C programming language
◦ Experience with the gdb debugger with C and x86-64 assembly
◦ x86-64 assembly language
◦ Perform an audit of your other classes to determine if there are other items that should be added
We may also be using the gef add-on to gdb. Several students have come back from internships raving about how much it helped them. I’m trying learn enough about it, that I can incorporate it into this class this semester.
You should audit/add again before Autumn ‘21
It’s a lot of work, but until 1) you have decided that you don’t ever want/need another position and, 2) if you are let go by your current employer, you will retire, your resume should never be more than 6 months out-of-date. Just sayin’….
J.E.Jones
OSU CSE 2421
Sometimes students want me to write a letter of recommendation for them for grad school or some other purpose (e.g., Mortar Board, internships, etc.) later in their academic career.
If you think you might want me to do that for you, please let me know prior to the end of this semester. This allows me to put together a more complete letter while your stellar performance is in my short-term memory. Then 18 months from now, I’ll be able to write a compelling letter for you.
I will not write a letter of recommendation for anyone who has not completed this course (i.e. I won’t write a letter of recommendation for you during THIS semester.)
Include a photo of yourself (head/shoulders) so that I can connect a name to a face.
You must waive your rights to see the recommendation. This is typically standard practice. The acceptance committees that read the recommendations look for this to ensure that the recommendations are more truthful.
J.E.Jones
OSU CSE 2421
Going from Java to C is like going from an automatic transmission to a stick shift
Lower Level: much more is left for you to do (usually, more efficiently) Unsafe: you can set your computer on fire (hopefully, just figuratively) C standard library: much smaller
Similar syntax: can both help and confuse
Not object oriented (it’s functional): paradigm shift – this might be the hardest part
J.E.Jones
OSU CSE 2421
Java is to “paint by numbers” as
C is to “oil paint on canvas”
(They may be right. You can tell me what you think at the end of the semester.)
J.E.Jones
OSU CSE 2421
A person with a more sophisticated view of technology (I hope that describes all of you) would not ask this question, but rather, a different one:
◦ What are the advantages of C, and what are its disadvantages, and likewise, what are the advantages of Java, and its disadvantages?
◦ Where does each language make the most sense, as a tool I can use, given its strengths and weaknesses?
What’s better? A hammer or a screwdriver?
◦ Doesn’t the answer depend upon what you’re trying to accomplish?
Based on this assessment, we can make good choices about which language might be the best in each situation. This course will, hopefully, give you information to help make this type of decision.
J.E.Jones
OSU CSE 2421
Cell phones
PDAs
desktop computers Web servers
Application servers Rapid development
J.E.Jones
OSU CSE 2421
They do exactly what you tell them to do
No built-in memory management (memory leaks, OH MY!)
C allows the use of pointers, which are powerful ◦ #1:require care to use effectively and
◦ #2:rigorously logical thinking to use correctly.
C is compiled to machine code (in several steps), so the compiled program runs directly on the hardware.
Wonderfully, yet irritatingly, obedient – you type something incorrectly, and it has a way of compiling fine and just doing something you don’t expect at run-time.
◦ Think of a 3-year-old who does exactly what you tell him/her rather than what you meant.
No frills, no overhead, just raw power/speed
This is what makes it challenging
And this is what makes it fun!
J.E.Jones
OSU CSE 2421
Performance Critical Applications ◦ games*
◦ codecs
◦ Web browsers (there’s debate within the industry here)
Operating Systems (linux is mostly in C)
Compilers
Programs that operate hardware (e.g.robotics)
◦ Although some applications use assembler code for this
Networking
Just about anything where raw power and speed are required
* Google says games, but I asked a friend in the gaming industry what languages are used today, and he responded:
“In terms of pure languages, C++ is still the high runner. The Unity framework is worth looking into- lots of games are made on top of Unity. For Apple, things differ because they have total control of the App Store”, He didn’t tell me how they differ. (12/21/2017)
J.E.Jones
OSU CSE 2421
Another purpose of this course is to get a systems level view of how computer programs are written and run.
We want you to develop a better understanding of the systems software (compilers, assemblers, linkers) which plays a role in how programs actually run on the hardware.
The way that C language programs are converted to machine language instructions which can actually run on hardware, provides a “deeper” view of the relationship between a high-level language program and its execution on the hardware.
When we learn assembly language in the latter part of the course, we will also develop a better understanding of the hardware itself, and how it executes a program.
J.E.Jones
OSU CSE 2421
Purpose: to get acclimated to the stdlinux environment, PulseVPN, FastX, process for submitting labs, and (potentially) your first work with a debugger
Budget 90 minutes of uninterrupted time to complete this lab, many will need far less, but there is some reading to do.
Detailed description of the assignment and needful files are posted on Piazza.
Two Due Dates: Early (10% bonus)/Real/Late 24 hours or less (max 75% credit)
◦ This will be a feature for *each* and every lab you have
Generally, you should read and follow the instructions for the labs carefully. There will be a CONSTRAINTS section in each lab (after lab 1); READ THIS SECTION prior to coding your lab and READ IT AGAIN right before you submit your lab.
People sometimes make avoidable mistakes, and lose all the credit, or significant numbers of points because the directions for the lab (in all sections) are not followed. Following instructions is important when you have a job – and a customer, and it’s important here, too. The graders and I are your customer for this class. We will not grant you relief from errors you make because you did not read, or did not follow, the instructions. Many of these type errors will results in a grade of 0 points.
J.E.Jones