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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          亚洲日本免费电影| 欧美午夜电影网| 一区二区欧美国产| 国产视频精品网| 欧美色道久久88综合亚洲精品| 久久国产一区二区三区| 99综合精品| 亚洲激情网站| 伊人成年综合电影网| 国产一区免费视频| 国产欧美精品在线观看| 国产精品久久久久999| 欧美精品久久一区| 欧美夫妇交换俱乐部在线观看| 久久福利毛片| 久久久久久电影| 亚洲欧美在线一区二区| 夜夜嗨av色综合久久久综合网| 国产精品亚洲一区二区三区在线| 久久在线播放| 久久蜜臀精品av| 久久一区激情| 美日韩免费视频| 欧美极品欧美精品欧美视频| 美女露胸一区二区三区| 老司机成人在线视频| 久久全国免费视频| 老司机免费视频一区二区| 久久蜜臀精品av| 模特精品在线| 欧美日韩精品免费观看视频完整| 欧美另类99xxxxx| 欧美午夜精品久久久| 欧美日韩国产成人在线91| 欧美日韩一区二区免费视频| 欧美视频亚洲视频| 国产精品永久免费视频| 国产一区二区高清不卡| 亚洲福利av| 一区二区免费看| 欧美亚洲午夜视频在线观看| 久久精品国产清自在天天线| 麻豆精品一区二区综合av| 欧美日本一区二区高清播放视频| 欧美特黄一级| 国内精品久久久久影院色 | 影音先锋另类| 亚洲精品视频在线观看免费| 中国女人久久久| 欧美一区二区在线免费播放| 久久久伊人欧美| 欧美啪啪一区| 国产女优一区| 亚洲国产精品女人久久久| 一区二区三区国产在线| 久久久综合网站| 欧美日本簧片| 合欧美一区二区三区| 99综合精品| 久久99伊人| 欧美日韩亚洲一区二区三区| 国产一区成人| 一区二区不卡在线视频 午夜欧美不卡在 | 狂野欧美一区| 欧美午夜视频在线观看| 国产亚洲精品久久久久婷婷瑜伽 | 免费久久99精品国产自| 国产精品hd| 亚洲成人直播| 欧美一级片一区| 欧美日韩少妇| 国产精品一区亚洲| 亚洲另类自拍| 欧美jizzhd精品欧美巨大免费| 国产精品久久一卡二卡| 亚洲美女中文字幕| 免费短视频成人日韩| 国产精品亚发布| 一本色道久久综合亚洲二区三区 | 在线精品在线| 欧美一级在线亚洲天堂| 欧美日韩午夜在线| 亚洲高清中文字幕| 久久久久国产一区二区三区| 国产精品福利在线观看| 一区二区免费在线播放| 欧美区一区二区三区| 亚洲国产精品黑人久久久| 久久久久久国产精品一区| 国产精品一区毛片| 亚洲欧美清纯在线制服| 国产精品捆绑调教| 亚洲尤物在线视频观看| 国产精品夫妻自拍| 亚洲午夜精品一区二区| 国产精品久久久久久一区二区三区| 一区二区欧美精品| 国产精品成人一区二区网站软件| avtt综合网| 国产精品电影在线观看| 亚洲伊人伊色伊影伊综合网| 欧美亚洲成人免费| 亚洲欧美日韩一区在线观看| 国产精品劲爆视频| 欧美一区国产一区| 一区二区亚洲| 欧美成人一区二区三区| 99riav1国产精品视频| 欧美性视频网站| 欧美一级淫片播放口| 狠狠久久亚洲欧美专区| 麻豆成人在线观看| 一二三四社区欧美黄| 国产精品视频免费观看www| 欧美一区二区三区精品| 黄色亚洲免费| 欧美日韩国产电影| 亚洲你懂的在线视频| 国内成人精品2018免费看 | 欧美a级片网站| 一区二区三区视频在线看| 国产精品男人爽免费视频1| 久久国产高清| 日韩午夜av| 国产日韩欧美制服另类| 老司机一区二区三区| 一本色道久久综合| 国产日韩欧美精品在线| 久久人人97超碰人人澡爱香蕉| 亚洲区在线播放| 国产一区二区三区在线观看视频| 免播放器亚洲| 久久国产主播| 在线视频你懂得一区二区三区| 国产自产2019最新不卡| 欧美午夜精品理论片a级按摩 | 在线电影院国产精品| 欧美日韩专区| 免费观看不卡av| 久久成人精品一区二区三区| 亚洲美女av网站| 国产一区二区三区不卡在线观看 | 亚洲一区二区三区在线看| 狠狠色狠狠色综合日日91app| 欧美日韩亚洲一区三区| 久久久久久一区二区三区| 亚洲一级电影| 一区二区三区免费看| 最新国产成人av网站网址麻豆| 国产精品一区二区久久久| 欧美日韩视频一区二区三区| 久久影视三级福利片| 欧美中文字幕在线| 亚洲欧美日本在线| 亚洲天堂网站在线观看视频| 亚洲精品一区二区三区婷婷月 | 免费成人网www| 久久资源av| 久久伊人免费视频| 久久蜜桃精品| 久久福利影视| 久久久久久久成人| 久久精品国产一区二区三区免费看| 一区二区日韩欧美| 日韩午夜激情| 亚洲特黄一级片| a91a精品视频在线观看| 日韩亚洲在线观看| 在线视频日本亚洲性| 在线视频你懂得一区| 亚洲图片欧洲图片av| 亚洲天堂av图片| 亚洲欧美日韩成人高清在线一区| 亚洲在线免费视频| 亚洲欧美国产日韩天堂区| 亚洲欧美文学| 久久九九全国免费精品观看| 久久久一区二区三区| 毛片基地黄久久久久久天堂| 欧美激情综合在线| 国产精品va在线| 国产一区二区精品久久| 合欧美一区二区三区| 亚洲精品乱码久久久久久蜜桃麻豆 | 一区二区三区四区五区精品| 亚洲性感激情| 欧美一区二区三区免费视| 久久精品亚洲国产奇米99| 欧美xxx成人| 国产精品伦子伦免费视频| 国产日韩欧美不卡| 亚洲成人在线网站| 日韩视频一区二区三区在线播放| 99这里只有精品| 久久不射2019中文字幕| 欧美国产精品一区| 国产精品视频第一区| 亚洲电影一级黄| 亚洲综合首页| 欧美黄色网络|