加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

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++程序語言
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

    激情久久久久| 国产精品一国产精品k频道56| 91蜜桃臀久久一区二区| 99精品久久久| 四虎国产精品免费观看| 久久精品观看| 亚洲精品亚洲人成在线| 国产成人精选| 91影院成人| 波多野结衣一区| ccyy激情综合| 国产伦一区二区三区| 国产精品一页| 色资源二区在线视频| 91久久综合| 色爱av综合网| 中文字幕一区二区三区四区久久| 国内精品嫩模av私拍在线观看| 国产高清不卡| 香蕉av777xxx色综合一区| 久久久久久久久久久妇女| 日韩福利电影在线| 欧美黄色一区二区| 久久激情综合网| 欧美aa免费在线| 日本在线电影一区二区三区| 日韩亚洲在线| 欧美精品羞羞答答| 久久久久蜜桃| 加勒比色老久久爱综合网| 精品国产亚洲日本| 亚洲国产合集| 成人免费观看49www在线观看| 日日摸夜夜添夜夜添精品视频| 国产综合色在线观看| 精品国产第一福利网站| 色小子综合网| 免费高清在线视频一区·| 模特精品在线| 亚洲专区一区二区三区| 欧美日韩激情在线一区二区三区| 国产精品nxnn| 国产精品2023| 精品色999| 精品丝袜久久| 里番精品3d一二三区| 成人综合一区| 久久资源中文字幕| 在线成人动漫av| 久久性感美女视频| 五月天激情综合网| 狠狠干成人综合网| 国产毛片久久| 蜜桃av一区二区三区电影| 国产精品99久久精品| 97久久视频| 日本不卡1234视频| 欧美xxxhd| 美腿丝袜在线亚洲一区| 一区二区三区精品视频在线观看| 免费亚洲婷婷| 亚洲午夜精品一区 二区 三区| 国产在线视频欧美一区| 婷婷精品在线| av一级亚洲| 在线日韩电影| 悠悠资源网久久精品| 久久都是精品| 一本大道色婷婷在线| 男人天堂久久| 你懂的国产精品永久在线| 国模吧精品视频| 一区二区三区亚洲变态调教大结局| 精品免费av| 伊人成人在线| 国产精品国产一区| 日韩精品第一| 亚洲青青一区| 高清欧美性猛交xxxx黑人猛 | 久久久久久久尹人综合网亚洲| 91综合视频| 久久精品二区亚洲w码| 日本va欧美va精品| 亚洲最好看的视频| 久久久综合色| 老牛影视一区二区三区| 日韩情爱电影在线观看| 羞羞视频在线观看欧美 | 999精品嫩草久久久久久99| 日韩成人免费电影| 国产99久久精品一区二区300| 久久亚洲二区| 免费成人毛片| 日本在线成人| 欧美精选一区二区三区| 蜜桃一区二区三区在线| 国产原创一区| 日韩视频一二区| 亚洲精品91| 日韩三级在线| 97久久精品一区二区三区的观看方式 | 国产欧美成人| 色爱av综合网| 97精品一区| 电影中文字幕一区二区| 久久久久久久久国产一区| 日韩影院精彩在线| 国产欧美日韩综合一区在线播放| 最新精品国偷自产在线| 91精品一区国产高清在线gif| 爽成人777777婷婷| 国内精品久久久久久久97牛牛| 欧美福利在线播放网址导航| 视频一区在线视频| 免费视频一区二区三区在线观看| 日韩一区二区三区高清在线观看| 亚洲在线观看| 亚洲国产片色| 久久密一区二区三区| 日韩免费久久| 久久丁香四色| 亚洲欧美日韩一区在线观看| 美女久久久精品| 久久超级碰碰| 日韩欧美看国产| 久久精品一级| 免费不卡在线观看| 欧美国产亚洲精品| 伊人久久婷婷| 欧美区一区二| 免费成人网www| 久久99国产精品二区高清软件| 韩国精品福利一区二区三区| 在线天堂资源www在线污| 精品一区二区三区视频在线播放 | 91影院成人| 日韩一级电影| 国产精品久久久久一区二区三区厕所 | 日韩综合精品| 成人性生交大片免费看96| 黑人精品一区| 一区二区三区视频播放| 欧美日韩国产观看视频| 日韩av成人高清| 蜜桃久久久久久| 日韩激情一区二区| 欧美h版在线| 伊人精品综合| 国产私拍福利精品视频二区| 青青一区二区| 一本综合久久| 婷婷另类小说| 亚洲欧美在线综合| 男人的天堂久久精品| 日韩精品中文字幕吗一区二区| 97视频精品| 成人在线免费观看视频| 日韩成人综合网| 免费久久久久久久久| 日本不卡的三区四区五区| 午夜激情久久| 国产精品美女久久久久久不卡| 日韩在线卡一卡二| 日韩精品一级| 国产精品第一| 欧美在线亚洲综合一区| 国产欧美一区二区三区精品观看| 国产精品久久久久久久| 欧美私人啪啪vps| 青娱乐精品在线视频| 欧美日韩三级电影在线| 亚洲国产精品嫩草影院久久av| 中文在线免费二区三区| 神马日本精品| 国产精品99久久免费| 毛片在线网站| 激情亚洲网站| 亚洲丝袜美腿一区| 成人午夜在线| 久久成人亚洲| 精品嫩草影院| 欧美日韩黄网站| 日韩中文视频| 国产精品美女久久久浪潮软件| 少妇精品久久久一区二区三区| 精精国产xxxx视频在线播放| 好看不卡的中文字幕| 日韩电影免费一区| 久久精品国产999大香线蕉| 久久成人精品| 99精品视频在线| 日韩福利电影在线| 久久字幕精品一区| 久久爱91午夜羞羞| 一区二区亚洲| 国产精品tv| 国产一区二区三区91| 欧美亚洲一区二区三区| av高清不卡| 夜夜嗨网站十八久久|