... | ... | @@ -72,3 +72,103 @@ |
|
|
2. machine독립적인 코드이다.
|
|
|
3. .NET Framework에서는 이를 MSIL로 부른다.
|
|
|
4. .NET Framework에서 source code가 타깃 머신의 native code로 변환되는 과정은 아래 그림과 같다.
|
|
|
|
|
|
##### Virtual Execution System (VES) is:
|
|
|
1. CLI에 맞춰 작성된 프로그램을 로드하고 실행하는 시스템이다.
|
|
|
2. 코드가 실행함에 있어 필요로 하는 모듈들을 연결하기 위해 meta-data를 사용하여 manage code 및 data를 실행한다.
|
|
|
3. .NET Framework에서 CLR을 통해 제공한다.
|
|
|
|
|
|
##### Common Intermediate Language (CIL) is:
|
|
|
1. Virtual Execution System (VES)에 의해 해석되는 중간 언어로 자바의 byte-code에 해당한다.
|
|
|
2. machine독립적인 코드이다.
|
|
|
3. .NET Framework에서는 이를 MSIL로 부른다.
|
|
|
4. .NET Framework에서 source code가 타깃 머신의 native code로 변환되는 과정은 아래 그림과 같다.
|
|
|
|
|
|
### CLR (Common Language Runtime)
|
|
|
|
|
|
CLI명세를 기반으로 Microsoft에서 작성한 Virtual Execution System을 CLR이라 한다
|
|
|
.Net Framework의 핵심 중의 핵심으로 코드를 실행하고 메모리를 자동 관리하며 형식의 안정성을 보장하는 등 여러 가지 실행시간 서비스(환경)를 제공한다.
|
|
|
|
|
|
##### A common runtime for all .NET languages
|
|
|
1. Common type system (CTS)
|
|
|
2. Common metadata
|
|
|
3. Intermediate Language (IL) to native code compilers
|
|
|
4. Memory allocation and garbage collection
|
|
|
5. Code execution and security
|
|
|
|
|
|
##### CLR Execution model
|
|
|
todo-이미지 추가
|
|
|
|
|
|
##### Execution engine
|
|
|
1. Compiles Microsoft Intermediate Language (MSIL) into native code
|
|
|
2. Handles garbage collection
|
|
|
3. Handles exception
|
|
|
4. Enforces code access security
|
|
|
5. Handles verification
|
|
|
|
|
|
##### Advantages of CLR
|
|
|
1. Interoperation between managed code and unmanaged code (COM, DLLs)
|
|
|
2. Managed code environment
|
|
|
3. Improved memory handling
|
|
|
4. Improved "garbage collection"
|
|
|
5. JIT allows code to run in a protected environment as managed code
|
|
|
6. JIT allows the IL code to be hardware independent
|
|
|
7. CLR also allows for enforcement of code access security
|
|
|
8. Access to Metadata
|
|
|
|
|
|
|
|
|
### Framework Class Library (FCL) vs. Base Class Library (BCL)
|
|
|
|
|
|
The Base Class Library (BCL) is literally that, the base. It contains basic, fundamental types like System.String and System.DateTime.
|
|
|
|
|
|
The Framework Class Library (FCL) is the wider library that contains the totality: ASP.NET, WinForms, the XML stack, ADO.NET and more. You could say that the FCL includes the BCL.
|
|
|
|
|
|
### Assembly
|
|
|
|
|
|
C#.VB.Net 및다른.Net 언어들로짜여진소스코드를컴파일하여생성되는결과인.exe or .dll파일을Assembly라고한다.
|
|
|
|
|
|
##### Assembly 구조:
|
|
|
todo-이미지추가
|
|
|
|
|
|
##### Assembly 실행과정:
|
|
|
1. 어셈블리가CLR로로드된다.
|
|
|
2. CLR은manifest 포함된정보를기반으로다양한작업을수행한다.
|
|
|
3. 그런다음보안요구사항이충족되면CLR은JIT(Just In Time) 컴파일을수행하여IL 코드를(Native Code)로변환한다.
|
|
|
|
|
|
|
|
|
|
|
|
### Managed vs. Unmanaged
|
|
|
|
|
|
##### Managed code is:
|
|
|
1. CLR executed code is called managed code. (any .NET language)
|
|
|
Code that contains enough information to allow the CLI to provide a set of core services
|
|
|
2. Represents programming code in the low level language MSIL.
|
|
|
3. Contains metadata
|
|
|
4. Description of classes
|
|
|
A. Interfaces
|
|
|
B. Properties
|
|
|
C. Fields
|
|
|
D. Methods
|
|
|
E. Parameters
|
|
|
5. Protected from irregular use of types (type-safe)
|
|
|
6. Portable between different platforms (Windows, Linux, Max OS x, etc.)
|
|
|
|
|
|
|
|
|
##### Managed data is:
|
|
|
1. Data that is allocated and released automatically by the CLI, through a process called garbage collection
|
|
|
|
|
|
##### Unmanaged code is:
|
|
|
1. No protection of memory and type-safety
|
|
|
2. Doesn't contain metadata
|
|
|
3. Compiled to machine-dependent code.
|
|
|
|
|
|
|
|
|
|
|
|
# .Net , C#, Visual Studio, OS
|
|
|
|
|
|
| .NET | 1.0 | 1.1 | 2.0 | 3.0 | 3.5 | 4.0 | 4.5 | 4.6 |
|
|
|
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
|
| C# | 1.0(2002/01)속성대리자값타입 | N/A | 2.0(2005/11)제네릭 | N/A | 3.0(2007/11)링큐람다.확장메소드표현트리 | 4.0(2010/04)동적바인딩 | 5.0(2012/08)Async | 6.0(2015/?) |
|
|
|
| Visual Studio | 2002 | 2003 | 2005 | | 2008 | 2010 | 2013 | 2015 |
|
|
|
| CRL | 1.0 | 1.1 | 2.0 | WCFWPF | LINQ | 4.0parallel | Asynchronousmodel | |
|
|
|
| Windows OS | N/A | svr2003 | svr2003 R2 | vistasvr2008 | 7,Svr2008 R2 | N/A | 8, 10svr2012 | | |
|
|
\ No newline at end of file |