日韩精品一区二区三区高清_久久国产热这里只有精品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編程設計
  • 無相關信息
    合肥生活資訊

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

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

    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>
        午夜精品剧场| 久久精品国产免费观看| 午夜一区二区三区在线观看| 亚洲欧洲日本国产| 91久久国产综合久久91精品网站| 欧美日韩在线影院| 激情久久久久久| 亚洲欧洲在线视频| 欧美黄色一区| 国产一区日韩欧美| 精品动漫一区二区| 国产一区二区中文字幕免费看| 欧美另类变人与禽xxxxx| 欧美日韩一区三区四区| 国产精品v欧美精品v日韩精品| 日韩午夜在线电影| 欧美系列一区| 99视频国产精品免费观看| 国产精品www994| 一本色道久久88精品综合| 欧美伦理一区二区| 欧美欧美午夜aⅴ在线观看| 欧美一级网站| 久久久久99| 国产午夜精品福利| 欧美激情一区二区三区不卡| 香蕉久久夜色精品国产| 欧美视频一区二区三区在线观看| 久久久久国产精品www| 欧美精品在线一区二区三区| 日韩视频一区二区| 国产精品一区久久久久| 久久精品国产综合精品| 亚洲午夜国产一区99re久久| 亚洲国产精品一区在线观看不卡| 一区二区三区精密机械公司| 欧美日韩亚洲国产精品| 一区二区三区中文在线观看| 亚洲一二区在线| 麻豆九一精品爱看视频在线观看免费| 99在线热播精品免费99热| 亚洲欧美制服中文字幕| 久久久噜噜噜久噜久久| 欧美日产国产成人免费图片| 国产精品日韩一区二区三区| 久久九九久精品国产免费直播| 国产日韩欧美一区在线| 国产精品久久久久秋霞鲁丝| 欧美日韩国产一区二区三区| 久久久一本精品99久久精品66| 国产亚洲欧美一区在线观看| 国产精品嫩草99a| 亚洲激情在线| 日韩一区二区高清| 亚洲国产高清在线观看视频| 欧美天天视频| 国产欧美激情| 亚洲欧美自拍偷拍| 极品尤物一区二区三区| 日韩视频一区二区三区在线播放免费观看| 精品88久久久久88久久久| 国产一区二区三区在线观看精品| 香蕉成人伊视频在线观看| 亚洲欧美精品在线| 亚洲裸体视频| 欧美日韩国语| 亚洲天堂网站在线观看视频| 久久精品国产清高在天天线| 亚洲第一网站| 在线精品亚洲一区二区| 激情欧美国产欧美| 国产精品青草久久| 亚洲欧美国产日韩天堂区| 亚洲欧洲日韩在线| 国产精品你懂的在线欣赏| 亚洲视频在线看| 欧美另类一区二区三区| 国产视频精品免费播放| 亚洲黄色性网站| 日韩视频在线一区| 99热这里只有成人精品国产| 一区二区精品| 精品电影在线观看| 久久精品综合一区| 日韩一级网站| 国产精品高清免费在线观看| 久久精品欧美日韩精品| 亚洲伊人色欲综合网| 亚洲激情一区| 欧美亚洲在线视频| 一区二区三区免费在线观看| 亚洲永久免费av| 亚洲国产精品一区二区三区| 亚洲国产综合视频在线观看| 久久成人综合网| 日韩午夜av电影| 亚洲四色影视在线观看| 国产一区二区三区高清在线观看| 国产日韩精品一区| 欧美96在线丨欧| 中文日韩在线视频| 亚洲人成在线观看网站高清| 亚洲一区二区三区精品动漫| 欧美成人一区二区三区片免费| 美女视频黄a大片欧美| 欧美午夜视频| 欧美一级片在线播放| 午夜精品久久久久久久| 欧美国产91| 一本久久a久久免费精品不卡| 欧美一区二区三区精品电影| 欧美激情免费观看| 欧美激情va永久在线播放| 亚洲综合另类| 一区二区视频在线观看| 欧美色播在线播放| 99国产精品久久久久久久久久| 99热精品在线观看| 亚洲福利在线观看| 久久精品国产一区二区三| 久久久久99精品国产片| 亚洲精品久久久久久久久久久| 亚洲国产精品黑人久久久| 国产欧美日本| 一本久道久久综合狠狠爱| 久久久噜噜噜久久人人看| 久久xxxx精品视频| 国产精品美女诱惑| 欧美亚洲一区在线| 亚洲激情偷拍| 欧美午夜视频网站| 欧美性感一类影片在线播放| 免费日韩视频| 欧美日韩91| 国产精品二区在线| 一色屋精品视频在线看| 国产精品美女久久| 欧美高清视频一二三区| 亚洲国产高清自拍| 99av国产精品欲麻豆| 亚洲欧美在线x视频| 欧美精品v日韩精品v韩国精品v| 久久久综合香蕉尹人综合网| 国产精品v日韩精品| 亚洲人成在线观看网站高清| 销魂美女一区二区三区视频在线| 日韩视频在线观看一区二区| 欧美色图天堂网| 欧美肉体xxxx裸体137大胆| 欧美激情亚洲国产| 欧美午夜精彩| 国产精品一级在线| 国产午夜精品久久| 国产午夜精品久久久| 国产精品黄页免费高清在线观看| 国产精品久久久久久五月尺| 国产噜噜噜噜噜久久久久久久久| 国产精品99一区二区| 亚洲精品乱码久久久久| 亚洲视频一二三| 性欧美videos另类喷潮| 亚洲国产精品视频| 欧美日韩精品综合在线| 国产麻豆一精品一av一免费|