Lecture 7 - 9.docx

2 Pages
112 Views
Unlock Document

Department
Computer Science
Course
COMPSCI 10
Professor
Dan Garcia
Semester
Fall

Description
Lecture 7 Algorithms 2 • Block/function has inputs and outputs o Possibly no inputs o Possibly no outputs (if it is a command) • Spec= contract describing what to do o Name o Input o Output o Example calls • Running time o Count the number of “steps” involved  1 operation = 1 step o Uses worst case o Constant o Logarithmic o Linear o Quadratic o Cubic o Exponential Lecture 8 Concurrency • Concurrency: a property of computer systems in which several computations are  executing simultaneously, and potentially interacting with each other • 5 parts of the computer o Processor: Control “brain”  o Processor: Data path “brawn” o Memory o Devices: Input o Devices: Output • Inside the Processor o Silicon o 100­1000M transistors • Moore’s law o 2≈ transistors/chip every 2 years • Threads o Thread­ thread of execution­ a single stream of instructions  Program can split/fork itself into separate threads, which can execute  simultaneously  Parallelism o A single CPU can execute many threads by Time Division Multiplexing o Multithreading is running multiple threads through the same hardware • Amdahl’s Law o Applications can almost never be completely parallelized; some serial code  remains o Speedup(P) = Time(1)/Time(P)  P= # of cores  S= serial fraction of program o Even if the parallel portion of your application speeds up perfectly, your  performance may be limited by the sequential portion • Problems with parallel programming
More Less

Related notes for COMPSCI 10

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit