91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

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

代做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個最新渠道
  • 無相關信息
    合肥生活資訊

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

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

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    亚洲欧美大片| 亚洲欧美日韩精品久久久久| 亚洲色图在线视频| 亚洲va韩国va欧美va| 国产一区二区中文字幕| 色综合久久中文综合久久97| 国产精品毛片一区二区三区| 欧美高清视频一二三区| 国产精品伦一区| 久久精品国产一区二区三 | 欧美精品久久久久久久久老牛影院| 国产无人区一区二区三区| 亚洲va韩国va欧美va| 欧美尤物一区| 欧美日韩高清一区二区不卡| 国产精品久久久99| 国产精品一区二区久激情瑜伽| 亚洲网友自拍| 日韩一区二区三区高清免费看看| 亚洲中国最大av网站| av激情亚洲男人天堂| 日本韩国视频一区二区| 中文字幕中文乱码欧美一区二区 | 精品国产欧美一区二区| 丝袜亚洲另类丝袜在线| 91碰在线视频| 欧美精品粉嫩高潮一区二区| 亚洲欧美日韩人成在线播放| av不卡在线观看| 欧美日韩国产在线观看| 亚洲图片一区二区| 午夜精品视频| 日韩一区二区精品在线观看| 青青草精品视频| 亚洲三级影院| 国产欧美日本一区视频| 国产成人精品免费看| 日本韩国欧美三级| 高清免费成人av| 国产综合色产在线精品| 美日韩免费视频| 亚洲欧美激情视频在线观看一区二区三区| 成人精品免费网站| 8v天堂国产在线一区二区| 榴莲视频成人在线观看| 欧美做爰猛烈大尺度电影无法无天| 亚洲免费伊人电影| 欧美日韩一区二区国产| 精品国产一区久久| 福利91精品一区二区三区| 欧美日韩在线观看一区二区 | 欧美精品97| 国产性做久久久久久| 国产欧美日韩亚洲一区二区三区| 欧美午夜一区| 久久精品亚洲精品国产欧美kt∨| 成人免费毛片嘿嘿连载视频| 欧美一区中文字幕| 国产精品影视在线| 欧美精品日日鲁夜夜添| 精品写真视频在线观看 | 国产精品一区二区男女羞羞无遮挡| 色婷婷精品久久二区二区蜜臀av| 亚洲成人免费影院| 一本色道**综合亚洲精品蜜桃冫| 天天影视色香欲综合网老头| 亚洲欧美日产图| 午夜视频一区二区三区| 久久视频一区| 久久国产精品99久久久久久老狼| 欧美日韩亚洲综合一区| 国产在线视频精品一区| 日韩美女视频一区二区在线观看| 国产黑丝在线一区二区三区| 日韩一区二区在线观看视频| bt7086福利一区国产| 国产三级精品视频| 伊人激情综合| 亚洲va欧美va人人爽| 色8久久人人97超碰香蕉987| 久久se精品一区二区| 欧美日韩电影在线播放| 成人性生交大片免费看中文网站| 精品久久国产字幕高潮| 欧美日韩免费精品| 亚洲一区二区精品3399| 在线亚洲+欧美+日本专区| 国产乱人伦偷精品视频不卡 | 亚洲精品一级| 五月天亚洲精品| 91精品国产美女浴室洗澡无遮挡| 成人app在线观看| 中文字幕一区二区三区色视频| 国产精品亚洲综合| 激情综合网最新| 国产三级欧美三级日产三级99 | 日韩高清一级片| 欧美日韩国产一级片| 91免费观看在线| 亚洲午夜私人影院| 欧美一级片免费看| 黑丝一区二区三区| 日本在线不卡视频| 国产婷婷色一区二区三区四区| 国产亚洲毛片在线| 国产乱对白刺激视频不卡| 国产欧美精品一区| 91久久线看在观草草青青| 成人福利视频在线| 亚洲一区二区三区爽爽爽爽爽 | 黄色日韩精品| 激情六月婷婷综合| 欧美国产激情一区二区三区蜜月 | 成人午夜视频在线观看| 一区二区三区日韩在线观看| 555夜色666亚洲国产免| 亚洲高清视频在线观看| 国模冰冰炮一区二区| 国产精品久久777777| 欧美美女视频在线观看| 日韩视频精品| 成人黄色软件下载| 首页欧美精品中文字幕| 久久久激情视频| 欧美综合天天夜夜久久| 黄色成人在线网址| 国产精品99久久久| 亚洲成人一区二区在线观看| 久久人人超碰精品| 欧美天堂一区二区三区| 99精品国产高清一区二区| 国产精品一级黄| 亚洲第一激情av| 国产欧美日韩在线看| 91精品国产91热久久久做人人 | 丁香另类激情小说| 日韩av中文字幕一区二区| 国产精品成人午夜| 精品欧美久久久| 欧美视频一区二区三区在线观看 | 韩国女主播一区| 香蕉加勒比综合久久| 中文字幕免费一区| 精品区一区二区| 欧美二区三区的天堂| 一本色道久久综合精品竹菊| 在线成人欧美| 午夜精品av| 北条麻妃一区二区三区| 国产一区二区毛片| 青青草国产成人av片免费| 一区二区三区在线免费| 国产精品色婷婷| 国产婷婷一区二区| 日韩一区二区精品在线观看| 欧美日韩www| 欧美色爱综合网| 在线观看欧美日本| 色欧美日韩亚洲| 91精品福利在线| 国产精品日韩精品欧美精品| 亚洲激情视频| 亚洲欧洲日本mm| 亚洲国产一区二区三区在线播| 国外精品视频| 狠色狠色综合久久| 国产一区自拍视频| 亚洲无线视频| 在线观看亚洲| 亚洲啪啪91| 99综合在线| 亚洲一区在线直播| 久久精品中文| 欧美亚洲自拍偷拍| 欧美三级视频在线观看| 欧美另类变人与禽xxxxx| 91精品免费在线| 精品久久久久久综合日本欧美| 日韩一级大片在线观看| 91精品国产综合久久久蜜臀粉嫩 | 国产精品久久久99| 韩国三级电影一区二区| 久久精品国产网站| 麻豆久久一区二区| 亚洲一区二区三区四区在线 | 91年精品国产| 色综合色狠狠综合色| 色综合久久综合网97色综合| 国产精品 日产精品 欧美精品| 国产成人精品午夜视频免费| 国产a精品视频| 国产精品亚洲专一区二区三区 | 日韩欧美国产一区二区在线播放 | 亚洲精品一区二区三区香蕉| 欧美变态凌虐bdsm| 国产精品美女久久久久aⅴ| 国产午夜亚洲精品不卡| 久久久久久久久久美女| 精品国产一二三区| 亚洲欧洲综合另类|