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

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

代做UVic CSC360 程序語言

時間:2024-02-27  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯


# Assignment 2

 

## UVic CSC360 Spring 2024

 

**Due Monday March 4, at 11:55 pm** via `push` to your `gitlab.csc`

 repository.

 

## Programming Platform

 

For this assignment your code must work in the Jupyterlab environment

provisioned for you at `https://jhub-cosi.uvic.ca/`.  You may already

have access to your own Unix system (e.g., Ubuntu, Debian, Cygwin on

Windows 11, macOS with MacPorts, etc.) yet we recommend you work as

much as possible with your CSC360 JupyterLab environment. Bugs in

systems programming tend to be platform-specific and something that

works perfectly at home may end up crashing on a different

computer-language library configuration. (We cannot give marks for

submissions of which it is said “It worked on Visual Studio!”)

 

## Individual work

 

This assignment is to be completed by each individual student (i.e.,

no group work).  Naturally you will want to discuss aspects of the

problem with fellow students, and such discussions are encouraged.

However, **sharing of code is strictly forbidden**. If you are still

unsure about what is permitted or have other questions regarding

academic integrity, please direct them as soon as possible to the

instructor. (Code-similarity tools will be run on submitted programs.)

Any fragments of code found on the web and used in your solution must

be properly cited where it is used (i.e., citation in the form of a

comment given source of code).

 

## Use of `gitlab.csc.uvic.ca`

 

Each student enrolled in the course has been assigned a Git repository

at `gitlab.csc.uvic.ca`. For example, the student having Netlink ID

`johnwick` would have their CSC 360 repository at this location:



```

 

Please form the address of your repository appropriately **and if you

have not already done so**  perform a `git clone` in your jupyterlab

environment. You are also able to access this repository by going to

`https://gitlab.csc.uvic.ca` (and use your Netlink username and

password to log in at that page). **If you have already used `clone` to

obtain your repository** the use `git pull` to retrieve files for this

assignment.

 

---

 

## Goals of this assignment

 

This is an opportunity for you to use -- and perhaps wrestle with --

concurrency in an imperative programming language such as C. Some of

the ideas you may use here for solving the problems of cooperating

and competing threads/tasks can be used in other languages such as Java.

 

1. Write a program (`kosmos-sem.c`) that solves the **Kosmos-methoxy-radical**

problem with the use of semaphores.

 

2. Write a program (`kosmos-mcv.c`) that solves the **Kosmos-methoxy-radical**

problem with the use of mutexes and condition variables.

 

---

 

## The **Kosmos-methoxy radical** problem

 

You are hired by an interstellar civilization of much greater intelligence that

ours (!!) who are seeding the universe with the building blocks needed for a

one of their major projects. The specific task you have agreed to help solve

for them is to manage the chemical reaction needed to form **methoxy radicals**

(which is made up of one carbon atom, one oxygen atom, and three hydrogen atoms).

 

Despite the civilization's greater intelligence, they are having trouble getting

the carbon, oxygen, and hydrogen atoms to combine correctly due to some serious synchronization

problems. They are able to create each atom (i.e., one atom equals one thread), and so

the challenge is to get one carbon thread, three hydrogen threads, and one oxygen thread all together at the

same time, regardless of the number or order of thread/atom creation.

 

Each carbon atom invokes a function named `c_ready()`when it is ready to react;

each hydrogen atom invokes a function named `h_ready()`when it is ready to react; and finally each oxygen atom invokes a function named `o_ready()` when it is ready to react.

For this problem you are to complete the code for `c_ready`, `h_ready`, and `o_ready`, adding

whatever code and data structures are needed to solve the problem.

 

Here are some other requirements for solutions:

 

* Skeleton files that will help you get started on the goal are available in

  this repository.

 

* The `h_ready`, `c_ready`, and `o_ready` functions must only delay until there are at least

  one carbon, one oxygen, and three hydrogen atoms ready to combine into the radical.

 

* **You are not permitted** to wait until all threads / atoms are

created such that you then match up atoms once you know what exists.

This means your solution must work when the next atom/thread created

is a hydrogen atom when there exist already one carbon, one oxgygen,

and two hydrogens; or when the next atom/thread created is a carbon

atom when there exist already one oxygen and three hydrogen; and so

forth and so on.

 

* When an arriving atom/thread determines that a radical can be made,

then that atom/thread must cause the radical to be made to indicate

the identities of the carbon atom, oxygen atom, and hydrogen atoms.

Below is an example showing the format of the report, where each line

indicates the atoms in a radical, and the atom/thread in parentheses

was the one that initiated the creation of the radical. For example,

below the 7th radical consists of carbon atom 7, oxygen atom 7,

hydrogen atoms 21 & 22 & 23, and it was the carbon atom that triggered

the creation of the radical

掃一掃在手機打開當前頁
  • 上一篇:代寫ENG3018、MATLAB設計編程代做
  • 下一篇:莆田鞋在哪里買-推薦10個最新渠道
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相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;">

                亚洲美女少妇撒尿| 成人短视频下载 | 国产性做久久久久久| 中文一区二区完整视频在线观看 | 欧美激情一区在线观看| 日韩精品国产精品| 日韩久久精品一区| 精品亚洲成a人| 精品福利av导航| 国产不卡视频一区二区三区| 欧美精品一区二区三区高清aⅴ | 欧美精品久久天天躁| 久久99久久久久久久久久久| 久久人人爽爽爽人久久久| 日韩视频免费直播| 欧美中文字幕一二三区视频| av激情综合网| 国产精品996| 日韩欧美亚洲另类制服综合在线| 色播五月激情综合网| 成人爽a毛片一区二区免费| 成人一区二区视频| 国产福利精品导航| 91网站视频在线观看| jiyouzz国产精品久久| 91伊人久久大香线蕉| 成人久久18免费网站麻豆| 久久精品国产亚洲5555| 岛国一区二区三区| 粉嫩在线一区二区三区视频| 色老汉av一区二区三区| 一本色道a无线码一区v| 国产主播一区二区三区| 成人久久视频在线观看| 99国产精品一区| 欧美日韩成人高清| 91精品啪在线观看国产60岁| 久久综合丝袜日本网| 国产欧美日韩三级| 国产精品久久久久久久久久久免费看| 亚洲最大色网站| 日韩在线一二三区| av中文一区二区三区| av中文字幕亚洲| 国产中文一区二区三区| 在线精品观看国产| 欧美人牲a欧美精品| 中文在线资源观看网站视频免费不卡| 国产情人综合久久777777| 亚洲一区在线看| 蜜桃av一区二区三区电影| 国产69精品久久久久毛片| 色菇凉天天综合网| 在线观看国产日韩| www久久久久| 337p日本欧洲亚洲大胆色噜噜| 亚洲人精品午夜| 亚洲第一精品在线| 国产精品亚洲а∨天堂免在线| 午夜婷婷国产麻豆精品| 国产精品国产精品国产专区不蜜 | 国产精品久久三区| 国产精品午夜电影| 欧美中文字幕久久| 欧美性猛交xxxx乱大交退制版 | 久久久精品黄色| 99视频精品在线| 欧美中文字幕不卡| 久久天天做天天爱综合色| 中文子幕无线码一区tr| 午夜精品久久久久久久久| 国产大陆亚洲精品国产| 国产成人精品一区二| 首页综合国产亚洲丝袜| 成人黄色在线视频| 亚洲精品一区二区三区影院| 亚洲男帅同性gay1069| 精品久久久久香蕉网| 一区二区三区国产精华| 国内不卡的二区三区中文字幕| 日韩一区二区三区精品视频| 亚洲蜜臀av乱码久久精品| 99精品黄色片免费大全| 26uuu欧美| 蜜臂av日日欢夜夜爽一区| 97久久精品人人爽人人爽蜜臀| 日韩精品自拍偷拍| 三级欧美在线一区| 一本大道av伊人久久综合| 2021中文字幕一区亚洲| 蜜臀av一区二区在线观看| 国产.精品.日韩.另类.中文.在线.播放| 欧美一区二区三区播放老司机| 亚洲色大成网站www久久九九| 色94色欧美sute亚洲线路二 | 欧美色倩网站大全免费| 国产精品国产馆在线真实露脸| 精品一区二区在线观看| 91久久香蕉国产日韩欧美9色| 久久久精品蜜桃| 久久97超碰国产精品超碰| 欧美va天堂va视频va在线| 午夜精品一区二区三区三上悠亚| 91免费视频大全| 中文字幕乱码一区二区免费| 国产一区在线观看视频| 国产精品电影院| 成人福利视频在线| 亚洲综合色噜噜狠狠| 一本大道久久a久久精品综合| 自拍av一区二区三区| 91视频在线观看| 国产精品久久久久久妇女6080| 国产黄色精品网站| 欧美丰满嫩嫩电影| 蜜乳av一区二区三区| 91久久精品一区二区| 亚洲最快最全在线视频| 欧美三级在线播放| 日韩不卡免费视频| 日韩精品一区二区三区在线| 久草在线在线精品观看| 欧美经典一区二区三区| 日韩精品五月天| 欧美mv日韩mv国产网站| 国产一区二区三区av电影| 亚洲麻豆国产自偷在线| 欧美视频一区二| 成人免费看视频| 亚洲影院理伦片| 亚洲国产精品激情在线观看| 白白色亚洲国产精品| 美脚の诱脚舐め脚责91| 中文在线一区二区| 日韩一区二区在线看| 国产一区二区剧情av在线| 91精品国产手机| 国产精品影视网| 曰韩精品一区二区| 日韩欧美在线影院| 国产成人久久精品77777最新版本| 自拍偷拍欧美精品| 日韩一区二区三区视频在线观看| 色哦色哦哦色天天综合| 乱一区二区av| 日本 国产 欧美色综合| 欧美激情综合五月色丁香小说| 日韩女优av电影在线观看| 97精品国产露脸对白| caoporn国产精品| 亚洲欧美另类久久久精品| 99re热视频这里只精品 | 综合欧美亚洲日本| 欧美一区二区三区日韩| eeuss鲁片一区二区三区 | 在线观看不卡视频| 国产在线精品一区二区夜色| 亚洲va欧美va人人爽| 国产精品人妖ts系列视频| 美日韩一区二区| 亚洲一区二区在线观看视频| 欧美精品一二三| 99久久亚洲一区二区三区青草| 日韩在线一二三区| 亚洲永久精品大片| 国产精品久久久久久久久免费樱桃| 91精品国产综合久久精品麻豆| 成人av免费在线| 国产精品一区一区| 精品一区二区三区的国产在线播放| 久久久久久久久伊人| 日韩西西人体444www| 欧洲在线/亚洲| 9191精品国产综合久久久久久| 青椒成人免费视频| 亚洲综合男人的天堂| 亚洲三级在线看| 国产精品初高中害羞小美女文| 久久久亚洲高清| 久久影院电视剧免费观看| 欧美成人猛片aaaaaaa| 日韩午夜av一区| 91精品婷婷国产综合久久竹菊| 国产精品影视网| 韩国精品免费视频| 狠狠色狠狠色合久久伊人| 久久成人免费网| 国产精品麻豆久久久| 国产精品久久三区| 国产精品久久久久影院| 中文字幕成人av| 国产精品久久久久aaaa| 日本一区二区三级电影在线观看 | 中文字幕亚洲区| 亚洲狠狠爱一区二区三区| 亚洲视频综合在线| 日韩av不卡一区二区| 美腿丝袜在线亚洲一区| 一本一道综合狠狠老| 在线观看不卡视频|