1 Machine architecture Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Chapter 2.

Slides:



Advertisements
Similar presentations
Chapt.2 Machine Architecture Impact of languages –Support – faster, more secure Primitive Operations –e.g. nested subroutine calls »Subroutines implemented.
Advertisements

Computer Organization and Architecture
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
CSE115: Introduction to Computer Science I
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
Computer Systems. Computer System Components Computer Networks.
PZ13A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ13A - Processor design Programming Language Design.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Chapter 2.2 Machine Language.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
COMPUTER ORGANIZATIONS CSNB123 May 2014Systems and Networking1.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Instruction Set Architecture
Computer Science 210 Computer Organization The von Neumann Architecture.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Chapter 4 The Von Neumann Model
Part 1.  Intel x86/Pentium family  32-bit CISC processor  SUN SPARC and UltraSPARC  32- and 64-bit RISC processors  Java  C  C++  Java  Why Java?
General Concepts of Computer Organization Overview of Microcomputer.
Fetch-execute cycle.
Lecture 7: 9/17/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
ECEG-3202 Computer Architecture and Organization Chapter 7 Reduced Instruction Set Computers.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Dale & Lewis Chapter 5 Computing components
1 Machine architecture Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Chapter 2.
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Computer Organization Instructions Language of The Computer (MIPS) 2.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
The Processor & its components. The CPU The brain. Performs all major calculations. Controls and manages the operations of other components of the computer.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
CHAPTER 4 VARIABLES & BINDING SUNG-DONG KIM DEPT. OF COMPUTER ENGINEERING, HANSUNG UNIVERSITY.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Chapter 3 Getting Started. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To give an overview of the structure of a contemporary.
1 Processor design Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 11.3.
Chapter 4 Variables & Binding
CPU Organisation & Operation
A Closer Look at Instruction Set Architectures
Computer Science 210 Computer Organization
Lecture on Microcomputer
Overview Introduction General Register Organization Stack Organization
Chapter 14 Instruction Level Parallelism and Superscalar Processors
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
The fetch-execute cycle
Computer Science 210 Computer Organization
CSCE Fall 2013 Prof. Jennifer L. Welch.
Topic 6 LC-3.
The Little Man Computer
PZ01C - Machine architecture
Chapter 4 The Von Neumann Model
CSCE Fall 2012 Prof. Jennifer L. Welch.
Introduction to Microprocessor Programming
Principles of Programming Languages
Processor design Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 11.3.
Program Execution.
A Level Computer Science Topic 5: Computer Architecture and Assembly
Computer Architecture
Processor design Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 11.3.
Algoritmos y Programacion
Chapter 4 The Von Neumann Model
Presentation transcript:

1 Machine architecture Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Chapter 2

2 Typical machine design Two cycles: Fetch cycle - get instruction Execute cycle - do operation

3 Typical machine execution  Typical fetch cycle: (M(x) means contents of x)  1. M(IC)  MAR [Memory Address register]  2. IC +1  IC [Instruction Counter]  3. Read memory into MDR [Memory Data Register]  4. MDR  IR [Instruction Register for decoding]  Typical execute cycle: (OP R,X, DISP is instruction)  1. IR decoded into OP R, EA –OP is operation code (e.g., 8 bits) –R is register (e.g., 4 bits registers) –EA is effective address (e.g., 20 bits)  2. M(X)+DISP  MAR (EA  MAR)  3. Read memory into MDR  4. M(R)  ALU; M(MDR)  ALU  5. Do operation OP in ALU; ALU  R  For 500 MHZ: Each instruction 9-10 cycles (50 MIPS)  By overlapping fetch and execute cycles, get MIPS

4 Typical machine translation  For example in C: As we see later, memory for data in blocks of storage pointed to by a register:  X = Y + Z  could be translated as:  load R1, R2, 28[Location of Y]  add R1, R2, 40 [Location of Z]  store R1, R2, 24[Location of X] Instruction format: Opcode register, index, offset load R1, R2, 24

5 Software architectures  Previously  Build program to use hardware efficiently.  Often use of machine language for efficiency.  Today  No longer write directly in machine language.  Use of layers of software.  Concept of virtual machines. Each layer is a machine that provides functions for the next layer.

6 Virtual Machines Example: Web application

7 Binding and Binding Time  Binding : program element 에 속성 또는 수행에 필요한 요소를 연결하는 것  예 :: 변수  형 (type), 기억장소 (memory), 값, …  Binding time : Binding 이 일어나는 시간 –Execution time (run time) :: 기억장소나 값 On entry to a subprogram or block :: C, C++ 의 형식인자와 실질인 자의 연결 At arbitrary points during execution ::: LIS, SMALLTALK, ML, Java –Translation time Bindings chosen by the programmer ::: 변수이름, 형, Bindings chosen by the translator ::: C 의 integer 크기, memory class 에 따른 기억위치, array 의 저장방법 ??? Bindings chosen by the loader (linker) ::: external 변수의 참조

8 Binding time (Cont.)  Language Implementation time –One’s complement ? 2’s complement – 연산자의 구현 방법, ….  Language Definition time –Data structure types, statement forms,..  예 ::: X=X+10 –X 의 형 translation time  C, C++, Java, Ada Run time  LISP, SMALLTALK, PERL –X 에 넣을 수 있는 값의 집합 –X 의 값 –10 의 표현 … 언어정의 시 (10  정수, ’10’), 언어구현 시 (10 의 표현 ) –‘+’ 의 의미 ‘+’  addition( 언어정의 시 ), overload 해결 (compile 시 ), 더하기가 구현 되는 방법 (implementation time), 실제연산 (execution time)

9 Binding time and languages  C, C++, Ada, FORTRAN   translation time binding (early binding)  LISP, ML, Perl, HTML  runtime binding (late binding)  Binding and scope rule

10 최근 경향  CISC -> RISC -> CISC (Pentium 으로 CPU 는 통일 ???)  Multi-core microprocessor : dual-core, twin core –Chip-level multiprocessing –Thread-level parallelism – 법률적 문제 !!!!  분산처리, Multi-processing  P2P  Grid Computing  Global network 환경에서 거대한 Grid 에 기반한 분산 처리 –Sensor network –Random, Small World, Scalable network  Service-oriented architecture  Event-driven approach  JINI of SUN,.Net of Microsoft