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

csc 2400 computer systems
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

CSC 2400: Computer Systems

Week 1 – Goals and Introduction

  • Prof. Michael Robson
slide-2
SLIDE 2

Outline

q Syllabus q Introductions q Background survey q What is a computer system?

slide-3
SLIDE 3

Syllabus

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

slide-4
SLIDE 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
slide-5
SLIDE 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

  • therwise perform dishonestly in a course, are cheating.”
slide-6
SLIDE 6

Introductions

slide-7
SLIDE 7

Background Survey

slide-8
SLIDE 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

slide-9
SLIDE 9

What is a computer system?

slide-10
SLIDE 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?

slide-11
SLIDE 11

What is a Computer?

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

Do a survey on campus

Numerous “correct” answers

slide-12
SLIDE 12

What Do Computers Do? Computers Execute Instructions.

That’s all!

slide-13
SLIDE 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

slide-14
SLIDE 14

Compilation Stages

count = 0; while (n > 1) { count++; if (n & 1) n = n*3 + 1; else n = n/2; }

00000000000000000000000000000000 00000000000000000000000000000000 01100011010101110110001101010111 00101011101011010010101110101101 11010001110111011101000111011101 00101110100111000010111010011100 11010010001111001101001000111100 11010000011111011101000001111101 11010011101010011101001110101001 11010000111111101101000011111110 11010001010000101101000101000010

High level language Assembly language Machine language

mov EAX, EDX and EAX, 1 je .else jmp .endif .else: .endif: sar EDX, 1 mov EAX, EDX add EDX, EAX add EDX, EAX add EDX, 1 add ECX, 1 .loop: cmp EDX, 1 jle .endloop jmp .loop .endloop: mov ECX, 0

slide-15
SLIDE 15

Building and Running

  • To build an executable
  • Result

! Complete executable binary file ! Machine language

  • To run:

$ gcc program.c –o xprogram $ ./xprogram 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

slide-16
SLIDE 16

How Do Computers Do It?

q You’ve got to know assembly q

Chances are, you’ll never write in assembly

  • 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
slide-17
SLIDE 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

slide-18
SLIDE 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

slide-19
SLIDE 19

A Typical Computer System

  • One or more CPUs
  • Device controllers connect

through common bus

  • Shared access to main memory

Managing all these components requires a layer of software: the operating system

slide-20
SLIDE 20

Operating System Runs Things

Operating System (OS)

System Calls

User Programs

Web Browser Music Player

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
slide-21
SLIDE 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
slide-22
SLIDE 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
slide-23
SLIDE 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

slide-24
SLIDE 24

Programming Environment

  • Linux machines felix.csc.villanova.edu, helix.csc.villanova.edu
  • Unix machines csgate.csc.villanova.edu, tanner.csc.villanova.edu

tanner csgate helix felix

Network File System

Any lab, or your own PC/Mac/Linux Computer SSH

SSH

SSH

slide-25
SLIDE 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