Uploaded by hohi1114

01-1Intro

advertisement
EE 209 #1:
Introduction
Computer Division, EE
2020
1
* Still is the official name
+ This is what we teach.
2
Announcements
•Instructor : Prof. John Kim (김동준)
jjk12@kaist.edu
•All announcements will be posted through
CLASSUM. Directions were sent out through
email.
•Initial lectures will be pre-recorded. We plan
on holding Q&A / office hours during regular
lectures hours
3
Today’s Class
• Overview of EE209
• Goals
• Resources
• Overview of Computers Today
• Overview of C Programming Language
4
Course Goal 1: Programming in the Large
• How to write large computer programs
• Abstraction; Interfaces and implementations
• Specifically, how to:
• Write modular code
• Hide information, manage resources, handle errors
• Write portable code
• Test and debug your code
• Improve your code’s performance (and when to do so)
• Use tools to support those activities
5
Course Goal 2: “Under the Hood”
• Learn “under the hood” of computer systems
• Specifically, two downward tours
C Language
Assembly Language
Application Program
language
levels
tour
Machine Language
Operating System
service
levels
tour
Hardware
• Goal 2 supports Goal 1
• Reveals many examples of effective abstractions
6
Course Goal 2: “Under the Hood”
• Learn “under the hood” of computer systems
• Specifically, two downward tours
C Language
Assembly Language
Application Program
language
levels
tour
Machine Language
Operating System
service
levels
tour
Hardware
• Goal 2 supports Goal 1
• Reveals many examples of effective abstractions
7
We’ll use C Programming Language
Q: Why C instead of Python?
A (Short): C supports Goals 1 and 2 better
A (Long):
• C is a lower-level language:
• More opportunities to create abstractions
• C facilitates language levels tour
• C is closely related to assembly language
• C facilitates service levels tour
• Linux is written in C
•8
We’ll use Linux OS
Q: Why Linux instead of Microsoft Windows?
A: Linux is good for education and research
• Linux is open-source and well-specified
A: Linux is good for programming
• Linux is a variant of Unix
• Unix has a rich open-source programming
environment
•9
Topics in this course
• Basic C programming
• C is a flexible, expressive, low-level programming language
• Allows you to write any kind of programs
• Programming a large program
• How to write modular & portable code
• How to test and debug your large program
• Low-level programming
• How is your C code translated and run?
• Systems environment
• What services underlying systems provide?
•10
Today’s Class
• Overview of EE209
• Goals
• Resources
• Overview of Computers Today
• Overview of C Programming Language
•11
Textbooks (Required)
• C Programming: A Modern Approach
(2nd Edition), King, 2008.
• C programming language and
standard libraries
• Computer Systems: A Programmer's
Perspective (3rd Edition), Bryant and
O'Hallaron, 2015.
• Low-level programming and systems
environments
• All books are reserved in the library
• You can use a previous edition
12
Textbooks (Recomended)
• The C Programming Language, Kernighan & Ritchie, 1988.
• Covers the C programming language
• The Practice of Programming, Kernighan & Pike, 1999.
• Covers “programming in the large”
• Programming with GNU Software, Loukides & Oram, 1997.
• Covers tools
• All books are reserved in the library
• You can use a previous edition
13
Manuals
• Manuals (for reference only, available online)
• Intel Architecture Software Developer's Manual, Volumes 1-3
• Tool Interface Standard & Executable and Linking Format
• Using as, the GNU Assembler
• Linux man command
• short for manual
• e.g., man strstr: shows a manual page for strstr()
14
Grades for EE209
• 20% Midterm
• 25% Final
• 55% Programming Assignments
15
Lab Assignments
• Initial assignments will need to be done
remotely.
• We will post more information on CLASSUM on
how to access the campus servers.
16
Programming Environment
36 Lab machines: eelab1.kaist.ac.kr ~ eelab36.kaist.ac.kr
*eelab5.kaist.ac.kr & eelab6.kaist.ac.kr are always powered on
Haedong Lounge: E3-4, Saenul-dong (새늘동) 1412
User guide:
https://ee.kaist.ac.kr/node/15074
Must read the user guide
before you start using the
machines
17
Programming Environment (cont.)
• Linux and all required software are installed
• Your account will be created soon
• ID: your student id
• Password: FQM9xk<your id> (excluding <, >)
• If you registered for the class recently, your id may not
be created. Please contact the TA (email:
taehyunkim1527@gmail.com)
• First thing to do!
• Go to the lab, boot any machine in Linux
• Log in with your account, and change your password
• Use ‘passwd’ command to change your password
• You only need to change once – all other machines will
be automatically updated
18
Programming Environment (cont.)
• Option #2 (highly recommended)
• Use your own computer
• run GNU tools run your programs locally
– e.g., Install Linux
– e.g., Install Cygwin (http://www.cygwin.com/) on Windows
– e.g., Install Linux on VMWare Player on Windows (Free)
• Option #3 (not recommended)
• Use your own computer
• run a non-GNU development environment locally;
• run your programs locally
– e.g., Visual C++
19
Putty Tutorial
1. Insert “Host Name”
 eelab#.kaist.ac.kr
2. Insert “Port”
 22
3. Choose “Connection type”
 SSH
4. Press “Open” button
5. (Press “Yes” button)
6. Insert your ID
7. Insert your PASSWORD
20
Programming Environment: Notes
• We test your program on our Lab machines.
–Cannot give grade if your program works on
your local machine but does not run on our
Lab machines.
• My recommendation:
• Use local environment for coding
• Use lab environment for testing & debugging
• First precept (or TA help session) provides
setup instructions
21
Summary
• Please be patient this semester.
• More information will be continuously posted
CLASSUM.
22
Acknowledgments
• The material provided is for course EE209 and
strictly for educational purposes.
• The material contains information in our
textbooks
• C Programming: A Modern Approach (2nd Edition),
King, 2008.
• Computer Systems: A Programmer's Perspective (3rd
Edition), Bryant and O'Hallaron, 2015.
• Some of the material came from Princeton
COS 217 (with permission)
23
Download