1 / 13

General information

Learn the basics of computer architecture, assembly language programming, and low-level systems-related programming through hands-on experience. Gain a deeper understanding of data, programming in C, binary files, system calls, and low-level issues in program development.

agutierrez
Download Presentation

General information

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. General information Course web page: http://www.cs.bgu.ac.il/~caspl142 Instructors: Prof. Eyal Shimony (course coordinator)‏ Office hours: Wed. 12-14 (for now) Building 37 (Alon High-Tech), Room 216 Prof. Ehud Gudes TAs: TamirGrossinger, Marina Sadetsky Lab TAs: Ehud Apsel, AchiyaElyasaf, JumanaNassour, MajidKassis, Liat Cohen, Benny Lutati. LiorFiegalevich, Avraham Hayoun, Daniel Zatulovsky, Mark Abashkin, Syllabus: (see web page)‏

  2. Goals and Expectations Architecture and Assembly Language • Computer organization: • Basic Principles • Case study: 80X86 • Computer architecture: • Principles • Case study: 80X86 • Assembly and machine language • Principles • HANDS ON experience: 80X86 • Integration and applications SP lab • Low-level systems-related programming via hands-on experience • Really understanding data Learning how to RTFM

  3. SP Lab Issues • Programming in C: understanding code and data (including pointers). • Binary files: data structures in files, object code, executable files (ELF). • System calls: process handling, input and output. Direct system calls. • Low-level issues in program developement: debugging, patching, hacking. Done through: • Reasoning/exploration from basic principles. • Implementation of small programs (in C). • Interacting with Linux OS / systems services.

  4. IMPORTANT Lessons At the end of the course, Only REALLY need to KNOW* two things: 1) How to RTFM 2) There is no magic** * KNOW: in "intelligent agent behaviour consistent with knowledge" meaning. ** Ref: Pug the magician

  5. Why Bother? Why bother? All software today is in JAVA or some other HLL anyway? • Essential for understanding (lower level of) COMPILERS, LINKERS, OS. • Architecture has impact on performance. Writing a program for better PERFORMANCE, even in a HLL, requires understanding computer architecture. • Some EMBEDDED CPUs: only assembly language available • Some code (part of the OS) STILL done in assembly language. • Better understanding of security aspects. • Viruses and anti-viruses. • Reverse engineering, hacking, and patching. • Everything is data.

  6. Role of Course in Curriculum • Understanding of PHYSICAL implementations of structures from data-structures course. • Can be seen as high-level of ``Digital Systems'' course. • Understanding of computer operation at the subsystem level. • Leads up to ``Compilers'‘ and “Operating Systems” as an ``enabling technology'‘ • Compilers course - compilers use assembly language or machine code as end product. • Systems programming – the programmer’s interface to the OS.

  7. Course outline LECTURES (including SPlab (*))‏ • *Introduction to course and labs (week 1)‏ • Basic architecture and LOW-LEVEL programming issues. (weeks 1-7)‏ • *Linux system services, shell (Week 8)‏ • Assembly programming (weeks 9-10)‏ • *ELF format, linking/loading (week 11)‏ • Advanced LOW-LEVEL prog. (wks 12-14)‏ • Intro to communication (weeks 14-15)‏ LABS: • Simple C programs (weeks 1-6)‏ • System calls (weeks 6-7)‏ • Command interpreter (weeks 8-11)‏ • Handling ELF files (weeks 12-14)‏

  8. Programmer's View of Computing To program a computer: • Write a program in a source language (e.g. C)‏ • COMPILER converts program into MACHINE CODE or ASSEMBLY LANGUAGE • ASSEMBLER converts program into MACHINE CODE (object code file)‏ • LINKER links OBJECT CODE modules into EXECUTABLE file • LOADER loads EXECUTABLE code into memory to be run Advanced issues modify simplified model: • Dynamic linking/loading • Virtual memory

  9. Program Execution Basics(von-Neumann Architecture)‏ FETCH EXECUTE Computer executes a PROGRAM stored in MEMORY. Basic scheme is - DO FOREVER: • FETCH an instruction (from memory). • EXECUTE the instruction. This is the FETCH-EXECUTE cycle. More complicated in REAL machines (e.g. interrupts).

  10. MEMORY Block Diagram of a Computer CENTRAL PROCESSING UNIT (CPU)‏ INPUT-OUTPUT (I/O)‏

  11. Data Representation Basics BYTE BYTE BYTE BYTE 32 BIT WORD WORD HALF WORD 2 WORDS BYTE BYTE BYTE BYTE BYTE Bit - the basic unit of information: (true/false) or (1/0) Byte - a sequence of (usually) 8 bits Word - a sequence of bits addressed as a SINGLE ENTITY by the computer (in various computers: 1, 4, 8, 9, 16, 32, 36, 60, or 64 bits per word)‏ Character 6-8 bits (ASCII), 2 bytes, etc. Instructions?

  12. Refined Block Diagram CENTRAL PROCESSING UNIT (CPU)‏ MEMORY CONTROL 32 ADDRESS / / DATA 32 INPUT-OUTPUT (I/O)‏ DEVICE DEVICE

  13. CTRL RD/~WR MEMORY DATA IN/OUT / ADDR / W K Basic Principles:Address Space Physical (meaningful) addresses WORD 2n-1 ADDR. SPACE WORD 2K -1 PHYSICAL MEMORY ! WORD 0

More Related