CS 241 Section (10/20/11)

16
CS 241 Section (10/20/11)

description

CS 241 Section (10/20/11). MP6. MP6. What is MapReduce? Framework for Data Intensive Jobs. MapReduce. We give you. input. reduce(). map(). map(). map(). You need to. Fork(). Pipe() and Select(). Banker's Algorithm. Current Allocation. Can P2 request (A:3 B:0 C:0) ?. - PowerPoint PPT Presentation

Transcript of CS 241 Section (10/20/11)

Page 1: CS 241 Section (10/20/11)

CS 241 Section(10/20/11)

Page 2: CS 241 Section (10/20/11)

MP6

Page 3: CS 241 Section (10/20/11)

MP6

• What is MapReduce?– Framework for Data Intensive Jobs

Page 4: CS 241 Section (10/20/11)

MapReduce

Page 5: CS 241 Section (10/20/11)

We give youmap()input map()map() reduce()

Page 6: CS 241 Section (10/20/11)

You need toPipe() and Select()Fork()

Page 7: CS 241 Section (10/20/11)

Banker's Algorithm

Page 8: CS 241 Section (10/20/11)

Current Allocation

Can P2 request (A:3 B:0 C:0) ?

Pr Alloc Max Need Total

A B C A B C A B C A B C

P0 1 2 0 7 5 3 6 3 3 12 6 6

P1 2 2 4 3 2 5 1 0 1 Available

P2 3 1 0 10 1 2 7 0 2 A B C

P3 2 1 1 2 2 2 0 1 1 4 0 1

P4 0 0 0 4 3 3 4 3 3

Page 9: CS 241 Section (10/20/11)

Current Allocation

Can P2 request (A:3 B:0 C:0) ?

Pr Alloc Max Need Total

A B C A B C A B C A B C

P0 1 2 0 7 5 3 6 3 3 12 6 6

P1 2 2 4 3 2 5 1 0 1 Available

P2 3 1 0 10 1 2 7 0 2 A B C

P3 2 1 1 2 2 2 0 1 1 1 0 1

P4 0 0 0 4 3 3 4 3 3

Page 10: CS 241 Section (10/20/11)

Current Allocation

Can P2 request (A:3 B:0 C:0) ?

Pr Alloc Max Need Total

A B C A B C A B C A B C

P0 1 2 0 7 5 3 6 3 3 12 6 6

P1 2 2 4 3 2 5 1 0 1 Available

P2 3 1 0 10 1 2 7 0 2 A B C

P3 2 1 1 2 2 2 0 1 1 3 2 5

P4 0 0 0 4 3 3 4 3 3

Page 11: CS 241 Section (10/20/11)

Current Allocation

Can P2 request (A:3 B:0 C:0) ?

Pr Alloc Max Need Total

A B C A B C A B C A B C

P0 1 2 0 7 5 3 6 3 3 12 6 6

P1 2 2 4 3 2 5 1 0 1 Available

P2 3 1 0 10 1 2 7 0 2 A B C

P3 2 1 1 2 2 2 0 1 1 5 3 6

P4 0 0 0 4 3 3 4 3 3

Page 12: CS 241 Section (10/20/11)

Current Allocation

Can P2 request (A:3 B:0 C:0) ?

Pr Alloc Max Need Total

A B C A B C A B C A B C

P0 1 2 0 7 5 3 6 3 3 12 6 6

P1 2 2 4 3 2 5 1 0 1 Available

P2 3 1 0 10 1 2 7 0 2 A B C

P3 2 1 1 2 2 2 0 1 1 5 3 6

P4 0 0 0 4 3 3 4 3 3

Page 13: CS 241 Section (10/20/11)

Current Allocation

Can P2 request (A:3 B:0 C:0) ? No

Pr Alloc Max Need Total

A B C A B C A B C A B C

P0 1 2 0 7 5 3 6 3 3 12 6 6

P1 2 2 4 3 2 5 1 0 1 Available

P2 3 1 0 10 1 2 7 0 2 A B C

P3 2 1 1 2 2 2 0 1 1 5 3 6

P4 0 0 0 4 3 3 4 3 3

Page 14: CS 241 Section (10/20/11)

Current Allocation

Can P2 request (A:3 B:0 C:0) ? NoWhat is the maximum number of A's that P2 could take?

Pr Alloc Max Need Total

A B C A B C A B C A B C

P0 1 2 0 7 5 3 6 3 3 12 6 6

P1 2 2 4 3 2 5 1 0 1 Available

P2 3 1 0 10 1 2 7 0 2 A B C

P3 2 1 1 2 2 2 0 1 1 5 3 6

P4 0 0 0 4 3 3 4 3 3

Page 15: CS 241 Section (10/20/11)

Exams

Please come get them

Page 16: CS 241 Section (10/20/11)

Fun

Terminal 1mkfifo filenameecho “a” >filename

Terminal 2

cat filenamecat filename