91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

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

代做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號線
  • 短信驗證碼 目錄網 排行網

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

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

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    亚洲女人av| 蜜臀av国产精品久久久久| 国产精品久久久免费 | 国产中文字幕精品| 国产精品久久久一区麻豆最新章节| 国产欧美日韩亚洲| av一本久道久久综合久久鬼色| 一区二区三区四区在线免费观看 | 欧美三级电影网站| 亚洲一级二级| 国产综合久久久久久久久久久久 | 一本一本a久久| 国产一区二区三区久久| 久久国产精品久久精品国产| av在线播放成人| 成人av在线网站| 色综合久久88色综合天天| 亚洲欧美电影在线观看| 国产乱码精品1区2区3区| 国产精品久久久久久户外露出| 国产日韩欧美精品在线| 欧美一区二区三区在线| 久久综合精品一区| 欧美片网站免费| 夫妻av一区二区| 国产在线不卡视频| 日韩av一区二区三区| 国产目拍亚洲精品99久久精品| 2014亚洲片线观看视频免费| 欧美日韩国产一二三| 久久精品人人| 91精品国产91久久综合桃花| 国产亚洲欧美一区在线观看| 日韩欧美高清dvd碟片| 欧美三级韩国三级日本三斤| 精品国产凹凸成av人导航| 日韩欧美一二三区| 国产精品欧美极品| 国产精品美女视频| 视频一区中文字幕| 日本欧美大码aⅴ在线播放| 国产传媒日韩欧美成人| 成人av在线资源网| 国产亚洲毛片在线| 91精品国产一区二区| 中文字幕在线免费不卡| 亚洲欧美怡红院| 美女www一区二区| 欧美日韩国产精品一卡| 成人免费av资源| 91老司机福利 在线| 色综合天天性综合| 亚洲第一在线| 亚洲综合欧美| 精品免费国产一区二区三区四区| 精品欧美一区二区三区精品久久 | 六月丁香综合在线视频| 国内精品伊人久久久久av影院| 欧美91大片| av成人黄色| 91国模大尺度私拍在线视频| 久久久久久网| 国产精品久久久久久久浪潮网站 | 国产精品一卡二卡| 久久不射中文字幕| 欧美私人免费视频| 日韩美女视频在线| 亚洲大尺度视频在线观看| 麻豆精品在线视频| 雨宫琴音一区二区在线| 欧美一卡在线观看| 麻豆精品久久久| 国产精品尤物| 国产精品久久久久久久久免费桃花| 国产高清不卡一区| 欧美性受极品xxxx喷水| 一区二区三区高清不卡| 欧美色一级片| 2023国产一二三区日本精品2022| 精品写真视频在线观看| 99re这里都是精品| 久久精品一区二区国产| 中文字幕亚洲精品在线观看| 成人av网址在线| 91精品国产色综合久久ai换脸| 日韩不卡一二三区| 欧美色综合天天久久综合精品| 一区二区三区四区视频精品免费 | 欧美一区亚洲| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品综合网| 欧美一区二区三区在线电影| 久久se这里有精品| 欧美主播一区二区三区| 欧美一区二区久久| 国产一区啦啦啦在线观看| 欧美在线一区二区| 久久精品二区亚洲w码| 色婷婷av一区二区三区之一色屋| 亚洲五月六月丁香激情| 99久久免费精品| 欧美精品一区二区高清在线观看 | 欧洲人成人精品| 六月丁香综合在线视频| 欧美日韩精品福利| 国产传媒一区在线| 久久品道一品道久久精品| 日韩av电影天堂| 色狠狠色噜噜噜综合网| 麻豆91在线观看| 欧美电影在线免费观看| 亚洲精品中文在线影院| 不卡的电影网站| 国产无人区一区二区三区| 欧美精品入口| 日韩毛片在线免费观看| 欧美一区二区| 亚洲乱码中文字幕| 一本一道久久a久久精品综合蜜臀| 免费高清成人在线| 免费永久网站黄欧美| 五月婷婷综合在线| 一区二区三区国产在线| 日韩国产精品久久久久久亚洲| 欧美日韩一级片在线观看| 成人一区二区视频| 亚洲丝袜另类动漫二区| 日本福利一区二区| 波多野结衣亚洲一区| 国产欧美精品一区二区三区四区| 日韩视频一区二区三区在线播放免费观看| 亚洲图片自拍偷拍| 欧美一区二区黄| 在线观看一区欧美| 美女视频一区在线观看| 久久久久一区二区三区四区| 99在线|亚洲一区二区| 麻豆精品一区二区综合av| 日韩一区二区免费在线电影| 久久国产免费看| 亚洲国产成人午夜在线一区| 欧美理论在线| 日韩一区精品字幕| 久久先锋影音av鲁色资源网| 一本一道久久综合狠狠老精东影业| 日韩av一区二| 国产欧美日韩在线| 久久一区免费| 欧美精品尤物在线| 日韩成人dvd| 欧美高清在线一区二区| 91国产福利在线| 黑人巨大精品欧美一区二区小视频 | 日本韩国精品在线| 91麻豆国产福利精品| 免费在线观看视频一区| 中日韩免费视频中文字幕| 欧美色男人天堂| 在线看片成人| 成人毛片视频在线观看| 亚洲超丰满肉感bbw| 国产欧美一区二区在线| 欧美日韩免费一区二区三区| 日韩亚洲国产精品| eeuss鲁片一区二区三区在线看| 亚洲成人精品一区二区| 欧美经典一区二区| 欧美一级午夜免费电影| 久久久久久国产精品mv| 国产在线精品一区二区中文| 国产成人午夜高潮毛片| 日本不卡中文字幕| 亚洲精品中文字幕乱码三区| 欧美aⅴ一区二区三区视频| 国产欧美日韩视频一区二区三区| 91香蕉视频在线| 国产揄拍国内精品对白| 三级成人在线视频| 亚洲自拍偷拍av| 欧美在线高清视频| 欧美专区18| 日韩一级大片| 亚洲高清不卡| 欧美日韩国产综合视频在线| 成人在线一区二区三区| 国产精品一级黄| 国产呦精品一区二区三区网站| 亚洲自拍偷拍图区| 亚洲美女一区二区三区| 欧美老肥妇做.爰bbww视频| 乱码第一页成人| 国产亚洲一区在线播放| 亚洲午夜精品久久久久久浪潮| 色综合天天在线| 欧美特黄视频| 欧美尤物一区| 欧美在线1区| 欧美日韩国产一区精品一区| 欧美日韩综合精品| 国内精品一区二区|