加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

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

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

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

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

    av在线中出| 久久国产麻豆精品| 国产精品白丝av嫩草影院| 免费v片在线观看| 亚洲精品国产偷自在线观看| 天堂俺去俺来也www久久婷婷| 四虎精品在线观看| 狂野欧美一区| 精品视频在线你懂得| 99国内精品久久久久| 91欧美精品| 久久亚洲电影| 欧美不卡高清| 国产精品极品在线观看| 国产精品xvideos88| a日韩av网址| 亚洲一区日韩在线| 国产综合亚洲精品一区二| 精品入口麻豆88视频| 欧美日韩一区自拍 | 欧美中文日韩| 亚洲福利精品| 欧美精品国产白浆久久久久| 国产亚洲高清在线观看| 一二三区精品| 亚洲国产尤物| 日韩视频网站在线观看| 免费国产亚洲视频| 亚洲一区二区网站| sdde在线播放一区二区| 久久精品主播| 欧美日韩一本| 亚洲精品在线a| 亚洲精华一区二区三区| 伊人久久大香| 亚洲精品一二| 日韩一区二区在线| 99久久久国产| 日本不卡网站| 日韩在线播放一区二区| 亚洲激情午夜| 黄色成人在线网址| 米奇777超碰欧美日韩亚洲| 加勒比色综合久久久久久久久| 日韩欧美美女在线观看| 国产免费av一区二区三区| 久久这里只有精品一区二区| 久久精品一区二区三区中文字幕| 青青青国产精品| 亚洲十八**毛片| 肉色欧美久久久久久久免费看| 极品av在线| 日韩一级毛片| 久久精品97| 免费一区视频| 久久免费视频66| 国产在线不卡一区二区三区| 欧美日韩专区| 国产探花一区二区| 精品国产一区二区三区性色av| 日韩**一区毛片| 7777精品| 久久视频国产| 一区在线免费观看| 国产亚洲精品bv在线观看| 亚洲一区亚洲| 超碰国产一区| 成人交换视频| 亚洲情侣在线| 日韩理论电影中文字幕| 亚洲高清999| 成人毛片在线| 日韩视频一区| 中文字幕成在线观看| 日本h片久久| 日本女优在线视频一区二区| 欧美专区视频| 国产精品乱战久久久| 久久亚洲国产| 美女91精品| 亚洲伦乱视频| 亚洲欧洲综合| 亚洲无线观看| 午夜欧美在线| 98精品视频| 亚洲视频二区| 亚洲成aⅴ人片久久青草影院| 中文字幕一区二区三区日韩精品| 91精品一区二区三区综合在线爱| 午夜精品一区二区三区国产| 欧美r级电影| 久久这里只有| 日韩理论电影中文字幕| 99久久99久久精品国产片果冰| 香蕉精品视频在线观看| 蜜臀久久99精品久久久久宅男| 丰满少妇一区| 天堂99x99es久久精品免费| 精品三级在线观看视频| 亚洲专区一区| 精品自拍视频| 日韩 欧美一区二区三区| 欧美日韩国产高清电影| 91成人国产| 都市激情亚洲一区| 国内自拍一区| 久久久成人网| 不卡专区在线| 91成人app| 欧美.www| 91大神在线观看线路一区| 国产精品一区二区精品| 亚洲91久久| 亚洲精品mv| 久久综合色占| 午夜av一区| 久久69成人| 精品国产精品| 激情国产在线| 亚洲国产合集| 国产一区二区高清| 麻豆精品在线看| 亚洲啊v在线观看| 婷婷综合六月| 88久久精品| 色喇叭免费久久综合网| 国产精品国产三级在线观看| 欧美1区二区| 天堂资源在线| 精品国产不卡一区二区| 免费看的黄色欧美网站| 亚洲区国产区| 亚洲婷婷免费| 欧美亚洲免费| 国产真实有声精品录音| 在线亚洲观看| 国产在线不卡一区二区三区| 亚洲精品一区二区在线看| 美腿丝袜亚洲一区| 久久久久蜜桃| 久久中文精品| 亚洲成人最新网站| 麻豆国产一区二区| 国产专区一区| 日韩高清在线电影| 在线免费观看日本欧美爱情大片| 久久精品国产在热久久| 精品三级在线观看视频| 成人在线观看免费播放| 99精品电影| 美女视频黄 久久| 综合av在线| 亚洲青青久久| 国产精品精品| 91欧美极品| 麻豆精品蜜桃| 香蕉精品久久| 久久人人爽人人爽人人片av不| 亚洲激情中文在线| 中文字幕乱码亚洲无线精品一区| 在线视频日韩| 日韩福利电影在线| 亚洲私拍视频| 成人羞羞在线观看网站| 99精品热视频只有精品10| 欧美另类专区| 日韩成人精品视频| 小黄鸭精品aⅴ导航网站入口| 99国产精品一区二区| 欧美激情视频一区二区三区在线播放| 99视频精品| 91欧美日韩在线| 欧美成人三级| 午夜综合激情| 国产一区丝袜| 亚洲精品在线二区| 免费xxxx性欧美18vr| 精品视频99| 国产精品mv在线观看| 日韩综合在线| 久久精品导航| 高清一区二区中文字幕| 在线精品亚洲欧美日韩国产| 欧美调教网站| 国产欧美日韩视频在线| 妞干网免费在线视频| 欧美大人香蕉在线| 一区二区三区自拍视频| 国产情侣一区| 毛片电影在线| 影音国产精品| 大型av综合网站| 91视频成人| 亚洲a成人v| 久久久久久久欧美精品 | 国产v日韩v欧美v| 欧美理论视频| 日韩av综合| 一区二区三区在线电影| 一本大道色婷婷在线|