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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          91久久在线| 国产综合亚洲精品一区二| 国产精品大片免费观看| 洋洋av久久久久久久一区| 亚洲视屏一区| 国产精品欧美久久| 欧美一区二区三区视频| 欧美国产视频在线观看| 国产欧美在线播放| 激情成人av| 久久综合伊人77777尤物| 黄色精品一区| 欧美有码在线观看视频| 在线观看欧美| 国产精品久久一区二区三区| 亚洲一区三区电影在线观看| 欧美日韩专区| 在线观看欧美日韩国产| 欧美日韩精品一区二区在线播放 | 午夜国产欧美理论在线播放| 久久精品国产v日韩v亚洲| 国产日本欧美视频| 久久精品二区| 国产精品日韩欧美一区二区三区| 亚洲一区二区免费视频| 欧美日韩一区二区三区四区在线观看| 妖精视频成人观看www| 一区视频在线| 午夜视频久久久| 欧美午夜精品久久久久久人妖| 久久电影一区| 亚洲乱码国产乱码精品精98午夜 | 久久国产手机看片| 99在线精品视频| 欧美美女喷水视频| 久久综合九色99| 国产精品综合av一区二区国产馆| 欧美亚洲一级片| 亚洲成人在线网| 国产精品网站一区| 欧美国产一区二区在线观看| 久久综合狠狠综合久久综青草| 亚洲日本中文字幕| 亚洲影院免费观看| 你懂的一区二区| 一个色综合av| 国产欧美另类| 欧美一区二区在线| 一区二区免费在线播放| 亚洲国产成人精品久久久国产成人一区| 久久理论片午夜琪琪电影网| 亚洲作爱视频| 亚洲欧美日韩一区| 99国产精品久久久| 18成人免费观看视频| 国产精品美女久久福利网站| 欧美日韩视频在线一区二区| 国产一区二区三区电影在线观看| 欧美午夜免费电影| 欧美成人国产| 国产精品久久久久9999| 欧美极品在线播放| 免费高清在线一区| 亚洲国内精品在线| 激情欧美国产欧美| 亚洲电影毛片| 亚洲欧洲美洲综合色网| 亚洲免费不卡| 日韩亚洲欧美一区二区三区| 日韩亚洲在线| 99视频一区二区三区| 亚洲视频一区二区免费在线观看| 一本到12不卡视频在线dvd| 99视频有精品| 久久国产精彩视频| 午夜国产精品视频| 亚洲激情图片小说视频| 亚洲精品美女| 中文欧美字幕免费| 免费日韩一区二区| 亚洲一区免费网站| 欧美日韩亚洲综合在线| 欧美96在线丨欧| 欧美视频一区二区三区| 久久婷婷久久| 欧美日韩高清在线| 国产综合色在线| 亚洲激情在线观看视频免费| 亚洲一区在线观看免费观看电影高清| 欧美亚洲在线观看| 蜜桃伊人久久| 欧美日韩中文字幕日韩欧美| 欧美日本国产| 国产精品入口日韩视频大尺度| 国产午夜精品久久| 先锋亚洲精品| 欧美日韩精品免费观看视频完整 | 在线综合欧美| 久久精品国产99国产精品澳门| 久久久人成影片一区二区三区观看| 久久亚洲精品中文字幕冲田杏梨| 欧美日韩另类字幕中文| 国产精品资源在线观看| 亚洲激情网站免费观看| 性欧美1819性猛交| 欧美日韩亚洲视频一区| 国际精品欧美精品 | 国产一区二区三区日韩欧美| 欧美一区二区视频在线| 欧美日韩国产色综合一二三四| 禁久久精品乱码| 亚洲色图在线视频| 欧美a级大片| 亚洲精品一区二| 久久午夜视频| 国产婷婷精品| 亚洲电影免费观看高清| 国产精品视频免费在线观看| 亚洲高清三级视频| 99国产精品99久久久久久| 久久久久亚洲综合| 国内精品美女av在线播放| 亚洲图片欧洲图片日韩av| 亚洲一区中文字幕在线观看| 欧美劲爆第一页| 在线欧美一区| 久久不射网站| 国产农村妇女精品一二区| 日韩一级黄色av| 欧美r片在线| 亚洲国产精品尤物yw在线观看| 亚洲毛片视频| 亚洲一区二区免费视频| 亚洲一区二区精品视频| 欧美日本一道本| 一区二区国产精品| 久久福利影视| 国产日产欧美a一级在线| 在线观看国产一区二区| 久久狠狠久久综合桃花| 国产日韩欧美不卡| 性色一区二区| 亚洲日本欧美| 国产深夜精品福利| 欧美精品aa| 久久国产一区二区| 宅男在线国产精品| 亚洲国产高潮在线观看| 国产精品自拍小视频| 欧美紧缚bdsm在线视频| 久久综合激情| 欧美一区二区久久久| 亚洲精品乱码久久久久久蜜桃麻豆| 国产精品私人影院| 欧美日韩一区二区在线| 麻豆freexxxx性91精品| 久久精品一区四区| 亚洲欧洲av一区二区| 宅男噜噜噜66一区二区| 亚洲日本中文字幕区| 在线看欧美视频| 国产一区二区三区免费不卡 | 欧美极品在线观看| 欧美一级午夜免费电影| 亚洲在线不卡| 亚洲欧美中文日韩v在线观看| 在线看日韩av| 亚洲激情网站| 精品99一区二区三区| 国产亚洲欧美另类一区二区三区| 国产免费观看久久黄| 国产精品婷婷| 国产日韩欧美一区二区| 国产欧美日韩精品专区| 国产乱码精品1区2区3区| 国产精品手机视频| 国产亚洲一本大道中文在线| 国产一区二区三区免费在线观看 | 性刺激综合网| 欧美一级夜夜爽| 久久久青草青青国产亚洲免观| 久久99在线观看| 久久久亚洲一区| 欧美成人亚洲成人| 欧美午夜片在线观看| 国产麻豆精品theporn| 国产亚洲欧美日韩日本| 在线电影院国产精品| 亚洲狼人综合| 午夜激情亚洲| 免费久久99精品国产| 欧美日韩亚洲激情| 国产精品一区久久久久| 亚洲第一二三四五区| 99一区二区| 久久精品亚洲热| 欧美美女日韩| 久久综合狠狠综合久久综青草 | 美女性感视频久久久| 欧美日韩午夜|