日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python实验报告代写价格_代写OS python程序作业、代写代写OS作业、代写OS实验报告...

發布時間:2024/1/23 python 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python实验报告代写价格_代写OS python程序作业、代写代写OS作业、代写OS实验报告... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

代寫OS python程序作業、代寫代寫OS作業、代寫OS實驗報告

日期:2018-06-11 03:21

CSE 304 - Operating Systems

DUE: June 11. Submit in class

Programming Assignment (version 2)

From this assignment, you will learn the basic concept of synchronization (e.g., critical

section).

You will create a program creating/handling multiple processes. Each process is to sort

an integer list in an increasing order. The list is a shared variable (global) among all

processes; it is initialized randomly with [0-99] at the beginning of thread in process. The

list size is 10 (insert integer at most 10 times, then sort). After initialization, the process

will sort the array without any interrupt. At the end, you will release the list for other

processes to use. You should use a semaphore to synchronize between the threads.

A. The size of list is 10.

B. The number of processes is 10.

C. Your output should include each sorted list (in a single line).

D. Your output should report the start/end time of each process. You can calculate

the execution time, perhaps using the python module like ‘timeit’

(https://docs.python.org/2/library/timeit.html).

Task 1. Create 10 sorting processes, run them, and print output like the example below.

Your output may be incorrect, not sorted correctly (meaning that there is no

synchronization among the processes). Please refer to

https://pymotw.com/2/multiprocessing/basics.html for multiprocessing module. The

filename should be ‘sort_process_task1.py’

Task 2. Using multiprocessing.lock() function (it’s equivalent to semaphore) to control

access to critical section. You allow only one process at a time. The final output should

have all 10 lists correctly sorted. The filename should be ‘sort_process_task2.py’

EXAMPLE:

>> ./sort_process_task2.py

##### Process #1 started …

##### Process #2 started …

[1]--> 0 1 2 3 4 5 6 7 8 9 0.007 sec

[2] --> 10 11 12 13 14 15 16 17 18 19 0.006 sec

SUBMISSION:

1. Print out your source code for both tasks: sort_process_task1.py &

sort_process_task2.py

2. Print out the output of your programs (task1 & task2 separately).

3. Write one paragraph explaining your development environment, your program,

and any difficulties you had (no less than 200 words).

NOTE:

1. Python is required.

2. Any platform of your choice is fine, but I’d like to see many Linux (e.g., Ubuntu)

as possible. Use your Virtualbox.

3. Take a good look at the multiprocessing module example. It’s all there.

TRIVIA:

Google is your friend and teacher. Search!

Discuss with your classmates! (DO NOT send me an email first)

I will go over the assignment in class, so don’t worry too much.

總結

以上是生活随笔為你收集整理的python实验报告代写价格_代写OS python程序作业、代写代写OS作业、代写OS实验报告...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。