1. 程式人生 > >CS213 ICS of CMU Part-1 Overview

CS213 ICS of CMU Part-1 Overview

Overview and Big picture:

Usage of system knowledge:

1.How hardware and software combine to support the application programs?

2.How to best use ur resources as a programmer?

3.How to find and terminate bugs effciently?

4.How to be prepared of later system classes(OS,Networks,CA,Embedded System,etc) in CS?

Abstraction?:

Abstration is good (ADT & Asymptotic analysis漸進式分析).But it also has limits especially when it comes to debugging,understanding the underlying implementations and more things.

Realities:

-Int is not integer and float is not real

-not every (int)x  has this property "x^2 >= 0"

-float oprations is not combinative."(x+y)+z=x+(y+z)" is not true.

-U'd better got to know Assembly because it's key to machine-level execution model.

-Random Access Memory is an unphysical abstraction.Memory is bounded.Memory referencing bugs is pernicious.Meanwhile,memory performance is not uniform.For instance, cache and virtual memory is very different. 

//memory referencing bug example
typedef struct {
  int a[2];
  double d;
} struct_t;

double fun(int i) {
  volatile struct_t s;
  s.d = 3.14;
  s.a[i] = 1073741824; /* Possibly out of bounds */
  return s.d;
}
/*
fun(0) --> 	3.14
fun(1) --> 	3.14
fun(2) --> 	3.1399998664856
fun(3) --> 	2.00000061035156
fun(4) --> 	3.14
fun(6) --> 	Segmentation fault
*/

-C and CPP don't provide memory protection which can lead to nasty bugs so we have to prospect and predict which kind of memory bugs will occur in our .c or .cpp file.

-

ICS in bupt has 4 las to cope with:

0.自搭linux環境(已經安排了雙系統了)

1.Work alone on each lab assignment.

2.Using email to hand projects before Wednesday.

3.Autograding and scoreboard for lab2&3

4.基礎、炸彈、溢位、I/O四次實踐,人工驗收與機器自動給分

5.ICS:平時作業課堂測驗30% 期中考試10% 期末考試60%,2學分

   ICS practicum:實驗驗收60%,實驗報告40%,0.5學分