CSE 333 Lecture 1 - Systems programming

Similar documents
CSE 333 Lecture 1 - Systems programming

CMPSC 311- Introduction to Systems Programming Module: Systems Programming

CMPSC 311- Introduction to Systems Programming Module: Systems Programming

CMPSC 311- Introduction to Systems Programming Module: Systems Programming

CS240: Programming in C

Welcome to CS 241 Systems Programming at Illinois

Spring 2017 :: CSE 506. Introduction. Nima Honarmand

Compilers for Modern Architectures Course Syllabus, Spring 2015

Intro to Intro to Software Engineering

Operating Systems, Spring 2015 Course Syllabus

378: Machine Organization and Assembly Language

Operating Systems (ECS 150) Spring 2011

CSci Introduction to Operating Systems. Administrivia, Intro

Introduction to Computer Systems

CS 113: Introduction to

Staff. Advanced Operating Systems. Why are you here? What can you expect?

Advanced Operating Systems. COMP9242 Introduction

CSE 240 Introduction to Computer Architecture

TA hours and labs start today. First lab is out and due next Wednesday, 1/31. Getting started lab is also out

Fundamentals Large-Scale Distributed System Design. (a.k.a. Distributed Systems 1)

Object Oriented Programming

Welcome to CS 241 Systems Programming at Illinois

Lecture 1: January 22

CS 326: Operating Systems. Lecture 1

Chris Riesbeck, Fall Introduction to Computer Systems

CIS 3308 Web Application Programming Syllabus

CSE 240 Introduction to Computer Architecture

CSC 443: Web Programming

Introduction (1) COMP 520: Compiler Design (4 credits) Alexander Krolik MWF 13:30-14:30, MD 279

Announcements. 1. Forms to return today after class:

Introduction to Computer Systems

CSci 5103 Operating Systems. Jon Weissman. Administrivia

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering?

Compiling Techniques

CSE 374 Programming Concepts & Tools

CSE 333 Lecture server sockets

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1,2 and 3, Spring 2017

INFSCI 1017 Implementation of Information Systems Spring 2017

Discussion CSE 224. Week 4

CS 241 Data Organization using C

CS 241 Data Organization. August 21, 2018

CSE 374 Programming Concepts & Tools

Introduction to Computer Systems

University of Maryland at College Park Department of Geographical Sciences GEOG 477/ GEOG777: Mobile GIS Development

Administrivia. Minute Essay From 4/11

Practical Programming Methodology

Introduction to Parallel Computing

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

Lecture 1: January 23

CPSC 427a: Object-Oriented Programming

Overview of the ECE Computer Software Curriculum. David O Hallaron Associate Professor of ECE and CS Carnegie Mellon University

EECS 482 Introduction to Operating Systems

CSE 333. Lecture 1 - Intro, C refresher. Hal Perkins Paul G. Allen School of Computer Science & Engineering University of Washington

FULL STACK FLEX PROGRAM

Advanced Operating Systems. COMP9242 Introduction

MODERNIZATION C++ Bjarne Stroustrup, creator of C++

Staff. Advanced Operating Systems. Why are you here? What can you expect?

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

San José State University College of Science/Department of Computer Science CS 152, Programming Language Paradigms, Section 03/04, Fall, 2018

Course and Unix Intro

Introduction to Concurrency

INFS 2150 (Section A) Fall 2018

CSE 504: Compiler Design

COSC 115A: Introduction to Web Authoring Fall 2014

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

CS120 Computer Science I. Instructor: Jia Song

COMP 117: Internet-scale Distributed Systems Lessons from the World Wide Web

CS50 Quiz Review. November 13, 2017

ESET 369 Embedded Systems Software, Spring 2018

Introduction to System Programming

Distributed Systems CS6421

Full Stack Web Developer Nanodegree Syllabus

ESET 369 Embedded Systems Software, Fall 2017

CS 240 Fall Mike Lam, Professor. Just-for-fun survey:

IT 252 Computer Organization and Architecture. Introduction. Chia-Chi Teng

Syllabus of ENPM 691: Secure Programming in C

Computer Systems Architecture I. CSE 560M Lecture 17 Guest Lecturer: Shakir James

Computer Organization & Assembly Language Programming (CSE 2312)

Beijing Jiaotong University CS-23: C++ Programming Summer, 2019 Course Syllabus

Here to take you beyond. ECEP Course syllabus. Emertxe Information Technologies ECEP course syllabus

COMP1917: Computing 1 1. Introduction

6.S096 Lecture 10 Course Recap, Interviews, Advanced Topics

Computer Systems Organization

Holberton takes on full-stack software engineering with a project based approach, we have a mission to cultivate community and encourage innovation.

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Performance, memory

Systems I: Programming Abstractions

Overview of the Class

today what is this course about? what is this course about? Welcome to CSC309! Programming on the Web APRIL 05

CS 6371: Advanced Programming Languages

JavaScript Fundamentals_

Syllabus COSC-051-x - Computer Science I Fall Office Hours: Daily hours will be entered on Course calendar (or by appointment)

Welcome to... CS113: Introduction to C

Elementary Computing CSC /01/2015 M. Cheng, Computer Science 1

CIS* Programming

1. Introduction. Course Web Site. COMP1917: Computing 1. Textbook. Occupational Health and Safety (OHS)

:11 PM. This course will have a significant project component. Lecture time will be used primarily for:

FULL STACK FLEX PROGRAM

BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus

Object-Oriented Programming CSCI-UA

FULL STACK FLEX PROGRAM

Transcription:

CSE 333 Lecture 1 - Systems programming Hal Perkins Department of Computer Science & Engineering University of Washington

Welcome! Today s goals: - introductions - big picture - course syllabus - setting some expectations

Us Hal Perkins Cortney Corbin Soumya Vasisht

Welcome! Today s goals: - introductions - big picture - course syllabus - setting some expectations

Course map: 100,000 foot view C application C++ application Java application OS / app interface (system calls) HW/SW interface (x86 + devices) C standard library (glibc) C++ STL / boost / standard library operating system hardware JRE CPU memory storage network GPU clock audio radio peripherals

Software System A platform, application, or other structure that: - is composed of multiple modules the system s architecture defines the interfaces of and relationships between the modules - often is complex in terms of its implementation, performance, management - hopefully has requirements performance, security, fault tolerance, data consistency

A layered view provides service to layers above client client client your system understands and relies on layers below layer below layer below

A layered view more useful, portable, reliable abstractions client client client your system constrained by performance, footprint, behavior of the layers below layer below layer below

Example system Operating system - a software layer that abstracts away the messy details of hardware into a useful, portable, powerful interface - modules: file system, virtual memory system, network stack, protection system, scheduling subsystem,... each of these is a major system of its own! - design and implementation has tons of engineering tradeoffs e.g., speed vs. (portability, maintainability, simplicity)

Another example system Web server framework - a software layer that abstracts away the messy details of OSs, HTTP protocols, and storage systems to simplify building powerful, scalable Web services - modules: HTTP server, HTML template system, database storage, user authentication system,... - also has many, many tradeoffs programmer convenience vs. performance simplicity vs. extensibility

Systems programming The programming skills, engineering discipline, and knowledge you need to build a system - programming: C / C++ - discipline: testing, debugging, performance analysis - knowledge: long list of interesting topics concurrency, OS interfaces and semantics, techniques for consistent data management, algorithms, distributed systems,... most important: deep understanding of the layer below quiz: how many copies of your data are made when you use the read( ) system call to read from a file?

Programming languages Assembly language / machine code - (approximately) directly executed by hardware - tied to a specific machine architecture, not portable - no notion of structure, few programmer conveniences - possible to write really, really fast code - necessary for a few critical parts of the operating system - extraordinarily painful and fragile

Programming languages Structured but low-level languages (C, C++) - hides some architectural details, is mostly portable, has a few useful abstractions like types, arrays, procedures, objects - permits (forces?) programmer to handle low-level details like memory management, locks, threads - low-level enough to be fast and to give the programmer control over resources double-edged sword: low-level enough to be complex, error-prone a useful shield: engineering discipline

Programming languages High-level languages (Python, Ruby, JavaScript,...) - focus on productivity and usability over performance - powerful abstractions shield you from low-level gritty details (bounded arrays, garbage collection, rich libraries,...) - usually interpreted, translated, or compiled via an intermediate representation - slower (by 1.2x-10x), less control

Discipline Cultivate good habits, encourage clean code - coding style conventions - unit testing, code coverage testing, regression testing - documentation (code comments, design docs) - code reviews Will take you a lifetime to learn - but oh-so-important, especially for systems code avoid write-once, read-never code

Knowledge Tools - gcc, gdb, g++, objdump, nm, gcov/lcov, valgrind, IDEs, race detectors, model checkers,... Lower-level systems - UNIX system call API, relational databases, map/reduce, Django, jquery,... Systems foundations - transactions, two-phase commit, consensus, RPC, virtualization, cache coherence, applied crypto,...

Welcome! Today s goals: - introductions - big picture - course syllabus - setting some expectations

C / C++ programming Major focus of this course - ~2 weeks of diving deeper into C review some material from 351 and go deeper - ~4 weeks of a (sane subset) of C++ - exposure to programming tools unit testing frameworks, performance profiling and analysis, revision control systems

Interacting with UNIX and standard libraries The layers below we will be relying on - learn C s standard library and some of C++ s STL including memory management (malloc/new, free/delete) we ll look at some of C++11 and boost - learn aspects of the UNIX system call API I/O: storage, networking process management, signals

Potential additional topics Concurrency - threads - perhaps asynchronous I/O and event-driven programming Security - will be mindful of security topics as they come up - e.g., how to avoid buffer overflow issues in C/C++

Welcome! Today s goals: - introductions - big picture - course syllabus - setting some expectations

What you will be doing Attending lectures and sections - lecture: ~25 of them, MWF here - sections: ~9 of then, Thu 9:40, also here - Take notes!!! Don t expect everything to be on the web Doing programming projects - ~4 of them, successively building on each other - includes C, C++; files, networking Doing programming exercises - one per lecture, due before the next lecture begins - coarse-grained grading (0, 1, 2 or 3)

Project Deadlines Goal: keep everyone on schedule, consistent at 11 pm, allow a little slack - but how? Option 1: - 10% deduction each day late, max 2 days per assignment - 2 free late days during the quarter Option 2: - No late penalties, assignments due at deadline - 4 free late days for the quarter, no more than 2 per assignment Which should we use? Alternatives? No late days for exercises in any case - due 9 am before lecture

Requirements CSE351 is a prerequisite - I assume you have just a little exposure to C - I assume you know what a linked list, tree, hash table is You need access to a CSE linux environment - undergraduate labs, ssh into attu.cs, use CSE home VMs

Textbooks Recommended (strongly): - Computer Systems, A Programmer s Perspective ( CSAAP ) [2nd Ed]. CSE351 textbook; do you already have it? - C: A Reference Manual ( CARM ) [5th Ed] - C++ Primer ( C++P ) [5th Ed] Optional (but cool): - Effective C++ [3rd Ed] We ll also take advantage of online resources...

Communications Discussion board (gopost) - Best for most things - everyone benefits from exchanges - Hint: post something, then unread postings will be tagged cse333-staff@cs - Use for communications that don t belong on the board Perspective: Real software, real APIs, real bugs - We ll try to help as best we can, but mostly expect ideas for what to try, where to look. Debugging is your job.

Collaboration Some of the projects will be individual, some in teams - assume individual unless explicitly stated otherwise Cross-team collaboration is useful and expected - help other teams with programming fundamentals, concepts Plagiarism and cheating is verboten - helping other teams with assignments, debugging their code - relying on help without attributing in your writeups

For Wednesday Homework #0 is due (a short survey): - https://catalyst.uw.edu/webq/survey/perkins/171716 Exercise 0 is due - http://www.cs.washington.edu/education/courses/cse333/12su/exercises/ ex0.html

See you on Wednesday!