winter 2015 comp 2130 introduction to computer systems computing science thompson rivers university...

Click here to load reader

Upload: ursula-wilkins

Post on 11-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

PowerPoint Presentation

Winter 2015

COMP 2130 Introduction to Computer Systems

Computing ScienceThompson Rivers UniversityIntroduction and OverviewTRU-COMP2130Introduction2Instructor: Mridula Sharma @ HL 407Office hour: 12:30-1:30 @ Tue, Thurs and by appointmentE-mail: [email protected]

Prerequisites for this course: COMP 1230 with minimum C, andCOMP 1380 with minimum C

This course is a prerequisite for COMP 3270 Computer NetworksCOMP 3410 Operating Systems

2Not the replacement of IPv6; Inter-transition mechanism; But if IPv6 would failLecture & Lab ScheduleTRU-COMP327Overview3Lecture Schedule

T, TR 2:30 pm - 3:45 pm - HOL 204

Laboratory Schedule Tuesdays 4:00 pm - 4:50 pm - OM 1350

WebsiteMridulasharma.com

Rise of QuestionsTRU-COMP2130Introduction4What is a computer system?What is an operating system?Which [programming] language is most powerful?

What are the benefits to take this course Introduction to Computer Systems? Most universities teach assembly languages, computer architecture and hardware components. You are in a computing science program, and computing science is not much about the development of hardware components.Then what?Course Outline4Not the replacement of IPv6; Inter-transition mechanism; But if IPv6 would failObjectivesTRU-COMP2130Introduction5Understand the fundamentals of computer architectureExperience programming through the powerful C programming language (using GCC - GNU compiler), probably a new programming language to youExperience programming through IA32 assembly language, another new programming language to youExperience reliable programming through the understanding of critical relationship between programming and computer architectureExperience efficient programming through code optimization

Why is one programming language, e.g., Java, not enough in computing science?Course Outline5Not the replacement of IPv6; Inter-transition mechanism; But if IPv6 would failCourse ContentsTRU-COMP2130Introduction6C programming languageBit and Boolean operationsUse of pointersUse of struct data structureDynamic memory managementFile HandlingAssembly languageIntroduction to computer systemsThe fundamentals of computer architectureHow does a computer system work?How is computer architecture related to programming?Code optimizationUse of Linux6Not the replacement of IPv6; Inter-transition mechanism; But if IPv6 would failLecture ScheduleTRU-COMP2130Introduction7Introduction to computer systemsIntroduction to C programming languageData representationsC: advanced topicsIntroduction to assembly language IA32 (Intel Architecture 32)Compiling, linking, loading, and executingDynamic memory managementCode optimizationMemory hierarchy, locality, cachingVirtual memory (if time permits)

Assessment Quiz, Labs & Assignments28%MidTerm Exams30%(3rd Feb 2105 & 10th March 2015)Final Exam40%Presentation5%

TRU-COMP2130In order to pass the course, students must achieve minimum of 50% on overall quizzes & Assignments, and minimum of 50% on the mid term and final examTRU-COMP2130- Digital Logic and Digital Systems- Computational Paradigms- Machine Level Representation of Data- Assembly Level Machine Organization - Introduction to C Programming Language- Basic Type Systems- Interfacing and Communication- Memory System Organization and Architecture- Code OptimizationCourse ModulesSeminarTRU-COMP2130Introduction10Use of LinuxC programming exercisesExercise questions about computer architecture and programmingMid terms10Not the replacement of IPv6; Inter-transition mechanism; But if IPv6 would failTextbooksTRU-COMP2130Introduction11Bryant and OHallaron, Computer Systems: A Programmers Perspective, 2/E, Prentice Hall, 2011 ISBN 10:0-13-610804-0Kernighan and Ritchie, The C Programming Language, Prentice Hall, 1988, ISBN 10: 0-13-110362-8

Questions?TRU-COMP2130Introduction12Anything that you want to know more?Any comment?Any question?

Overview Why C?TRU-COMP2130Overview13Why C?Most system programs are written in C, not even C++, for fast execution.The kernels of most operating systems are written in C.A lot of projects use C.Pros and consFast execution -\ Easy memory management - > Good for system programmingBit operation -/But a bit complex concepts of pointer, type conversion and memory allocation

How is C different from Java?

TRU-COMP2130Overview14Programming language populatiryFrom tiobe.comTIOBE Index for December 2014

ComparisonTRU-COMP2130Overview15How is C different from Java?

CJavaProcedural No class Common data: global variables Abstract data type: struct, unionObject oriented Class Common data: instance variables Abstract data type: classMicro approach Individual utility librariesMacro approach Utilities include language itselfReference type variableNo reference, but objects include the conceptCall by value; call by referenceCall by value; call by reference for objectsCompiling One file at a time, and linkingCompiling Cross-reference

Overview How a Computer WorksTRU-COMP2130Overview16How does a computer system look like?Model from the view of functions: von Neumann architecture

What happens when you turn on a computer system?Can a computer system understand a program written in C or Java?How does a program run in a computer system?

Similar to

Overview How a Computer WorksTRU-COMP2130Overview17What happens when you turn on a computer?Power on, then?-> Electric signal-> CPU will start executing instructions from a particularly fixed address.BIOSMBROS

CPU reads one instruction from memory at a time and executes the instruction. This cycle, called instruction cycle, repeats forever.Fetch andExecution

Overview How a Computer WorksTRU-COMP2130Overview18Can a computer understand a program written in C or Java?How does a program run in a computer?A program is a collection of data and codes.Compile and link

Load and executeMulti-programming?

Overview How a Computer WorksTRU-COMP2130Overview19What hardware components do we need to run programs in a computer system?Four major components:CPUMain memoryI/O devicesKeyboardMouseMonitorHard diskSystem buses

Overview How a Computer WorksTRU-COMP2130Overview20User programs write data into the main memory and read data from the main memory. It is very important to protect OS codes and data stored in the main memory from user programs. What does this mean?Why is this very important for Operating Systems?How to protect?By using hardware supports and interrupts

The architectures of computer systems have very close relations with OSes and programs.

We will studyCPU, main memory, interrupts, instructions, and making efficient use of programming concepts.