日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

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

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

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

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

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

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        国产精品一区二区三区成人| 国产精品久久久久久超碰| 一区二区在线不卡| 久久综合九色综合欧美狠狠| 午夜精品免费在线| 免费在线一区二区| 伊人夜夜躁av伊人久久| 欧美人与性动交cc0o| 媚黑女一区二区| 国产三级精品三级| 国产亚洲永久域名| 黄色日韩在线| 蜜臀av性久久久久蜜臀aⅴ| 欧美超级免费视 在线| 亚洲一级黄色片| 极品尤物一区二区三区| 国产精品狼人久久影院观看方式| 久久夜色精品| 亚洲一区二区三区免费在线观看| 国产精品永久免费视频| 亚洲美女诱惑| 久久精品123| 亚洲小说欧美另类婷婷| 国产精品任我爽爆在线播放| 欧美日韩综合在线免费观看| 男人天堂欧美日韩| 先锋资源久久| 久久久精品午夜少妇| 欧美日韩国产bt| 亚洲精品国产精品国自产在线| 亚洲图片欧洲图片av| 在线免费不卡视频| 国产真实久久| 国产精品麻豆成人av电影艾秋| 欧美在线亚洲综合一区| 欧美激情综合色综合啪啪| 亚洲人成亚洲人成在线观看| 欧美激情综合色综合啪啪| 国产精品一级久久久| 亚洲欧美日韩直播| 欧美一区二区三区久久精品茉莉花| 午夜天堂精品久久久久| 欧美日韩亚洲一区二区三区在线观看| 亚洲一区二区在线看| 国产精品一区毛片| 亚洲精品一区二区三区樱花| 91久久嫩草影院一区二区| 亚洲欧美日韩精品久久久久| 亚洲国产日韩一级| 欧美自拍丝袜亚洲| 在线精品视频在线观看高清| 欧美不卡一卡二卡免费版| 久久―日本道色综合久久| 欧美精品免费在线| 伊人久久噜噜噜躁狠狠躁| 亚洲国产另类 国产精品国产免费| 久久久国产精品亚洲一区| 国内精品久久久久久久97牛牛| 亚洲自拍偷拍福利| 欧美在线免费| 亚洲精品欧洲精品| 在线观看精品| av不卡在线| 中文精品在线| 宅男噜噜噜66一区二区66| 国产日韩在线亚洲字幕中文| 国产九九视频一区二区三区| 一区二区高清视频| 国产美女精品视频| 久久精品国产免费看久久精品| 国产精品揄拍500视频| 一区二区三区**美女毛片| 国产毛片久久| 国产一区二区三区日韩| 午夜欧美电影在线观看| 欧美精品1区2区3区| 久久综合精品一区| 中国成人在线视频| 亚洲激情影视| 久久久久久国产精品mv| 一本一本久久a久久精品牛牛影视| 国产精品免费一区二区三区观看| 一区二区三区视频在线播放| 一区二区欧美在线观看| 欧美日韩专区在线| 亚洲成人在线免费| 欧美精品激情| 免费成人av资源网| 亚洲一级片在线观看| 国产精品免费一区二区三区在线观看| 国内一区二区三区在线视频| 欧美一区二区免费视频| 国产麻豆视频精品| 巨乳诱惑日韩免费av| 牛牛精品成人免费视频| 一区二区三区欧美亚洲| 欧美专区日韩专区| 欧美视频在线免费看| 欧美在线免费视频| 欧美日韩ab| 老司机67194精品线观看| 久久亚洲综合| 久久综合色一综合色88| 久久久久久久999| 午夜欧美大尺度福利影院在线看| 国产主播喷水一区二区| 亚洲国产一成人久久精品| 国产欧美欧美| 红杏aⅴ成人免费视频| 国产日产欧美a一级在线| 欧美jizz19hd性欧美| 亚洲欧美日韩在线综合| 欧美日韩福利在线观看| 在线综合+亚洲+欧美中文字幕| 看欧美日韩国产| 国产精品久久久久99| 好吊色欧美一区二区三区视频| 国产精品一香蕉国产线看观看| 午夜精品在线| 亚洲欧美日韩国产综合精品二区| 日韩亚洲不卡在线| 久热精品在线| 亚洲午夜日本在线观看| 亚洲伊人观看| 欧美精品日韩一本| 欧美成熟视频| 国产午夜精品久久久| 久久精视频免费在线久久完整在线看| 久久成人综合视频| 亚洲三级免费电影| 亚洲一区激情| 欧美午夜视频在线观看| 欧美夜福利tv在线| 久久激情五月婷婷| 老司机精品福利视频| 欧美色精品天天在线观看视频| 性亚洲最疯狂xxxx高清| 这里只有精品视频| 亚洲一区二区欧美| 欧美日韩国产小视频在线观看| 欧美一级理论片| 一区精品久久| 欧美中在线观看| 在线观看欧美亚洲| 亚洲无毛电影| 母乳一区在线观看| 久久aⅴ国产欧美74aaa| 国产日产欧美精品| 欧美怡红院视频一区二区三区| 亚洲图片在区色| 亚洲黄色小视频| 久久国产精品99久久久久久老狼| 免费视频一区二区三区在线观看| 国内视频一区| 国产亚洲综合性久久久影院| 1000部国产精品成人观看| 亚洲在线免费| 国产精品成人aaaaa网站| 99国产精品国产精品久久| 亚洲欧美日本精品| 亚洲私人影院在线观看| 国产亚洲精品bt天堂精选| 日韩一级黄色片| 久久久99爱|