99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

CS 551代寫、c/c++設(shè)計編程代做
CS 551代寫、c/c++設(shè)計編程代做

時間:2024-11-28  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



CS 551 Systems Programming, Fall 2024
Programming Project 2
In this project we are going to simulate the MapReduce framework on a single machine using
multi-process programming.
1 Introduction
In 2004, Google (the paper “MapReduce: Simplified Data Processing on Large Clusters” by J.
Dean and S. Ghemawat) introduced a general programming model for processing and generating
large data sets on a cluster of computers.
The general idea of the MapReduce model is to partition large data sets into multiple splits,
each of which is small enough to be processed on a single machine, called a worker. The data
splits will be processed in two phases: the map phase and the reduce phase. In the map phase, a
worker runs user-defined map functions to parse the input data (i.e., a split of data) into multiple
intermediate key/value pairs, which are saved into intermediate files. In the reduce phase, a
(reduce) worker runs reduce functions that are also provided by the user to merge the intermediate
files, and outputs the result to result file(s).
We now use a small data set (the first few lines of a famous poem by Robert Frost, see Figure
1) to explain to what MapReduce does.
Figure 1: A small data set to be processed by MapReduce.
To run MapReduce, we first split the dataset into small pieces. For this example, we will split
the dataset by the four lines of the poem (Figure 2).
Figure 2: Partitioning the input data set into multiple splits.
The MapReduce framework will have four workers (in our project, the four workers are four
processes that are forked by the main program. In reality, they will be four independent machines)
to work on the four splits (each worker is working on a split). These four map worker will each
run a user-defined map function to process the split. The map function will map the input into
a series of (key, value) pairs. For this example, let the map function simply count the number of
each letter (A-Z) in the data set.
Figure 3: The outputs of the map phase, which are also the inputs to the reduce phase.
The map outputs in our example are shown in Figure 3. They are also the inputs for the
reduce phase. In the reduce phase, a reduce worker runs a user-defined reduce function to merge
the intermediate results output by the map workers, and generates the final results (Figure 4).
Figure 4: The final result
2 Simulating the MapReduce with multi-process programming
2.1 The base code
Download the base code from the Brightspace. You will need to add your implementation into
this base code. The base code also contains three input data sets as examples.
2.2 The working scenario
In this project, we will use the MapReduce model to process large text files. The input will be a
file that contains many lines of text. The base code folder contains three example input data files.
We will be testing using the example input data files, or data files in similar format.
A driver program is used to accept user inputs and drive the MapReduce processing. The
main part of driver program is already implemented in main.c. You will need to complete the
mapreduce() function, which is defined in mapreduce.c and is called by the driver program.
A Makefile has already been given. Running the Makefile can give you the executable of the driver
program, which is named as “run-mapreduce”. The driver program is used in the following way:
./run-mapreduce "counter"|"finder" file_path split_num [word_to_find]
where the arguments are explained as follows.
• The first argument specifies the type of the task, it can be either the “Letter counter” or
the “Word conter” (explained later).
• The second argument “file path” is the path to the input data file.
• The third argument “split num” specifies how many splits the input data file should be
partitioned into for the map phase.
• The fourth argument is used only for the “Word finder” task. This argument specifies the
word that the user is trying to find in the input file.
The mapreduce() function will first partition the input file into N roughly equal-sized splits,
where N is determined by the split num argument of the driver program. Note that the sizes of
each splits do not need to be exactly the same, otherwise a word may be divided into two different
splits.
Then the mapreduce() forks one worker process per data split, and the worker process will
run the user-defined map function on the data split. After all the splits have been processed, the
first worker process forked will also need to run the user-defined reduce function to process all the
intermediate files output by the map phase. Figure 5 below gives an example about this process.
split 0
split 1
split 2
Driver
Program
map
worker 0
reduce
worker
map
worker 2
map
worker 3
“mr-0.itm”
“mr-1.itm”
“mr-2.itm”
“mr-3.itm”
map
worker 1
(1) partition
(2) fork
(3) userdefined
map
(5) userdefined
reduce
“mr.rst”
Input
data file
Intermediate
files
Result
file
PID=1001
PID=1002
PID=1003
PID=1004
PID=1001
split 3
Figure 5: An example of the working scenario.
2.3 The two tasks
The two tasks that can be performed by the driver program are described as follows.
The “Letter counter” task is similar to the example we showed in Section 1, which is counting
the number of occurrence of the 26 letters in the input file. The difference is the intermediate file
and the final result file should be written in the following format:
A number-of-occurrences
B number-of-occurrences
...
Y number-of-occurrences
Z number-of-occurrences
The “Word finder” task is to find the word provided by user (specified by the “word to find”
argument of the driver program) in the input file, and outputs to the result file all the lines that
contain the target word in the same order as they appear in the input file. For this task, you
should implement the word finder as a whole word match, meaning that the function should only
recognize complete words that match exactly(case-sensitive) with the specified search terms. And
if multiple specified words are found in the same line, you only need to output that line once.
2.4 Other requirements
• Besides the mapreduce() function defined in mapreduce.c, you will also need to complete the map/reduce functions of the two tasks (in usr functions.c.)
• About the interfaces listed in “user functions.h” and “mapreduce.h”:
– Do not change any function interfaces.
– Do not change or delete any fields in the structure interfaces (but you may add additional fields in the structure interface if necessary).
The above requirements allow the TA to test your implementations of worker logic and user
map/reduce functions separately. Note that violation to these requirements will result in 0
point for this project.
• Use fork() to spawn processes.
• Be careful to avoid fork bomb (check on Wikipedia if you are not familiar with it). A fork
bomb will result in 0 point for this project.
• The fd in the DATA SPLIT structure should be a file descriptor to the original input data
file.
• The intermediate file output by the first map worker process should be named as “mr-0.itm”,
the intermediate file by the second map worker process should be named as “mr-1.itm”, ...
The result file is named as “mr.rst” (already done in main.c).
• Program should not automatically delete the intermediate files once they are created. They
will be checked when grading. But your submission should not contain any intermediate
files as they should be created dynamically.
3 Submit your work
Compress the files: compress your README file, all the files in the base code folder, and
any additional files you add into a ZIP file. Name the ZIP file based on your BU email ID. For
example, if your BU email is “abc@binghamton.edu”, then the zip file should be “proj2 abc.zip”.
Submission: submit the ZIP file to Brightspace before the deadline.
3.1 Grading guidelines
(1) Prepare the ZIP file on a Linux machine. If your zip file cannot be uncompressed, 5 points
off.
(2) If the submitted ZIP file/source code files included in the ZIP file are not named as specified
above (so that it causes problems for TA’s automated grading scripts), 10 points off.
(3) If the submitted code does not compile:
1 TA will try to fix the problem (for no more than 3 minutes);
2 if (problem solved)
3 1%-10% points off (based on how complex the fix is, TA’s discretion);
4 else
5 TA may contact the student by email or schedule a demo to fix the problem;
6 if (problem solved)
7 11%-20% points off (based on how complex the fix is, TA’s discretion);
8 else
9 All points off;
So in the case that TA contacts you to fix a problem, please respond to TA’s email promptly
or show up at the demo appointment on time; otherwise the line 9 above will be effective.
(4) If the code is not working as required in this spec, the TA should take points based on the
assigned full points of the task and the actual problem.
(5) Lastly but not the least, stick to the collaboration policy stated in the syllabus: you may
discuss with your fellow students, but code should absolutely be kept private.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




 

掃一掃在手機打開當前頁
  • 上一篇:COMP4134代做、Java程序語言代寫
  • 下一篇:代做CSC3050、代寫C/C++程序語言
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機亮相AWE 復古美學與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                国产精品麻豆99久久久久久| 色狠狠综合天天综合综合| 日韩午夜激情av| 日本高清无吗v一区| 成人ar影院免费观看视频| 裸体健美xxxx欧美裸体表演| 香蕉影视欧美成人| 亚洲一区日韩精品中文字幕| 亚洲欧美偷拍卡通变态| 国产精品久久久久久久久免费相片| 欧美精品一区二区三区高清aⅴ| 欧美高清精品3d| 欧美日韩另类国产亚洲欧美一级| 欧美日韩国产123区| 欧美一区午夜精品| 日韩久久精品一区| 精品福利一区二区三区免费视频| 久久先锋影音av鲁色资源| 国产亚洲精品资源在线26u| 久久久久九九视频| 国产精品嫩草影院com| 国产精品理论在线观看| 亚洲免费观看高清完整| 亚洲成国产人片在线观看| 视频在线在亚洲| 老司机免费视频一区二区| 国产精品一区在线| 99国产精品久| 欧美日韩一区二区三区四区| 日韩一区二区高清| 国产网站一区二区三区| 一区二区三区中文字幕| 麻豆精品在线看| 成人午夜免费视频| 欧美亚洲精品一区| 精品99一区二区| 国产精品国产成人国产三级 | 中文字幕在线观看一区二区| 国产精品三级视频| 亚洲一区二区中文在线| 精品制服美女久久| 91麻豆蜜桃一区二区三区| 欧美一二三四在线| 综合亚洲深深色噜噜狠狠网站| 日日夜夜精品视频天天综合网| 国产精品综合在线视频| 欧美日韩中字一区| 久久精品亚洲一区二区三区浴池| 亚洲最快最全在线视频| 国产在线一区二区| 欧美三级在线播放| 国产日本欧洲亚洲| 日本麻豆一区二区三区视频| 波多野结衣一区二区三区| 欧美一级久久久| 1000部国产精品成人观看| 毛片一区二区三区| 欧美午夜精品久久久| 国产精品美女久久福利网站| 免费人成精品欧美精品| 在线精品视频小说1| xfplay精品久久| 亚洲成在线观看| 91麻豆免费在线观看| 日本一区二区视频在线| 经典三级一区二区| 欧美日韩情趣电影| 亚洲男人的天堂av| 国产成人综合亚洲91猫咪| 91精品国产乱| 亚洲高清视频在线| 91久久人澡人人添人人爽欧美| 欧美国产一区二区| 国产麻豆视频一区| 精品国产乱码久久久久久1区2区| 亚洲123区在线观看| 欧美午夜寂寞影院| 一区二区三区日韩精品视频| www.视频一区| 亚洲国产电影在线观看| 国产成人免费视| 久久久一区二区三区捆绑**| 精品影视av免费| 欧美一区二区三区四区久久| 日本美女一区二区| 91精品国产色综合久久不卡电影 | 日韩一区二区三区四区| 亚洲va国产va欧美va观看| 一本一本大道香蕉久在线精品 | 国产永久精品大片wwwapp| 日韩欧美一二三| 久久疯狂做爰流白浆xx| 欧美精品一区二区在线播放| 国产一区二区h| 亚洲国产电影在线观看| 91免费在线视频观看| 一区二区三区在线观看网站| 欧美亚州韩日在线看免费版国语版| 亚洲精品国产精华液| 欧美三级中文字| 麻豆免费看一区二区三区| 精品国产伦一区二区三区观看体验 | 五月天婷婷综合| 欧美成人精品二区三区99精品| 狠狠色狠狠色合久久伊人| 日本一区二区三区在线不卡| 色综合久久六月婷婷中文字幕| 亚洲成人av一区| 久久久久青草大香线综合精品| 99精品在线观看视频| 亚洲午夜激情av| 日韩欧美一区在线| 福利电影一区二区三区| 亚洲在线视频免费观看| 精品久久久久久无| k8久久久一区二区三区| 婷婷开心激情综合| 久久久国产精华| 欧美影视一区二区三区| 久久福利视频一区二区| 最新日韩在线视频| 日韩三级在线观看| 国产成人av电影| 亚洲成av人在线观看| 国产亚洲欧美在线| 欧美三级电影在线观看| 国产成人鲁色资源国产91色综 | 日韩一区二区三区高清免费看看| 国产美女精品人人做人人爽| 亚洲综合色在线| 久久男人中文字幕资源站| 91福利在线看| 国产福利视频一区二区三区| 日韩精品免费视频人成| 亚洲视频1区2区| 久久久久99精品一区| 欧美视频精品在线| 成人综合在线视频| 毛片一区二区三区| 亚洲午夜电影在线| 国产精品视频免费| 日韩精品一区国产麻豆| 欧美日韩亚洲综合在线| 91浏览器打开| 成人av资源网站| 国产精一品亚洲二区在线视频| 蜜桃视频在线观看一区二区| 亚洲电影视频在线| 亚洲精品国产视频| 亚洲桃色在线一区| 中文字幕一区二区三区在线观看| 久久网站最新地址| 日韩精品自拍偷拍| 欧美一区二区美女| 欧美日韩精品二区第二页| 在线精品观看国产| 色综合久久综合网欧美综合网| 粉嫩av亚洲一区二区图片| 国内精品久久久久影院薰衣草| 日韩成人免费电影| 男男视频亚洲欧美| 日本美女一区二区三区| 蜜桃av一区二区在线观看| 日本成人在线看| 麻豆一区二区三| 九色综合国产一区二区三区| 韩国av一区二区三区在线观看| 美日韩一区二区三区| 麻豆视频观看网址久久| 免费不卡在线观看| 久久草av在线| 国产高清不卡一区二区| 成人美女在线视频| 色综合激情久久| 精品视频999| 精品少妇一区二区三区在线视频 | 有坂深雪av一区二区精品| 一区2区3区在线看| 天天色天天操综合| 久久精品久久精品| 国产精品亚洲一区二区三区在线| 国产99一区视频免费| 91小视频在线免费看| 欧美日韩一区三区四区| 日韩欧美国产1| 中文字幕欧美区| 一区二区三区在线视频观看| 婷婷综合另类小说色区| 国产精品亚洲午夜一区二区三区| 成人黄色免费短视频| 欧美亚洲日本国产| 日韩欧美国产精品| 国产精品国产精品国产专区不蜜 | 午夜精品久久久久久久久久| 免费高清视频精品| 岛国一区二区在线观看| 欧美性欧美巨大黑白大战| 精品久久久久久无| 亚洲乱码国产乱码精品精的特点| 日韩国产欧美在线视频|