国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(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




 

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

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 wps 目錄網(wǎng) 排行網(wǎng)

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    精品国产一区二区三区免费| 色噜噜一区二区| 99国内精品久久久久久久软件| 激情五月六月婷婷| 欧美精品亚洲精品| 欧美在线观看黄| 欧美性天天影院| 欧美精品一区二区三区在线四季| 欧美在线日韩在线| 国内精品一区二区| 国产一区免费| 粉嫩av四季av绯色av第一区| 成人国产精品久久久| 国产日韩在线观看av| 国产日韩三区| 97久久精品国产| 国产福利成人在线| 日韩三级成人av网| 久久久久久综合网天天| 国产成人精品午夜| 国产精品久久久久久久久久ktv| 国产精品久久亚洲| 一区二区三区四区在线视频| 亚洲aⅴ日韩av电影在线观看| 性欧美亚洲xxxx乳在线观看 | 欧美xxxx做受欧美| 国产999视频| 亚洲日本一区二区三区在线不卡| 岛国视频一区| 欧美精品一区二区三区在线看午夜| 国精产品一区一区三区视频 | 国产精品人成电影| 欧美激情视频在线观看| 亚洲精品视频一二三| 日韩区国产区| 国产免费成人在线| 91福利视频导航| 久久久国产精品x99av| 久久综合久久88| 中文字幕免费高| 无码人妻aⅴ一区二区三区日本| 欧美一区视久久| 成人精品一区二区三区电影黑人| 神马国产精品影院av| 欧美日韩福利在线观看| 日韩欧美猛交xxxxx无码| 国产在线精品91| 国产成人avxxxxx在线看| 久久亚洲精品成人| 日韩视频 中文字幕| 国产噜噜噜噜噜久久久久久久久| 国产v综合v亚洲欧美久久| 久久福利视频网| 人妻熟女一二三区夜夜爱| 国产免费一区二区三区在线观看 | 超碰91人人草人人干| 亚洲v日韩v欧美v综合| 精品日本一区二区三区在线观看| 苍井空浴缸大战猛男120分钟| 精品国产网站地址| 亚洲av首页在线| 国产亚洲黄色片| 久久久久资源| 亚洲va韩国va欧美va精四季| 国产欧美精品一区二区三区介绍| 日韩视频第一页| 亚洲啊啊啊啊啊| 成人国产精品日本在线| 久久亚洲综合国产精品99麻豆精品福利| 国产精品户外野外| 日本精品一区二区三区高清 久久 日本精品一区二区三区视频 | 欧美精品久久久久a| 欧美连裤袜在线视频| 99视频国产精品免费观看| 久久中国妇女中文字幕| 欧洲视频一区二区三区| 97激碰免费视频| 亚洲天堂av免费在线观看| 国产免费一区视频观看免费| 国产精品高清在线观看| 欧美极品jizzhd欧美| 久久久久久久久国产| 日本不卡高清视频一区| 日韩在线视频二区| 欧洲精品久久久| 色婷婷综合久久久久| 日韩免费高清在线| www.国产一区| 欧美性久久久久| 久久久国产一区二区| 欧美午夜欧美| 国产精品丝袜视频| 免费av网址在线| 精品国产免费久久久久久尖叫 | www.欧美精品一二三区| 日韩免费av一区二区| 久草在在线视频| 人妻久久久一区二区三区| 久久久久久亚洲精品中文字幕| 日韩免费观看网站| 一本色道久久综合亚洲二区三区| 国产偷久久久精品专区| 日韩少妇与小伙激情| 日韩成人在线资源| 久艹在线免费观看| 欧美一级大胆视频| 国产精品天天狠天天看| 免费高清一区二区三区| 久久久久国产精品www| 91精品国产自产91精品| 日本不卡一区二区三区在线观看| 视频在线一区二区| 国产做受69高潮| 亚洲欧洲日韩综合二区| 久久久久久久久久久免费精品| 国产视频九色蝌蚪| 午夜精品美女久久久久av福利| 国产激情美女久久久久久吹潮| 欧美资源一区| 九九热r在线视频精品| 中文字幕欧美日韩一区二区| 国产激情在线观看视频| 免费看成人午夜电影| 亚洲在线观看视频网站| 日韩三级成人av网| 国产精品一区二区久久久久| 日韩av电影在线观看| 国产精品三区在线| 99久久伊人精品影院| 欧洲亚洲一区二区| 精品久久久久久久免费人妻| 成人国产精品日本在线| 欧美亚洲在线观看| 亚洲免费久久| 国产精品啪视频| 国产精品av网站| 美女黄毛**国产精品啪啪| 手机看片日韩国产| 久久综合免费视频| 久久免费高清视频| 麻豆一区区三区四区产品精品蜜桃| 亚洲人久久久| 国产精品久久久久aaaa九色| 国产高清精品在线观看| 国产日韩亚洲欧美在线| 日韩av电影免费播放| 久久国产精品久久国产精品| 久久久久久久久久久久久久国产| 国产美女在线一区| 欧美日韩高清免费| 午夜免费久久久久| 国产99视频精品免费视频36| 久久视频中文字幕| 国产成人精品电影久久久| 成人h在线播放| 国产日韩一区欧美| 黄色片久久久久| 热re99久久精品国产66热| 一区国产精品| 欧美成人一二三| 久久久之久亚州精品露出| 国产欧美日韩精品在线观看| 欧美极品欧美精品欧美| 少妇人妻无码专区视频| 亚洲综合色av| 精品不卡一区二区三区| 久久综合伊人77777蜜臀| 久久久久久久久久久免费精品| 91精品国产综合久久香蕉的用户体验| 每日在线更新av| 欧美一区视频在线| 日韩免费毛片视频| 肉大捧一出免费观看网站在线播放 | 国产精品免费视频一区二区| 久久久久久久久久久av| 久久最新免费视频| 91精品国产综合久久久久久蜜臀| 国产女人水真多18毛片18精品| 欧美国产日韩在线播放| 秋霞无码一区二区| 日韩视频在线观看国产| 日韩亚洲欧美一区二区| 日韩精品一区二区在线视频| 少妇大叫太大太粗太爽了a片小说| 一区二区三区的久久的视频| 九九久久综合网站| 欧美激情亚洲综合一区| 亚洲天堂电影网| 亚洲一区国产精品| 亚洲不卡1区| 欧美一级视频一区二区| 欧美一区二区大胆人体摄影专业网站| 亚州av一区二区| 日本精品二区| 欧美婷婷久久| 国产午夜精品一区| 成人美女免费网站视频| 久久伊人资源站| 久久国产手机看片| 久久久久久网站|