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;">

                亚洲国产成人午夜在线一区| 国产精品亚洲专一区二区三区| 久久久久久久免费视频了| 精品一二线国产| 国产日韩欧美亚洲| 国产91精品一区二区麻豆亚洲| 欧美精品日韩综合在线| 亚洲一区二区黄色| 久久久久久亚洲综合| 亚洲国产精品视频| 久久精品99久久久| 97久久超碰精品国产| 国产毛片精品视频| 日韩有码一区二区三区| 亚洲免费观看在线观看| 国产精品福利电影一区二区三区四区| 成人黄动漫网站免费app| 亚洲成人资源网| 精品精品欲导航| 在线欧美小视频| 欧美日韩国产综合视频在线观看| 韩国av一区二区三区在线观看| 午夜日韩在线观看| 久久久亚洲高清| 一本到三区不卡视频| 日韩一区二区精品在线观看| 欧美电视剧在线观看完整版| 亚洲色图视频网| 午夜精品久久久久久久99樱桃| 五月激情综合婷婷| 久久99精品久久只有精品| 国内精品国产成人国产三级粉色| 白白色亚洲国产精品| 亚洲精品五月天| 精品国产乱码久久久久久免费| 免费高清在线一区| 精品国产成人在线影院| 国产欧美精品在线观看| 99re热这里只有精品视频| 风间由美性色一区二区三区| 日韩成人免费在线| 裸体健美xxxx欧美裸体表演| 亚洲第一二三四区| 日韩精品视频网站| 精品在线一区二区三区| 丁香激情综合国产| 国产精品123| 处破女av一区二区| 精品免费视频.| 国产精品久久久久一区二区三区| 色综合久久久久久久久久久| 激情文学综合插| 亚洲欧洲日韩综合一区二区| 亚洲国产精品av| 91蜜桃免费观看视频| 亚洲国产日产av| 国产欧美一区二区三区在线看蜜臀 | 欧美一级生活片| 丁香网亚洲国际| 99久久精品国产网站| 亚洲免费av观看| 51精品久久久久久久蜜臀| 懂色av一区二区夜夜嗨| 亚洲一区在线视频观看| 欧美一区二区三区在线看| 国产精品88av| 午夜精品一区二区三区电影天堂| 亚洲色图制服诱惑| 99国产精品久久久久| 国产精品午夜在线| 国产999精品久久| 丝袜美腿成人在线| 国产成人精品一区二| 制服丝袜av成人在线看| 青娱乐精品视频| 丝袜亚洲精品中文字幕一区| 无码av中文一区二区三区桃花岛| 欧美精品一区二区三区久久久| 精品福利二区三区| 色综合天天综合网国产成人综合天| 国产精品久久久久久久第一福利 | 激情综合亚洲精品| 日本特黄久久久高潮| 懂色一区二区三区免费观看| 成人高清免费在线播放| 久久91精品国产91久久小草| 国产乱码精品一区二区三区五月婷| eeuss鲁一区二区三区| 欧美精品在线视频| 亚洲精品在线电影| 国产精品正在播放| 欧美一区二区三区在线电影| 天天综合色天天| 一本色道a无线码一区v| 亚洲精品一区在线观看| 欧美日韩在线三区| 精品国精品国产| 国产自产高清不卡| 欧美日产国产精品| 午夜成人免费电影| 一本到高清视频免费精品| 国产精品自在欧美一区| 欧美亚洲国产怡红院影院| 日韩欧美黄色影院| 国产成人精品网址| 成人午夜电影久久影院| 狠狠色狠狠色综合| av不卡在线播放| 91精品一区二区三区在线观看| 国产婷婷色一区二区三区| 亚洲欧美偷拍卡通变态| 九九视频精品免费| 白白色 亚洲乱淫| 欧美亚洲日本国产| 欧美国产乱子伦| 日本不卡视频一二三区| 男女男精品视频| 国产日韩欧美亚洲| 无吗不卡中文字幕| 国产999精品久久久久久绿帽| 欧美日韩国产精选| 亚洲国产精品精华液2区45| 欧美色综合天天久久综合精品| 欧美午夜免费电影| 中文字幕一区二区三区在线不卡| 亚洲综合久久av| 久久久91精品国产一区二区精品| 日韩激情一二三区| 国产午夜精品在线观看| 麻豆国产精品一区二区三区| 国产精品你懂的| 777午夜精品视频在线播放| 日韩精品亚洲一区二区三区免费| 欧美精品一区二区在线观看| 国产乱子伦视频一区二区三区| 午夜精品视频一区| 9191精品国产综合久久久久久| 欧美专区在线观看一区| 精品久久久影院| 成人小视频在线| 9191国产精品| 免费在线一区观看| 国产精品久99| 中文字幕人成不卡一区| 91年精品国产| 午夜精品久久久久久久蜜桃app| 亚洲丝袜制服诱惑| 日韩理论片一区二区| 精品国产一区二区三区av性色| 精品国产一区二区三区四区四 | 亚洲国产日韩在线一区模特| 风流少妇一区二区| 欧美激情一区在线观看| 日韩国产欧美一区二区三区| 亚洲欧美福利一区二区| 中国av一区二区三区| 欧美高清视频www夜色资源网| 91丨九色丨蝌蚪丨老版| 亚洲国产欧美一区二区三区丁香婷| 久久九九99视频| 亚洲国产精品ⅴa在线观看| 日本精品裸体写真集在线观看| 日韩专区一卡二卡| 亚洲成人手机在线| 欧美巨大另类极品videosbest| 日韩激情视频网站| 精品国产凹凸成av人导航| 国产精品影音先锋| 久久蜜臀精品av| 欧美久久久久免费| 综合久久久久久| 99国产精品久久久久久久久久| 亚洲欧美综合在线精品| 在线看不卡av| 老司机免费视频一区二区三区| 国产亚洲精品aa| 国产精品视频线看| 狂野欧美性猛交blacked| 国产午夜亚洲精品理论片色戒 | 91精品欧美一区二区三区综合在| 亚洲久草在线视频| 日本韩国一区二区三区| 日本伊人色综合网| 日韩午夜电影在线观看| 国产一区高清在线| 18成人在线视频| 欧美tickling挠脚心丨vk| 国产91高潮流白浆在线麻豆 | 亚洲国产日韩在线一区模特| 国产欧美一区二区三区网站| 欧美日韩不卡视频| 一本大道久久a久久综合| 久99久精品视频免费观看| 日韩理论电影院| 国产日韩精品一区| 日韩三级在线免费观看| 欧美日韩视频在线观看一区二区三区| 韩国av一区二区三区在线观看| 亚洲一区二区三区三| 欧洲在线/亚洲|