Video
Đăng bởi Quản trị viên OpenER ·
Tác giả giữ toàn bộ bản quyền (All Rights Reserved) — không phải giấy phép mở. Bạn vẫn xem và học miễn phí trên OpenER; muốn tái sử dụng cần xin phép tác giả.
PROFESSOR
And welcome back.
This is the part of lecture entitled Thread Level Parallelism Part Two, and the meta goal here is to understand, from the software point of view, how can we make it easier for the programmer to deal with all these threads.
How do we do this? We've got a machine that's multicore, many logical CPUs available.
How do I write software to be able to make use of all of that if I have a really big problem that needs that?
If I had, let's say, eight logical CPUs, I can run eight different programs, and then I feel good about that. I've got a quick time, and I've got a web browser.
That's fine. Terminal running at a.out, but what if I have one program that wants to use all of them? What can I do?
So part of the goal of this series of lectures is to understand what software support we have to be able to do that. So let's step back. We have a choice of programming languages.
So let's talk about parallel programming languages and what's out there in the space. These are the languages supporting parallel programming. It's a lot. It's a ton.
I will point out that the one language that folks are telling me is just maybe the one to do it right — a lot of people have different attempts of this — Go.
Go is a really nice language. I did a little baby toy program, but I haven't programmed a lot in that.
But I've heard that Go people who are in this space think that Go might be the future to be able to do it in a really clean way.
So play with Go and explore that if you want to explore this more, but there's a lot of things here for different reasons. CUDA is how you drive your GPU.
Lots of different things are here. We're going to stay to this currently with C. Which one to pick? Let's talk about this.
Well, why do we have so many? Let's step back. Why do we have so many? Well, first of all, why do we have intrinsics.
The reason we have intrinsics is because the compilers don't support it. Intrinsics are a way of dropping code directly in the assembly level because it doesn't know how to generate that automatically.
So that's a little bit annoying, and so we're trying to encourage Intel and other folks to fix your compilers so that it'll do it automatically for us.
SIMD features are continually being added to compilers, which is really nice. We appreciate that. It is certainly an area of research.
Professor Kathy Yelick in our department is at the intersection of both of these pieces. She's a program language person who cares about parallelism.
She's exactly at the intersection of how do you get programming languages to wake up and realize we've got to make it easier for people to write parallel programs.
So there's been 20 plus years of thinking about how to take old school C and auto-parallelize it to become really fast assembly.
20 plus years of taking C and making fast assembly without parallelization. So there's that. How long will it take them to figure out how to take C and auto-parallelize it?
If I can automatically generate assembly and really be clever about optimizations.
Boy, you should see all the optimizations that the new compilers have, which eventually becomes the assembly, but the compilers do to become assembly language. That first compile level is remarkable.
So it's really compiler technology. How can we do the same thing for parallelization.
I've got a boring C code, and I can really write pretty good assembly if it's not paralleled, but if it is in parallel, it's a still harder problem.
We think of it as an open problem still. We have great cases in very simple things. There is automatically handled loops in an interesting way.
That's coming up, but it requires a lot of work. Here's your opportunity to become famous if you have some breakthrough.
Talk to Professor Yelick and related people in our department if you're interested in that space. The number of choices is an indication that there is no universal solution.
There isn't just an easy answer that somebody owned, somebody owns that space, and there isn't really a clear sense. So everyone says, well, it's not solved yet.
I'll make my own, and now I'll make my own too. Me too, me too, me three. And so you have all these people clamoring because nobody's really won.
And the needs are very specific. You have people operating at very large scale levels with massive data. You have work in a very small micro level with the multiple core space.
Huge data, a million machines, computers, all parts of the world in the distributed computing space, and I have also, I want to be able to work on just a very small problem, but I want to be able to have eight cores all be very fast in one computer.
So that's a different scale, and so these languages are kind of optimized for different things. For example, scientific computing matrix multiply, machine learning. We've got that. We've got a web server handling multiple requests.
That's usually distributed computing space. I/O is happening simultaneously. Anybody running a web server knows that. How do you make that work?
Languages are specialized for different tasks. We've seen that before. Here's the problem.
None is particularly easy to use of all of these, and what we're going to teach you in 61C is parallel language examples for high performance computing.
We're going to teach you OpenMP in the next couple of lectures, and after that, we're going to teach you MapReduce.
So two things that are really powerful at high level, Spark and all of those things. We'll teach that idea as well.
So that's what we're going to do in 61C, and the next lecture, we'll teach you OpenMP. We'll see you there.
Đăng nhập để đánh giá học liệu này.
Đăng nhập để bình luận — chưa ai bình luận về học liệu này.
Không có khóa học liên quan.