Docsity

Course Wrap-Up CSE333, Spring 2019, Lecture notes of Compiler Design

Toggle sidebar
bg1
CSE333,Spring2019L28:CourseWrap‐Up
CourseWrap‐Up
CSE333Spring2019
Instructor: JustinHsia
TeachingAssistants:
AaronJohnston AndrewHu DanielSnitkovskiy
ForrestTimour KevinBi KoryWatson
PatKosakanchit Renshu Gu Tarkan Al‐Kazily
TravisMcGaha
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Course Wrap-Up CSE333, Spring 2019 and more Lecture notes Compiler Design in PDF only on Docsity!

CSE333, Spring 2019

L28: Course Wrap‐Up

Course Wrap‐Up^ CSE 333 Spring 2019 Instructor:

Justin Hsia

Teaching Assistants: Aaron Johnston

Andrew Hu

Daniel Snitkovskiy

Forrest Timour

Kevin Bi

Kory Watson

Pat Kosakanchit

Renshu Gu

Tarkan Al‐Kazily

Travis McGaha

CSE333, Spring 2019

L28: Course Wrap‐Up

Administrivia^ 

hw4 due yesterday (6/6)^ 

Submissions accepted until tonight (6/7)

Course evaluations (Piazza @694) due Sunday night 

Final is Wednesday (6/12), 12:30‐2:20 pm, ARC 147^ 

Review Session: Sunday (6/9), 4‐6:30 pm, ECE 125 

Two

double‐sided, handwritten sheets of notes allowed

Topic list and past finals on Exams page on website

CSE333, Spring 2019

L28: Course Wrap‐Up

Course Map: 100,000 foot view

C application^ C standardlibrary (glibc)

C++ application^ C++ STL/boost/standard library

Java application

JRE

CPU

memory

storage

network

GPU

clock

audio

radio

peripherals

OS / app interface HW/SW interface(x86 + devices)

(system calls)

operating system

hardware

CSE333, Spring 2019

L28: Course Wrap‐Up

Systems Programming^ 

The programming skills, engineering discipline, andknowledge you need to build a system^ 

Programming:

C / C++

Discipline:

design, testing, debugging, performance analysis

Knowledge:

long list of interesting topics

-^

Concurrency, OS interfaces and semantics, techniques for consistentdata management, distributed systems algorithms, …

-^

Most important: a deep understanding of the “layer below”

CSE333, Spring 2019

L28: Course Wrap‐Up

The C/C++ Ecosystem^ 

System layers:^ 

C/C++

Libraries 

Operating system

Building Programs:^ 

Pre‐processor (

cpp

,^ #include

,^ #ifndef

Compiler: source code

object file (

.o

Linker: object files + libraries

executable

Build tools:^ 

make

and related tools

Dependency graphs

CSE333, Spring 2019

L28: Course Wrap‐Up

Program Execution^ 

What’s in a process?^ 

Address space 

Current state^ •^

SP, PC, register values, etc.

Thread(s) of execution 

Environment^ •^

Arguments, open files, etc.

0xFF…FF 0x00…

OS kernel [protected]

Stack Heap

Read/Write Segment

.data

,^ .bss

Shared Libraries Read‐Only Segment

.text

,^ .rodata

CSE333, Spring 2019

L28: Course Wrap‐Up

C++ (and C++11)^ 

A “better C”^ 

More type safety, stream objects, memory management, etc.

References and const 

Classes and objects!^ 

So much (too much?) control: constructor, copy constructor,assignment, destructor, operator overloading 

Inheritance and subclassing^ •^

Dynamic vs. static dispatch, virtual functions, vtables and vptrs

-^

Pure virtual functions and abstract classes

-^

Subobjects and slicing on assignment

Copy semantics vs. move semantics

CSE333, Spring 2019

L28: Course Wrap‐Up

C++ (and C++11)^ 

C++ Casting^ 

What are they and why do we distinguish between them? 

Implicit conversion/construction and

explicit

Templates – parameterized classes and functions^ 

Similarities and differences from Java generics 

Template implementations via expansion

STL – containers, iterators, and algorithms^ 

vector

,^

list

,^ map

,^

set

, etc.

Copying and types

Smart Pointers^ 

unique_ptr

,^

shared_ptr

,^

weak_ptr

Reference counting and resource management

CSE333, Spring 2019

L28: Course Wrap‐Up

Networking^ 

Conceptual abstraction layers^ 

Physical, data link, network, transport, session, presentation,application 

Layered

protocol

model

-^

We focused on IP (network), TCP (transport), and HTTP (application)

Network addressing^ 

MAC addresses, IP addresses (IPv4/IPv6), DNS (name servers)

Routing^ 

Layered packet payloads, security, and reliability

CSE333, Spring 2019

L28: Course Wrap‐Up

Network Programming Client side

Get remote host IPaddress/port

Create socket

Connect socket toremote host

Read and write data

Close socket

Server side

Get local host IPaddress/port

Create socket

Bind socket to local host

Listen on socket

Accept connection fromclient

Read and write data

Close socket

CSE333, Spring 2019

L28: Course Wrap‐Up

Processes vs Threads on One Slide

OS kernel [protected]

Stack

Heap (malloc/free)Read/Write Segment

.data

,^ .bss

Shared Libraries Read‐Only Segment^ .text

,^ .rodata

SP PC

OS kernel [protected]

Stack

Heap (malloc/free)Read/Write Segment

.data

,^ .bss

Shared Libraries Read‐Only Segment

.text

,^ .rodata

SP PC

fork

()

PARENT

CHILD

OS kernel [protected]

Stack

parent

Heap (malloc/free)Read/Write Segment

.data

,^ .bss

Shared Libraries Read‐Only Segment

.text

,^ .rodata

SP

parent PC

parent

Stack

child

SP

child PC

child

CSE333, Spring 2019

L28: Course Wrap‐Up

Congratulations!^ 

Look how much we learned! 

Studying for the exam:

(your mileage may vary)

Make cheat sheets

first

-^

Review lecture slides, exercises, sections, end‐of‐lecture problems

-^

Look at topic list on website to check your coverage and help organize

-^

Brainstorm and trade ideas with other students

“Simulate” an old exam^ •^

Do it in one timed sitting

-^

Working problems is far more important than reading old answers!

“Grade” yourself, then go back and review problems^ •^

If still unsure why, ask the staff or your fellow students

-^

Rinse and repeat!

CSE333, Spring 2019

L28: Course Wrap‐Up

Thanks for a great quarter!^ 

Special thanks to the course content creators!!! 

Huge thanks to your awesome TAs! Forrest

Kevin

Kory

Renshu

Daniel

Andrew

Aaron

Steve Gribble

Hal Perkins

John Zahorjan

Travis

Tarkan

Pat

CSE333, Spring 2019

L28: Course Wrap‐Up

Ask Me Anything