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

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

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

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

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

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

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

          9000px;">

                亚洲免费在线视频一区 二区| 99久久久国产精品免费蜜臀| 精品国产不卡一区二区三区| 欧美色涩在线第一页| 成熟亚洲日本毛茸茸凸凹| 国内精品自线一区二区三区视频| 亚洲图片一区二区| 亚洲乱码精品一二三四区日韩在线| 中文字幕精品—区二区四季| 久久精品亚洲国产奇米99| 日韩免费性生活视频播放| 欧美另类高清zo欧美| 欧美精品777| 欧美第一区第二区| 精品国产髙清在线看国产毛片| 精品久久久久久久久久久久包黑料| 日韩女优制服丝袜电影| 久久综合国产精品| 国产精品国产三级国产三级人妇| 中文字幕一区av| 18涩涩午夜精品.www| 国产日韩精品一区二区三区 | 一区二区三区91| 日韩亚洲欧美在线| 欧美日韩视频在线观看一区二区三区| 成人a免费在线看| 欧美在线视频全部完| 日韩欧美一级二级三级| 欧美日韩国产小视频在线观看| 欧美综合视频在线观看| 欧美在线看片a免费观看| 欧美日韩卡一卡二| 日韩视频一区在线观看| 国产午夜精品久久久久久免费视| 精品88久久久久88久久久| 国产欧美综合在线观看第十页| 国产三级欧美三级日产三级99| 国产精品乱码妇女bbbb| 亚洲成人手机在线| 麻豆freexxxx性91精品| 成人激情免费电影网址| 9191国产精品| 日本一区二区久久| 日本欧美一区二区三区乱码| 国产成人亚洲精品青草天美| 欧美日韩一区三区| 国产日韩欧美综合在线| 亚洲一级二级三级在线免费观看| 国内精品久久久久影院一蜜桃| 成人三级在线视频| 日韩欧美激情一区| 亚洲欧洲制服丝袜| 国产老妇另类xxxxx| 欧美日韩国产首页| 国产精品高清亚洲| 精品一区二区三区免费毛片爱| 91美女片黄在线观看| 337p日本欧洲亚洲大胆精品 | 99久久伊人精品| 91精品中文字幕一区二区三区| 欧美激情一区二区三区| 久久99国产精品久久99| 在线观看日韩精品| 亚洲欧美自拍偷拍| 国内国产精品久久| 日韩亚洲国产中文字幕欧美| 亚洲男人的天堂一区二区| 成人永久aaa| 久久精品亚洲乱码伦伦中文| 免费高清视频精品| 欧美丰满少妇xxxxx高潮对白| 亚洲精品视频免费看| 97精品国产露脸对白| 日本一区二区电影| 国产成人精品www牛牛影视| 日韩视频免费观看高清完整版 | 亚洲第一狼人社区| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 91色婷婷久久久久合中文| 国产欧美视频在线观看| 久久99九九99精品| 欧美大度的电影原声| 日韩精品1区2区3区| 欧美色大人视频| 午夜精品一区二区三区电影天堂| 色老综合老女人久久久| 悠悠色在线精品| 在线视频中文字幕一区二区| 夜夜精品视频一区二区| 欧美中文字幕一区| 日韩高清电影一区| 日韩欧美中文一区二区| 国产尤物一区二区| 国产日韩欧美高清| 99久久久免费精品国产一区二区| 亚洲视频你懂的| 日本乱人伦一区| 三级影片在线观看欧美日韩一区二区| 欧美日韩高清一区二区| 九色porny丨国产精品| 久久久精品日韩欧美| 成人白浆超碰人人人人| 亚洲另类色综合网站| 欧美一区二区二区| 精品制服美女丁香| 中文字幕在线观看一区二区| 91久久精品午夜一区二区| 日韩影院免费视频| 国产亚洲欧美中文| 在线观看精品一区| 精品在线一区二区三区| 国产精品不卡在线| 欧美日本在线观看| 一区二区三区久久| 国产精品99久久久久久久女警| 国产午夜精品久久| 95精品视频在线| 日本在线不卡一区| 欧美激情在线一区二区| 91福利精品视频| 国产一区不卡视频| 一区二区欧美在线观看| 欧美精品一区视频| 99天天综合性| 精品在线免费观看| 亚洲免费在线看| 国产亚洲欧美一级| 欧美精品一二三区| 成人av网在线| 免费在线观看成人| 亚洲特级片在线| 亚洲精品一区二区在线观看| 在线免费一区三区| 国产精一区二区三区| 午夜视频一区二区三区| 欧美高清一级片在线观看| 欧美日韩电影在线播放| 从欧美一区二区三区| 午夜私人影院久久久久| 国产精品久久久久精k8| 日韩一级大片在线| 人人狠狠综合久久亚洲| 成人欧美一区二区三区黑人麻豆 | 日本aⅴ亚洲精品中文乱码| 国产日韩欧美制服另类| 日韩欧美在线123| 精品视频在线免费看| 色婷婷狠狠综合| 国产 日韩 欧美大片| 激情丁香综合五月| 石原莉奈在线亚洲三区| 亚洲激情网站免费观看| 国产精品成人免费| 亚洲国产精品99久久久久久久久| 精品嫩草影院久久| 日韩一区二区中文字幕| 欧美亚洲日本国产| 一本色道久久综合狠狠躁的推荐 | 日韩精品欧美精品| 一区二区三区四区在线| 亚洲精品欧美专区| 亚洲欧美综合色| 亚洲日本丝袜连裤袜办公室| 久久精品男人天堂av| 精品国产免费人成在线观看| 日韩欧美国产小视频| 精品久久久久久久久久久久包黑料| 日韩欧美不卡在线观看视频| 精品国产乱子伦一区| 国产色综合久久| 国产精品三级在线观看| 国产精品国产三级国产aⅴ无密码| 国产精品天天看| 亚洲日本丝袜连裤袜办公室| 欧美日本不卡视频| 欧美精品aⅴ在线视频| 欧美一区二区播放| 久久女同精品一区二区| 国产区在线观看成人精品| 中文字幕亚洲一区二区av在线| 最新热久久免费视频| ㊣最新国产の精品bt伙计久久| 久久亚洲一级片| 18涩涩午夜精品.www| 一区二区三区四区在线播放| 日韩专区欧美专区| 韩国av一区二区三区四区| 成人国产在线观看| 欧美丝袜丝nylons| 欧美电影免费观看高清完整版在线 | 国产欧美日韩久久| 国产精品盗摄一区二区三区| 亚洲一卡二卡三卡四卡五卡| 另类小说色综合网站| 成人精品一区二区三区四区| 色先锋资源久久综合| 日韩小视频在线观看专区| 国产婷婷色一区二区三区四区| 亚洲欧美在线视频观看| 毛片基地黄久久久久久天堂|