Handout 1, Course Outline

advertisement
CS 201
HM
COMPUTER SYSTEMS PROGRAMMING
HO 1
Handout 1
Course Title:
Time and Place:
Date first, last class:
Homework:
Instructor:
Class material:
CCUT
(5/6/2015)
Computer Systems Programming, CS 201, Spring 2015 CCUT
Mondays Beihu 1412 4th period, Thursdays Beihu 1420 2nd period
first class Monday May 11, 2015; last class Thursday June 18, 2015
to be emailed by the due date before start of class
Dr. Herbert G. Mayer (Herb), cell 503 750-5038
herb@cs.pdx.edu also: herbert.g.mayer@gmail.com
http://web.cecs.pdx.edu/~herb/ → Class Information → CS 201 …
Prerequisites: CS 162, good C programming skills, some assembly language knowledge
Recommended textbooks and required on-line reading:
1. Continue using the text book recommended by your Chinese teacher, Dr. Xiao Yie
2. Computer Systems: A Programmer's Perspective, 2nd edition, Bryant and O'Hallaron, Prentice
Hall, ISBN-13: 978-0-13-610804-7, © 2011. This text is not required, but recommended.
3. Also recommended: The C Programming Language, 2nd edition, Kernighan and Ritchie,
Prentice Hall, ISBN 0-13-110362-8, © 1988 or newer.
4. Read the on-line lecture notes LN xx, with xx standing for the number and title; see Table 3.
5. Read the Unix on-line man pages; see MAN xx scheduled in Table 3.
6. Read Stroustrup’s advice: http://www.stroustrup.com/bs_faq2.html#evaluation-order
Goals: Introduce computer systems from a software developer’s perspective. Solidify your C
language comprehension, and teach some assembly language programming. Show how to
measure and improve program performance based on machine architecture. Upon successful
completion of this course students will have mastered most of these learning goals:
 Describe basic computer system organization including the operating system (processes, files,
virtual memory) and underlying hardware (CPU, registers, memory hierarchy).
 Describe the compilation process and SW components (preprocessing, assembling, compiling,
and linking) and the function of object/executable files and shared libraries, as well as basic
system utilities such as debuggers.
 Write C programs to illustrate basic systems programming concepts, including file I/O, system
calls, memory management, exception handling and process management.
 Perform arithmetic in hexadecimal, decimal, octal, and binary notation.
 Explain internal representation of integer, characters, floating point data types, and of arrays,
pointers, and structures.
 Describe the instruction set for Intel x86 http://www.cs.cmu.edu/~410/doc/intel-isr.pdf, or see
Sun SPARC http://www.cse.scu.edu/~atkinson/teaching/sp05/259/sparc.pdf, including the
arithmetic/logic instructions, registers, memory model and addressing, and control instructions.
 Explain how high-level programming constructs such as loops and stack-based function calls
are implemented in underlying machine code.
 Explain exceptions, traps, and context switches.
 Explain the performance impact of hardware features such as pipelining, and architecture
principles such as memory locality.
 Use profiling and timing facilities to identify performance bottlenecks in C programs.
Course Description: Introduction to computer systems from a system programmer’s view.
Topics include machine organization and architecture, system programming using C and assembly
language; introduction to system programming tools; data representation (bits, bytes, characters,
integers, floating point numbers); understanding the flow of control, procedures, and complex
data types at machine level; linking and loading; exceptions and interrupts; process control and
signals; system calls; file I/O; timing and improving program performance; introduction to
memory hierarchy, dynamic memory allocation techniques.
1
HO 1
CS 201
HM
COMPUTER SYSTEMS PROGRAMMING
HO 1
CCUT
Grading and Homework (HW): During Herb’s 6-week tenure, you can accumulate a total of 200
points by writing 2 homeworks, each worth 100 points.
Microsoft assembler: http://msdn.microsoft.com/en-us/library/hb5z4sxd(v=vs.100).aspx is
available in the CS computer Lab as part of Visual Studio. Walk up to an available computer and
study carefully C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC> ml /? This is purely FYI.
Extra Credit: is a way to improve your grade by up to a half level. Extra Credit is granted for
good ideas emailed or expressed in class, for constructive questions and contributions in class,
identification of errors in lecture notes, hand-outs, homework assignment; even the slightest typo
–but only pointed out for the first time– is worth some extra credit. As a purely voluntary effort,
starting about week 3, students may present extra credit topics in class. Possible topics:
Table 2: Grade schedule
A
>= 90%
B
>= 80%
C
>= 70%
D
>= 60%
F
< 60%
Top and bottom 15% in most rubrics create + and – variations of the grades; but there is no A+.
Table 3: Order of topics, reading assignments, homework dates, Midterm date etc.
Week #, date
Deadlines, Reading Material, Key Dates
1
Introduction; scope and storage attributes; argc argv envp, C highlights; LN 2;
MAN strings; read K&R chapter 5.10 argc argv envp
2
computer organization, registers, memory, CPU; parameter passing; LN 3; MAN
setenv; MAN system; compiling, linking, external names; C preprocessor;
computer taxonomy; LN 4; LN 5; MAN shell builtins
3
data formats: int, float, char; integer bases 8 10, hex; LN 6; LN 7; MAN stdlib;
recursion; introducing Microsoft assembler masm; Intel x86 or SPARC
architecture intro; LN 8; MAN malloc; MAN time
4
data cache design; LN 9; MAN getpid(); MAN getppid();in-depth Intel x86
architecture; LN 10; LN 11; MAN sys/types; fork() and execve(); LN 12; MAN
unistd;
5
LN 13; MAN ps; LN 14; VMM; call, return, nested calls, recursion in asm; LN
15; LN 17
6
discuss heap space, graph implementation; LN 16; VMM, abort, exceptions; LN
19
LN xx means:
MAN xx means:
required reading of lecture note xx ... from the CS 201 website
required reading of Unix man-page for subject xx
2
HO 1
Download