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

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

CS 551代寫、c/c++設計編程代做
CS 551代寫、c/c++設計編程代做

時間:2024-11-28  來源:合肥網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++程序語言
  • 無相關信息
    合肥生活資訊

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

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    亚洲熟女乱色一区二区三区| 免费看国产一级片| xvideos亚洲| 九九九热999| 久久国产精品 国产精品| 国产盗摄视频在线观看| 久久免费精品视频| 91精品视频免费看| 911国产网站尤物在线观看| 成人免费xxxxx在线观看| 国产麻豆一区二区三区在线观看| 国产在线欧美日韩| 国产一区视频在线播放| 国产综合18久久久久久| 国产中文字幕亚洲| 国产伦精品一区二区三区四区视频 | 日韩av免费在线看| 亚州av一区二区| 日韩av观看网址| 欧美中文字幕在线| 精品午夜一区二区三区| 国产欧美一区二区三区视频| 成人av在线播放观看| 国产精品99久久久久久人 | 国产不卡视频在线| 日韩在线高清视频| 国产精品第一页在线| 欧美成人精品一区| 欧美激情一区二区三级高清视频 | 色综合天天狠天天透天天伊人| 亚洲一区二区精品在线观看| 青青在线视频一区二区三区| 国内精品模特av私拍在线观看| 国产三级中文字幕| 久久亚洲国产成人精品无码区 | 久久91亚洲精品中文字幕| 亚洲一区二区不卡视频| 日本精品免费观看| 欧美夜福利tv在线| 国产欧美在线一区二区| 国产精品97在线| 久久精品中文字幕免费mv| 欧美精品久久久久久久久久| 日本一级黄视频| 国产一级大片免费看| 国产国产精品人在线视| 国产精品国三级国产av| 亚洲爆乳无码专区| 欧美日韩精品久久| 99在线免费观看视频| 久久久精品亚洲| 亚洲综合精品伊人久久| 欧美日韩性生活片| av不卡在线免费观看| 久久久久久久久久久一区| 久久99热精品这里久久精品| 青青在线视频免费观看| 97久久天天综合色天天综合色hd| 国产成人鲁鲁免费视频a| 伊人网在线免费| 蜜桃av噜噜一区二区三区| 国产传媒一区二区三区| 久久久久久91| 精品人妻大屁股白浆无码| 久久久亚洲精选| 欧美激情精品在线| 国语自产精品视频在免费| 国产成a人亚洲精v品在线观看| 国产精品美女免费| 日韩av片免费在线观看| 成人精品在线观看| 国产精品久久久久久久av电影 | 国产一区二区丝袜高跟鞋图片| 国产成人精品国内自产拍免费看| 精品免费二区三区三区高中清不卡| 日本精品一区二区三区不卡无字幕| 国产精品一级久久久| 国产精品国产福利国产秒拍| 日韩欧美精品在线不卡| 99超碰麻豆| 中文字幕色一区二区| 欧美久久在线观看| 久久精彩视频| 欧美一级片中文字幕| 91久久国产婷婷一区二区| 欧美激情精品久久久久久久变态 | 国产成人精品一区二区三区| 中文字幕免费高| 国产综合免费视频| 色妞欧美日韩在线| 日韩av电影在线网| 久久九九视频| 色视频一区二区三区| 91精品国产乱码久久久久久蜜臀| 欧美精品videos| 国产日本在线播放| 欧美成人免费在线观看| 国产在线999| 久久久久久高潮国产精品视| 国产精品一级久久久| 一级做a爰片久久| 91av在线不卡| 日韩福利视频| 日韩亚洲综合在线| 欧美专区中文字幕| 国产精品视频网址| 美媛馆国产精品一区二区| 另类天堂视频在线观看| 国产精品影院在线观看| 中文字幕欧美日韩一区二区| 91精品国产综合久久香蕉最新版| 懂色av一区二区三区四区五区| 国产超碰91| 激情成人开心网| 在线观看成人av| 国产黄色片免费在线观看| 青青久久av北条麻妃海外网| 国产精品免费福利| www.亚洲一区二区| 视频一区视频二区视频| 国产成人三级视频| 国产美女精彩久久| 婷婷四房综合激情五月| 久久久久久久久久久久av| 毛葺葺老太做受视频| 伊人久久婷婷色综合98网| 久草免费福利在线| 毛葺葺老太做受视频| 亚洲最大福利视频网| 久久精品国产精品亚洲色婷婷| 欧美一区在线直播| 欧美激情中文网| 久久久久久久激情视频| 精品视频第一区| 亚洲最大av网站| 色噜噜狠狠狠综合曰曰曰88av| 每日在线更新av| 欧美一区二区三区艳史| 国产精品久久精品视| 国产精品678| 国产在线资源一区| 性欧美亚洲xxxx乳在线观看| 国产精品视频xxx| 91高清免费视频| 免费久久久久久| 日韩欧美在线电影| 一本色道久久99精品综合| 久久久99久久精品女同性| 91精品久久久久久久久青青| 欧美视频免费看欧美视频| 欧美精品国产精品日韩精品| 色老头一区二区三区在线观看| 国产日韩一区欧美| 欧美诱惑福利视频| 亚洲xxxx视频| 欧美激情乱人伦| 国产精品久久久亚洲| 久精品国产欧美| 99热国产免费| 国产日韩欧美一二三区| 奇米影视首页 狠狠色丁香婷婷久久综合 | 日韩欧美精品在线不卡| 久久久久国产精品一区| 久久精品99久久香蕉国产色戒| 爱福利视频一区二区| 国产一区视频观看| 欧美一区亚洲二区| 日本三级中文字幕在线观看| 中文字幕在线亚洲精品| 欧美成人一区在线| 久久精品99无色码中文字幕| 久久精品99| 91精品久久久久久蜜桃| 粉嫩av免费一区二区三区| 蜜桃91精品入口| 狠狠综合久久av| 欧美激情 国产精品| 人妻久久久一区二区三区| 日韩av大全| 视频一区免费观看| 亚洲一区二区自拍| 在线观看欧美一区| 久久97精品久久久久久久不卡 | 久久久国产视频| 日韩中文字幕亚洲| 国产成人一区二区三区别| 亚洲va韩国va欧美va精四季| 亚洲免费不卡| 亚洲va国产va天堂va久久| 亚洲国产日韩美| 亚洲 日韩 国产第一区| 五月天婷亚洲天综合网鲁鲁鲁| 亚洲精品自在在线观看| 国产精品久久电影观看| 欧美xxxx18性欧美| 欧美日韩爱爱视频| 亚洲欧洲另类精品久久综合| 午夜精品一区二区在线观看的| 日本一欧美一欧美一亚洲视频| 日韩欧美视频第二区|