国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

EEE6207代做、代寫C++程序設計
EEE6207代做、代寫C++程序設計

時間:2025-03-07  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



EEE6207 Coursework Assignment AY2024-2025

You will write and test a small C program that implements a model of a number of independent Producer and Consumer entities that fill and drain a FIFO queue.  C models are often used to emulate the behaviours of various hardware, software and distributed computing systems, including the operating systems themselves. Examples include determining how big a buffer should be sized so it doesn’t cause stalling and underutilisation in a new hardware microarchitecture or designing a new scheduling or i/o strategy within user or operating system software.

 We won't be doing any analysis on the model we write here in a way a microarchitect or operating system architect would. Still, this sort of exercise, which includes an element of random traffic modelling, is definitely something you might see used to help size a system or even determine how big a run queue in an operating system or web server implementation might be.

The coursework will utilise concepts of multiprogramming and synchronization that have been covered in lectures and notes and draw on practical programming examples primarily from the labs on processes, threads and synchronization.

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 next write.
Each entry into the queue should have a priority (low, normal, high} assigned to it
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 first in, first out, FIFO, data structure. 
If there is more than one item in the queue a high priority entry should be read before any normal or low priority entries
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 (between 1 and 20)
Timeout Value in seconds

The following default parameter values should be built into the model. These should be easily identifiable (using appropriate comments and code structures such as include files) such that they can be configured  through recompilation of the model source code.

Maximum wait period between Producer writes 4 seconds
The maximum wait period between Consumer reads 4 seconds
Maximum number of Producers: 5
Maximum Number of Consumers 4
Range of Random Number generated by Producer 0 to 9

Your model should display an appropriate level of user-visible information while it is executing and a concise, readable summary of the model run 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
Indication of the current state of Producers, Consumers and the Queue

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. Hint: 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 is 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 include additional 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 terminate 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 7th (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 (not a .rar or tarfile) bundle to a blackboard assignment. This contains the following sections. You will be provided with the exact details of how to do this through the assignment portal 

a)File(s) containing your (appropriately commented) c code that implements the specified model functionality, this should include 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 (plagiarism check). (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 them together. 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 reach out.

We will run additional drop in sessions for the remaining weeks of the semester

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機打開當前頁
  • 上一篇:點點借款全國客服電話-點點借款24小時服務熱線電話
  • 下一篇:INT5051代做、代寫Python編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    91精品国产综合久久香蕉922| 欧美激情极品视频| 国产青春久久久国产毛片| 黄色99视频| 国产视频一区二区三区在线播放| 国产肉体ⅹxxx137大胆| 国产男女无遮挡| 超碰成人在线免费观看| 国产精品69页| 日韩中文字幕免费视频| 国产精品视频大全| 插插插亚洲综合网| 国产精品成人一区二区三区| 九九精品在线视频| 亚洲国产精品www| 亚洲国产另类久久久精品极度 | 国产精品男人爽免费视频1| 久久久精品久久久| 欧美精品免费看| 一级特黄妇女高潮| 日本免费高清一区二区| 妓院一钑片免看黄大片| 国产麻豆电影在线观看| 久久另类ts人妖一区二区| 久久九九精品99国产精品| 精品国产一区二区三区免费| 国产精品第三页| 亚洲综合自拍一区| 青青影院一区二区三区四区| 国产一区在线免费| 久久亚洲一区二区| 久久亚洲国产精品| 亚洲精品偷拍视频| 欧美日韩国产精品激情在线播放| 国产日韩欧美在线观看| 国产精品.com| 久久综合88中文色鬼| 欧美一区二区大胆人体摄影专业网站 | 久久精品国产成人| 久久99久久亚洲国产| 日韩欧美一区二| 国产一区二区在线观看免费播放| 久久亚洲精品欧美| 精品国产一区二区三区在线| 欧美一区二区三区四区夜夜大片| 免费观看国产成人| 视频在线观看99| 亚洲三区视频| 国产午夜精品在线| 久久精品国亚洲| 日韩av电影在线播放| 国产欧美一区二区三区在线看| 深夜福利一区二区| 色婷婷精品国产一区二区三区| 国产美女精品在线观看| 国产精品视频一区二区三区四区五区| 亚洲综合中文字幕在线观看| 国产亚洲欧美一区二区三区| 色婷婷久久av| 日本精品性网站在线观看| 99久久无色码| 欧美极品第一页| 国产日韩欧美另类| 国产精品国内视频| 欧美精品无码一区二区三区| 久久国产一区二区| 一区二区精品在线观看| 免费国产在线精品一区二区三区| 久久99中文字幕| 色综合av综合无码综合网站| av一区二区在线看| 中文字幕在线中文 | 激情小视频网站| 久久99久久精品国产| 日日碰狠狠丁香久燥| 91精品国自产在线观看| 亚洲精品一区二区三区蜜桃久 | 欧美极品视频一区二区三区| 久久99精品久久久久久久久久| 熟女视频一区二区三区| 91精品国产综合久久久久久蜜臀 | 日韩一区二区久久久| 日本高清视频免费在线观看| 久久久免费观看视频| 午夜免费福利小电影| 69久久夜色精品国产69| 性欧美大战久久久久久久| 国产精品一区二区三| 伊人久久99| 久久久免费观看| 岛国视频一区| 国产成年人在线观看| 日韩精品一区二区三区电影| 国产成人精品一区二区| 激情综合网婷婷| 久久成人在线视频| αv一区二区三区| 日本欧洲国产一区二区| 久久视频在线免费观看| 麻豆成人av| 宅男av一区二区三区| 91精品国产自产在线观看永久| 亚洲a一级视频| 久久国产色av免费观看| 青青草综合在线| 国产精品久久久久7777| 国产精品一久久香蕉国产线看观看| 另类美女黄大片| 成人免费福利在线| 视频一区二区精品| 久久久久久香蕉| 国产一区在线免费观看| 亚洲最新在线| 久久艹中文字幕| 国产中文字幕免费观看| 亚洲欧洲日韩综合二区| 日韩有码片在线观看| 欧美日韩亚洲国产成人| 欧美大片va欧美在线播放| 99国产在线| 日韩免费电影一区二区三区| 国产精品对白一区二区三区| 99在线视频免费观看| 热久久这里只有| 久久99精品久久久久久噜噜| 久久免费少妇高潮久久精品99| 黄色片视频在线免费观看| 国产av不卡一区二区| 国产h视频在线播放| 国产天堂在线播放| 日本午夜一区二区三区| 精品国产aⅴ麻豆| 久久久人成影片一区二区三区观看| 欧美日韩亚洲一二三| 亚洲伊人久久大香线蕉av| 国产精品网址在线| 97精品伊人久久久大香线蕉| 欧美日韩一区二区视频在线| 亚洲一区 在线播放| 国产精品入口免费视| 久久免费在线观看| 国产美女在线一区| 欧美在线视频a| 久久久久久成人精品| 国产精品视频专区| 国产成人亚洲精品无码h在线| 国产一区深夜福利| 大地资源第二页在线观看高清版| 欧美精品免费播放| 国产精品欧美日韩久久| 久久免费视频网站| 99视频国产精品免费观看| 美国av一区二区三区| 秋霞久久久久久一区二区| 午夜精品www| 亚洲欧洲日产国码无码久久99| 国产精品第8页| 国产精品涩涩涩视频网站| 久久国产精品一区二区三区| www.浪潮av.com| 国产日本欧美在线| 国内精品一区二区三区| 日韩免费观看av| 日本午夜精品一区二区三区| 懂色一区二区三区av片| 一本二本三本亚洲码| 欧美精品成人在线| 欧美精品做受xxx性少妇| 久久亚洲一区二区三区四区五区高| 国产成人精品一区二区三区福利| 久久久久久久激情| 91精品国产91久久久| 91精品国产高清自在线| 91免费版网站入口| 91精品在线一区| 97久久精品视频| 国产精品96久久久久久| 久久在线中文字幕| 91国内揄拍国内精品对白| 99视频日韩| 97久久精品视频| 国产精品99久久久久久www| 68精品久久久久久欧美| 久久亚洲中文字幕无码| 久久人人爽人人爽人人片av高清| 91久久久一线二线三线品牌| 久久久免费看| 色偷偷91综合久久噜噜| 国产成人小视频在线观看| 国产精品网站大全| 久久亚洲精品一区二区| 欧美日韩福利在线观看| 亚洲在线视频一区二区| 一区不卡字幕| 日韩av中文字幕第一页| 欧美久久久久久久久久久久久| 国产在线播放不卡| 97人人干人人| 久久久久久久久中文字幕| 国产精品久久久久久久久久|