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

                国产精品水嫩水嫩| 日韩欧美激情在线| 国产乱码精品一区二区三区av| 亚洲成人www| 国产精品久久毛片| 亚洲线精品一区二区三区八戒| 国产人久久人人人人爽| 久久久不卡网国产精品二区| 国产精品久久久久久久久免费樱桃| 欧美国产欧美综合| 肉色丝袜一区二区| 成人黄色在线视频| 日韩一区二区精品| 欧美国产一区在线| 国产精品伦一区| 高清av一区二区| 国产视频一区在线观看| 午夜精品在线看| 91福利在线播放| 中文字幕一区二区三区视频| 成人夜色视频网站在线观看| 精品成人一区二区三区| 精品久久免费看| 国产综合色在线| 精品久久久久久久久久久久久久久 | 国产在线一区二区| 日韩欧美成人激情| 日本中文在线一区| 精品国产三级电影在线观看| 亚洲成人一区在线| 精品日韩一区二区| a级高清视频欧美日韩| 亚洲成a人v欧美综合天堂下载| 8v天堂国产在线一区二区| 日韩国产在线一| 国产日韩欧美在线一区| 亚洲aaa精品| 亚洲国产精华液网站w| 99热在这里有精品免费| 夜夜嗨av一区二区三区中文字幕| 欧美精品久久一区| 成人一区在线看| 中文一区二区在线观看| 91在线视频在线| 久久av资源站| 日本成人在线不卡视频| 久久久不卡影院| 91麻豆精品国产91久久久久久久久 | 99久久综合狠狠综合久久| 亚洲一线二线三线视频| 国产精品你懂的| 欧美成人三级电影在线| 欧美久久高跟鞋激| 欧美日韩一本到| 色94色欧美sute亚洲线路一久| 国内精品自线一区二区三区视频| 亚洲chinese男男1069| wwww国产精品欧美| 精品国产一区久久| 久久精品视频免费观看| 久久久久久影视| 国产精品毛片大码女人| 亚洲三级免费观看| 亚洲午夜精品网| 美国精品在线观看| 国产成人av电影在线| 成人app网站| 91黄色免费网站| 在线欧美日韩国产| 精品国产精品一区二区夜夜嗨| 国产精品丝袜久久久久久app| 国产欧美久久久精品影院| 亚洲日本欧美天堂| 免费成人在线观看视频| 99国内精品久久| 欧美xxxxxxxx| 一级中文字幕一区二区| 一区二区三区产品免费精品久久75| 五月天一区二区| 99re热这里只有精品视频| 51久久夜色精品国产麻豆| 亚洲国产精品成人综合 | 成人激情开心网| 欧美欧美午夜aⅴ在线观看| 国产日韩欧美高清在线| 裸体歌舞表演一区二区| 欧美在线free| 日韩欧美精品三级| 天天色综合成人网| 国产中文字幕一区| 精品福利av导航| 国产精品一二一区| 日韩亚洲欧美高清| 精品一区二区三区久久久| 欧美大片免费久久精品三p| 激情图片小说一区| 国产日韩欧美一区二区三区综合| 国产毛片精品视频| 国产精品午夜电影| 欧美无乱码久久久免费午夜一区| 亚洲制服丝袜av| 欧美一区三区二区| 蜜桃精品视频在线观看| 国产呦萝稀缺另类资源| 精品国产三级a在线观看| 午夜电影网一区| 亚洲最色的网站| 一区二区三区免费在线观看| 欧美在线|欧美| 久久久99精品免费观看| 色哟哟国产精品| 91麻豆精品在线观看| 日本视频中文字幕一区二区三区| 亚洲另类一区二区| 日韩免费视频线观看| 日韩欧美国产一区二区在线播放 | 成人avav在线| 成人avav影音| 91蜜桃网址入口| 天堂在线一区二区| 337p粉嫩大胆噜噜噜噜噜91av| 日韩午夜中文字幕| 一区二区三区高清| 成人av免费观看| 日韩写真欧美这视频| 一区二区成人在线| 国产91高潮流白浆在线麻豆| 91精品黄色片免费大全| 中文字幕巨乱亚洲| 亚洲乱码中文字幕| 成人h动漫精品| 国产日韩精品一区二区浪潮av| 91免费观看视频在线| 亚洲影院在线观看| 老司机午夜精品| 久久欧美一区二区| 欧美高清一级片在线| 亚洲色图视频免费播放| 91传媒视频在线播放| 韩国成人在线视频| 懂色av一区二区夜夜嗨| 欧美xingq一区二区| 激情五月播播久久久精品| 亚洲国产精品国自产拍av| 久久精品99国产精品| 日韩精品在线一区| 国产欧美视频一区二区| 日韩欧美一区二区在线视频| 97久久久精品综合88久久| 久草热8精品视频在线观看| 麻豆精品蜜桃视频网站| 日韩精品电影在线| 人人狠狠综合久久亚洲| 亚洲高清中文字幕| 亚洲图片欧美一区| 男人操女人的视频在线观看欧美| 亚洲三级免费电影| 亚洲一区二区三区四区的| 亚洲精品乱码久久久久久久久| 一区二区三区日本| 亚洲第一电影网| 欧美亚洲自拍偷拍| 欧美日韩三级在线| 日韩免费在线观看| 欧美三级日本三级少妇99| 中文字幕第一区综合| 亚洲欧美另类久久久精品| 日韩理论片中文av| 中文字幕巨乱亚洲| 最新不卡av在线| 欧美日韩精品二区第二页| 亚洲高清视频的网址| 国产精品美女视频| 波多野结衣中文字幕一区二区三区| 7777精品伊人久久久大香线蕉| 国产一区日韩二区欧美三区| 亚洲激情图片一区| 日韩精品自拍偷拍| 欧美区在线观看| 色综合久久综合网97色综合 | 国产成人综合在线观看| 久久99精品国产91久久来源| 成人一二三区视频| 欧美一区二区三区男人的天堂 | 色激情天天射综合网| 国产精品人成在线观看免费| 国产精品久久久久精k8| 午夜亚洲国产au精品一区二区| 97久久精品人人做人人爽50路| 日韩欧美在线123| 这里是久久伊人| 欧美精彩视频一区二区三区| 亚洲国产精品欧美一二99| 国产三级欧美三级日产三级99 | 国产一区不卡视频| 亚洲一二三级电影| 日韩精品一卡二卡三卡四卡无卡| 亚洲麻豆国产自偷在线| 亚洲裸体在线观看| 亚洲欧美成人一区二区三区|