csc 2400 computer systems
play

CSC 2400: Computer Systems Week 1 Goals and Introduction Prof. - PowerPoint PPT Presentation

CSC 2400: Computer Systems Week 1 Goals and Introduction Prof. Michael Robson Outline q Syllabus q Introductions q Background survey q What is a computer system? Syllabus www.csc.villanova.edu/~mprobson/courses/csc2400/ Syllabus Questions


  1. CSC 2400: Computer Systems Week 1 – Goals and Introduction Prof. Michael Robson

  2. Outline q Syllabus q Introductions q Background survey q What is a computer system?

  3. Syllabus www.csc.villanova.edu/~mprobson/courses/csc2400/

  4. Syllabus Questions q Find a partner (or two) q Review the syllabus q Find three (or more) questions about the course - What’s on the syllabus - What’s not on the syllabus

  5. Academic Integrity Code Collaboration is encouraged in this course while exploring the path to a solution. However, when the time comes to write the solution, discussions and references to Internet resources are no longer appropriate. All submitted work must be your own , as per Villanova’s academic integrity code (excerpt here): “Anyone who hands in work that is not his or her own, or who cheats on a test, or plagiarizes a paper, is not learning, is receiving credit dishonestly and is, in effect, stealing from other students. As a consequence, it is crucial that students do their own work. Students who use someone else's work or ideas without saying so, or who otherwise perform dishonestly in a course, are cheating.”

  6. Introductions

  7. Background Survey

  8. CSC 2400 Survey q Familiar with Unix - Yes or No q Familiar with C - Yes or No q Familiar with C++ - Yes or No q Can compute the sum of all integers from 1 to 100 - Yes or No q Comformtable convering from binary to decimal - Yes or No q Preferred Office Hours

  9. What is a computer system?

  10. BIG Questions q What is a computer? q What is a computer system? q What do computers do? q How do they do it? q Are computers intelligent? q What will computers be like in the future?

  11. What is a Computer? Do a survey on campus Numerous “ correct ” answers q Oxford dictionary: - an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program q Cambridge dictionary: - an electronic device that can store large amounts of information and be given sets of instructions to organize and change it very quickly

  12. What Do Computers Do? Computers Execute Instructions. That ’ s all!

  13. What Kind of Instructions? Strictly speaking, computers only understand machine language (binary machine code). 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 Data plus Instructions

  14. Compilation Stages count = 0; 00000000000000000000000000000000 mov ECX, 0 while (n > 1) { 00000000000000000000000000000000 .loop: 01100011010101110110001101010111 count++; cmp EDX, 1 00101011101011010010101110101101 if (n & 1) jle .endloop 11010001110111011101000111011101 add ECX, 1 n = n*3 + 1; 00101110100111000010111010011100 else mov EAX, EDX 11010010001111001101001000111100 n = n/2; and EAX, 1 11010000011111011101000001111101 } je .else 11010011101010011101001110101001 mov EAX, EDX 11010000111111101101000011111110 add EDX, EAX 11010001010000101101000101000010 add EDX, EAX add EDX, 1 jmp .endif .else: sar EDX, 1 .endif: jmp .loop .endloop: High level Assembly language Machine language language

  15. Building and Running • To build an executable $ gcc program.c –o xprogram • Result ! Complete executable binary file ! Machine language 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 • To run: $ ./xprogram

  16. How Do Computers Do It? q You’ve got to know assembly Chances are, you’ll never write in assembly q - Compilers are much better & more patient than we are q Understanding assembly is key to understanding how computers work - Behavior of programs in presence of bugs - Tuning program performance

  17. What is a Computer System? q Wikipedia: - the combination of hardware and software which forms a complete, working computer q Cambridge dictionary: - a complete computer including the operating system (=main software) and equipment that makes it work

  18. Computer System q Computer system = hardware + system software q Computer systems hardware is comprised of 5 basic elements, as described by the Von Neumann architecture model (1945): CPU

  19. A Typical Computer System Managing all these • One or more CPUs components requires • Device controllers connect a layer of software: through common bus the operating system • Shared access to main memory

  20. Operating System Runs Things Music Web Player Browser User Programs System Calls Operating System (OS) HARDWARE q Users and programs can’t directly access the hardware - OS provides a simpler, more powerful interface - OS services can be accessed via system calls

  21. Major Course Goal q GOAL: Understand how computers work - Look under the hood - Language tour: High-level language (C) → assembly language → machine language (IA-32) - Service tour: application → Linux operating system q Byproduct: “Programming in the large” - Become better programmers

  22. Course Feature: C q Why C instead of Java? q C supports our goal better - C is a lower-level language (closer to assembly) - Linux is written in C

  23. Course Feature: Linux q Why Linux instead of Microsoft Windows? q Linux is good for education and research - open-source and well-specified q Linux is good for programming - Linux (which is a variant of Unix) has GNU, a rich open- source programming environment Linux == Unix for our purposes

  24. Programming Environment • Linux machines felix.csc.villanova.edu, helix.csc.villanova.edu • Unix machines csgate.csc.villanova.edu, tanner.csc.villanova.edu Any lab, or your own PC/Mac/Linux Computer Network SSH File System tanner csgate SSH SSH helix felix

  25. Getting Started q Check out course web site now http://www.csc.villanova.edu/~mprobson/courses/fa20-csc2400/ q Subscribe to the zyBook – Programming in C - Instructions in the syllabus q First assignment posted online Wednesday

Recommend


More recommend