日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

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

代做EEE6207、代寫 c/c++語言程序

時間:2024-01-28  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



EEE6207 Coursework Assignment 202**024
 
You will write and test a C program that implements a model of a number of independent Producer and Consumer entities that fill and drain a queue. C models are often used to emulate the behaviors of various hardware, software and distributed computing systems. Examples include determining how big a buffer should be sized so it doesn’t cause stalling and underutilization in a new hardware microarchitecture. We won'tbe doing any analysis on the model we write here in a way amicroarchitect would. Still, this sort of exercise, which includes an element of random traffic modelling, is definitely somethingyou might see used to help size a system or even determine how big a run queue in an operating system or web serverimplementation might be.
 
Model Specification
 
Implement a C-code model that emulates a system with n Producers and m Consumers which interacting through a shared queue
 
• Each Producer process (Pn) should generate a stream of random integers, writing them into a shared queue. It should then wait for a random number of seconds (up to some specified maximum value) before attempting its nextwrite.
• Each Consumer process (Cn) should read an item from the shared queue if one is available and display it to the standard output. It should then wait for a random number of seconds (up to some specific maximum value) before attempting its next read. 
• The queue should be implemented as a last in, first out, LIFO, data structure. 
• A Consumer Process must not read from an empty queue.
• A Producer Process must not write to a full queue.
 
To avoid the model from consuming unnecessary resources on the computing platform on which it will be run, your model must include a mechanism to stop its execution once a specified Timeout Value (in seconds) has been reached.
 
Run time behaviour of the model should be controlled through a set of command line arguments specifying the following parameters:
 
• Number of Producers (between 1 and 4)
• Number of Consumers (between 1 and 4)
• Maximum entries in the queue
• Timeout Value in seconds
 
The following default parameter values should be built into the model. These should be easily identifiable such that they can be configured  through a recompilation of the model code.
 
• Maximum wait period between Producer writes 5 seconds
• The maximum wait period between Consumer reads 5 seconds
• Maximum number of Producers: 4
• Maximum Number of Consumers 4
• Range of Random Number generated by Producer 99
 
Your model should display an appropriate level of information while executing, and a concise, readable summary of the modelrun itself. This must include the following information.
 
• Run time Command line parameters.
• Compiled model parameters
• Time  & date of the execution run
• Current user name & hostname
 
Comments & Code Structure
 
Please make sure you comment your code well – readability is a part of the assessment criteria. Comments make your code readable both to yourself and others. As noted, you should especially make it clear where compile-time options that control model behaviour are identified and consider the use of an appropriate code structure that provides modularity. A random number needs to be generated as data in the Producer process,and as a variable random wait in both the Producer and Consumer processes, one function will suffice.
 
Error Handling
 
We have emphasised the need to ensure the code handles error conditions, for example, those returned from system calls, well. What are you going to tell the user if a function or system call you use does not return the expected value?
 
Model Verbosity
 
Your model should output an appropriate level of information to the user as it is running so she can track progress. It up to you but a suggestion would be to log when a Producer writes to the queue including which producer it is and what it writes. This should, of course, include when a consumer writes to the standard output. Summarising the command line parameters for the model run is required.
 
Debugging
 
If your code is ‘working’ it should produce expected outcomes. How will you or a user debug a problem? You should includeadditional detailed instrumentation in your code to provide information about what is happening and a mechanism to turn this on or off – this could be a compile time option or a run time argument your choice. The default behavior however should be off - see the comment about Model Verbosity above.
 
Tidying up
Before you program exits it should exhibit good behaviour and clean up after itself. If for example it has created thread resources or synchronization objects it should cleanly terminated or relase these,  returning the associated memory resources to the operating system.
 
 
Assessment Criteria
 
Your coursework should be submitted no later than 5pm on Friday February 2nd (this is the last day of Semester 1). This assignment is worth 25% of the total module mark and is a must pass element.
 
You will submit a zipfile bundle to a blackboard assignment. This contains the following sections. You will be provided with the exact details of how to do this through assignment portal
 
a) A file containing your (appropriately commented) c code that implements the specified model functionality shouldinclude error handling and instrumentation.
b) A short report describing your code structure, key features of your model implementation and commentary on your two output run logs. {Max 200 words}
 
c) Two separate run logfiles that use different command line parameters demonstrating the functional execution of your code
 
Your submitted c-code will be
 
Run through MOSS to check the code for similarity. (https://theory.stanford.edu/~aiken/moss/)
Recompiled and re-run to check it works consistently with your log files and with a separate run using a different parameter set

Marking scheme – Must pass threshold for MSc module is 50%
 
C code and associated report 65%
Run logs and Code rerun 45%
 
 
Hints
 
This assignment will almost certainly require you to search to identify some specific programming constructs that you might not have used before or encountered in the practical lab exercises. It uses the foundational concepts of threads and synchronisation mechanisms that you have learned in those lab exercises, including mutex and semaphores, and the principles outlined in the lectures and notes.
 
The queue in your model should be safely and efficiently controlled using appropriate synchronization mechanisms. You could, for example, include mutexs and or semaphores.
 
Generating a logfile: You can pipe the output printf’d to the std_out terminal window into a file using the > operator in the shell. For example ./a.out > logfile will redirect the stdout into the file logfile
 
Generating user id and hostname can be accomplished using the getpwuid(getuid()) and gethostname() functions please put these in it identifies the runs as yours.
 
If (MY_PARAMETER) {
// do something
}
Is a simple way to insert conditional instrumentation code you only want to happen when you require the additional messages to be output.
 
Approach
 
You should consider approaching this assignment in a modular fashion. Break the problem down. write and test component functions as small independent chunks before integrating themtogether. For example, the random function mentioned earlier can be independently checked, as could, for example, the code to create a set of threads that would model independent consumers or producers or that which parses and displays the run time command line arguments.
 
It is entirely possible that there will be more error handling and optional debugging/ instrumentation lines of code and comments than there are functional lines of code
 
The number of lines of code you end up with obviously depends a little on style but a couple of fully commented – fully instrumented model implementations are in the range of 250-350 lines of code quite a few of these are things like #includes #defines etc
 
You will find examples of almost all of the building blocks need to complete this assignment in the practical class notes.
 
If you are unsure about any aspect of the assignment please use blackboard to ask a question
 如有需要,請加QQ:99515681 或WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:代做EEE6207、代寫 c/c++語言程序
  • 下一篇:代做Coding Project Test 編程設計
  • 無相關信息
    合肥生活資訊

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

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

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

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        欧美三级在线播放| 欧美成人r级一区二区三区| 欧美日韩国产综合在线| 欧美成黄导航| 国产精品理论片在线观看| 国产精品主播| 久久精品视频导航| 国产精品视频专区| 午夜精品一区二区三区在线视| 99国产一区| 香港久久久电影| 99国内精品久久| 久久午夜电影网| 韩国av一区| 国产精品一区二区欧美| 99视频在线观看一区三区| 国产精品一区二区久激情瑜伽| 影音先锋国产精品| 久久综合给合久久狠狠狠97色69| 伊人久久久大香线蕉综合直播| 亚洲午夜精品在线| 国产精品欧美激情| 夜夜嗨av一区二区三区中文字幕| 亚洲精品亚洲人成人网| 亚洲精品国产拍免费91在线| 欧美不卡在线视频| 国产精品久久久久久久午夜片| 国产主播一区| 免费观看国产成人| 欧美日韩午夜视频在线观看| 欧美成人精品在线播放| 国产综合亚洲精品一区二| 狠狠做深爱婷婷久久综合一区| 影音先锋久久| 亚洲网站啪啪| 欧美精品一区二区三区高清aⅴ| 1024成人网色www| 香港成人在线视频| 欧美在线你懂的| 亚洲视频精品在线| 亚洲精品日韩激情在线电影| 99热这里只有精品8| 欧美一区二区女人| 亚洲一区二区三区精品在线观看| 欧美一区二区女人| 老色批av在线精品| 国产一区激情| 国产婷婷一区二区| 国产精品日韩一区| 欧美三级中文字幕在线观看| 夜夜爽av福利精品导航| 欧美一区二区视频97| 在线免费观看日本欧美| 一区二区三区在线高清| 日韩视频免费看| 欧美一级久久久久久久大片| 亚洲黄网站在线观看| 亚洲欧洲在线看| 欧美高清视频免费观看| 欧美激情一区三区| 在线不卡a资源高清| 亚洲国产日韩一级| 国产在线拍偷自揄拍精品| 亚洲人成网站影音先锋播放| 狠狠久久亚洲欧美专区| 免费不卡在线观看| 欧美精品三级| 欧美日韩日日夜夜| 久久男人资源视频| 亚洲私人影院| 欧美成人小视频| 国产精品老女人精品视频| 亚洲丶国产丶欧美一区二区三区| 欧美华人在线视频| 国产精品影院在线观看| 午夜天堂精品久久久久| 欧美日韩在线一区二区| 久久在线视频在线| 亚洲永久免费| 亚洲国产精品久久久久秋霞蜜臀| 亚洲综合日韩| 久久理论片午夜琪琪电影网| 欧美精品麻豆| 亚洲私人影院在线观看| 国产精品爱啪在线线免费观看| 一区二区三区鲁丝不卡| 国产精品国产三级国产a| 一本色道**综合亚洲精品蜜桃冫| 欧美啪啪一区| 亚洲愉拍自拍另类高清精品| 欧美日本精品一区二区三区| 伊大人香蕉综合8在线视| 亚洲福利视频二区| 久久一区二区视频| 久久精品国亚洲| 欧美一区二区视频免费观看| 亚洲国产一区二区三区a毛片| 激情综合色综合久久| 另类酷文…触手系列精品集v1小说| 欧美特黄一级| 欧美日韩午夜视频在线观看| 亚洲精品视频在线观看免费| 欧美日韩国产一区二区三区| 欧美绝品在线观看成人午夜影视| 欧美激情视频一区二区三区不卡| 欧美日韩一区二区精品| 免费亚洲一区二区| 在线不卡欧美| 久久一区二区精品| 欧美第一黄色网| 国产伦精品一区二区三区视频黑人| 狼人天天伊人久久| 一本色道久久88精品综合| 欧美天堂亚洲电影院在线观看| 欧美一区国产二区| 99精品国产在热久久婷婷| 欧美破处大片在线视频| 欧美在线中文字幕| 欧美在线视频一区二区| 99精品国产高清一区二区| 午夜精品久久久久久久99热浪潮| 欧美午夜片在线免费观看| 亚洲欧洲免费视频| 一本久久综合亚洲鲁鲁五月天| 国产精品性做久久久久久| 亚洲欧洲精品一区二区精品久久久| 欧美国产精品一区| 欧美精品免费在线| av成人天堂| 欧美亚洲第一页| 欧美日韩精品国产| 国产精品视频最多的网站| 激情久久中文字幕| 欧美精品在线一区二区三区| 国模精品一区二区三区色天香| 国产精品v一区二区三区| 亚洲美女免费视频| 亚洲欧美不卡| 欧美另类久久久品| 国产午夜久久久久| 亚洲乱码国产乱码精品精98午夜| 欧美成人伊人久久综合网| 国内外成人在线| 久久久精品一品道一区| 亚洲精品视频一区| 老司机67194精品线观看| 国产精品视频yy9299一区| 国产精品免费看久久久香蕉| 国产在线精品一区二区中文| 久久久青草婷婷精品综合日韩| 欧美日韩国产影片| 欧美理论电影网| 国产一区二区三区四区hd| 亚洲精品1234| 老司机午夜精品视频在线观看| 在线观看视频一区二区| 久久久噜噜噜久久中文字幕色伊伊| 亚洲看片免费| 久久精品夜夜夜夜久久| 欧美高清在线精品一区| 国内成人在线| 久久一区中文字幕| 国产精品亚洲成人| 国产精品日韩在线|