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

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

代做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 編程設計
  • 無相關信息
    合肥生活資訊

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

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

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

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

          欧美激情亚洲视频| 一区二区三区三区在线| 欧美日本在线一区| 性欧美xxxx大乳国产app| 亚洲精品乱码久久久久久黑人| 国产精品美女主播| 欧美第一黄色网| 久久国产黑丝| 亚洲一区二区三区四区在线观看| 怡红院精品视频| 国产日韩精品视频一区| 欧美日韩激情网| 麻豆av福利av久久av| 亚洲午夜电影| 亚洲精品久久久久久久久久久久久 | 欧美日韩国产综合新一区| 久久久999精品| 香蕉成人伊视频在线观看| 亚洲美女av黄| 亚洲精品国产视频| 在线精品福利| 在线欧美电影| 亚洲激情视频| 亚洲国产精品t66y| 亚洲高清资源| 亚洲精品国产精品乱码不99按摩 | 国产模特精品视频久久久久| 欧美色欧美亚洲另类二区| 欧美国产精品人人做人人爱| 麻豆乱码国产一区二区三区| 美女日韩欧美| 欧美成人在线网站| 欧美欧美天天天天操| 欧美理论在线| 欧美日韩综合久久| 国产精品一二三视频| 国产精品久久久久久久7电影| 欧美日一区二区三区在线观看国产免| 欧美精品一区二区三区蜜桃| 欧美日韩的一区二区| 欧美日韩国产精品成人| 国产精品理论片| 国产精品中文在线| 国产一区二区三区久久| 曰韩精品一区二区| 亚洲国产女人aaa毛片在线| 亚洲欧洲精品一区| 亚洲图色在线| 欧美在线亚洲| 欧美成人情趣视频| 国产精品v欧美精品v日本精品动漫| 欧美性色aⅴ视频一区日韩精品| 国产精品美女久久久免费| 伊人久久av导航| 亚洲免费高清| 欧美一区二区三区日韩| 欧美激情一区二区三级高清视频| 国产精品www.| 亚洲国产精品成人综合色在线婷婷| 日韩午夜在线视频| 欧美在线你懂的| 欧美精品在线一区二区三区| 国产日韩综合| 一个色综合导航| 久久精品免视看| 欧美午夜宅男影院| 亚洲高清不卡| 欧美一区在线直播| 欧美四级在线观看| 亚洲欧洲精品一区二区三区 | 欧美三日本三级少妇三2023| 国产精品一区二区在线观看不卡| 精品二区久久| 中文av一区二区| 欧美xxx成人| 国产原创一区二区| 亚洲欧美日本国产有色| 欧美激情视频一区二区三区不卡| 国产一区二区三区观看| 宅男精品视频| 欧美另类女人| 亚洲国语精品自产拍在线观看| 欧美一站二站| 国产精品久久一级| 亚洲另类春色国产| 免费在线一区二区| 有码中文亚洲精品| 久久精品视频免费| 国产亚洲欧洲997久久综合| 亚洲色图综合久久| 欧美日韩中文字幕精品| 日韩午夜电影| 欧美三级精品| 亚洲美女精品久久| 欧美精品偷拍| 这里只有精品视频| 欧美三级午夜理伦三级中视频| 亚洲日本中文字幕| 欧美精品123区| 亚洲国产综合在线| 欧美电影免费观看网站 | 久久亚洲综合网| 伊人婷婷欧美激情| 欧美插天视频在线播放| 亚洲精品一二| 欧美日韩一区二区在线| 亚洲一区美女视频在线观看免费| 欧美日韩在线播放三区| 亚洲一区二区精品| 国产日本欧美一区二区三区| 午夜视频在线观看一区二区| 国产一区二区久久久| 久久久久久免费| 亚洲国产清纯| 国产精品欧美久久| 性色av香蕉一区二区| 黄色国产精品一区二区三区| 免费成人在线视频网站| 在线视频精品| 国产日韩欧美高清免费| 美女视频黄 久久| 99国内精品| 韩日视频一区| 欧美日韩国产综合视频在线观看中文 | 久久九九久精品国产免费直播| 亚洲国产欧美久久| 国产精品久久久久久av下载红粉 | 国产午夜精品一区二区三区视频 | 欧美日韩国产经典色站一区二区三区| 夜夜爽www精品| 国产日韩欧美精品一区| 欧美福利在线| 午夜精品一区二区在线观看| 在线日韩欧美| 国产精品麻豆成人av电影艾秋| 麻豆成人在线| 亚洲影院色在线观看免费| 激情伊人五月天久久综合| 欧美日韩在线精品一区二区三区| 欧美在线视频导航| 99在线热播精品免费| 国产真实乱偷精品视频免| 欧美日韩亚洲一区二区三区在线观看| 久久精品成人| 亚洲制服欧美中文字幕中文字幕| 亚洲国产高清在线观看视频| 国产欧美日韩一区二区三区在线观看 | 国产精品亚洲一区二区三区在线| 久久综合给合| 欧美一区成人| 亚洲一区美女视频在线观看免费| 91久久夜色精品国产网站| 国产一区香蕉久久| 欧美午夜精品久久久久免费视| 免费影视亚洲| 久久久久看片| 久久精品国产久精国产爱| 亚洲影院污污.| 一区二区欧美日韩视频| 亚洲人成网站影音先锋播放| 黄色日韩网站| 激情婷婷亚洲| 狠狠做深爱婷婷久久综合一区 | 久久岛国电影| 午夜视频在线观看一区| 亚洲综合成人在线| 亚洲一区二区精品在线| 亚洲一区三区在线观看| 一本色道88久久加勒比精品 | 国产精品99一区二区| 欧美日韩视频| 欧美婷婷久久| 国产精品免费小视频| 国产欧美精品一区| 国产偷国产偷亚洲高清97cao| 国产欧美视频在线观看| 国产亚洲精品v| 黄色欧美日韩| 伊人成人在线视频| 亚洲国产日韩欧美在线99| 亚洲精华国产欧美| aa级大片欧美三级| 亚洲一区二区免费视频| 欧美怡红院视频| 蜜臀av国产精品久久久久| 欧美高清你懂得| 欧美日韩在线播放三区| 国产区亚洲区欧美区| 亚洲高清三级视频| 亚洲美女啪啪| 午夜宅男久久久| 蜜桃av噜噜一区二区三区| 欧美日韩大片| 狠狠色丁香婷婷综合久久片| 亚洲精品美女久久7777777| 一级日韩一区在线观看| 久久成人18免费观看| 欧美激情成人在线| 国产精品久久久对白| 在线不卡中文字幕|