the summary of thread

操作系统代码实现:Number Project Name Content Summary State Type 一、Process Scheduling Algorithm Simulation 1、 Simulate the operation of the round-robin algorithm for process scheduling. 2、 Create at least 15 processes and output their scheduling situation under the scheduling algorithm mentioned above and output it to theterminal to check the execution of the algorithm. 3、 The output should include the arrival time of the processes, the end time, and the average execution time. Essential. General 二、Readers-Writer Problem Implmentation 1、 A data set is shared among several concurrent processes: Readers – only read the data set; they do not perform any updates. Writers – can both read and write. 2、 Problem – allow multiple readers (at most 8) to read at the same time. Only one single writer can access the shared data at the same time. Essential. General 三、Program for Least Recently used Algorithm 1、 Create a page access sequence (page number range 0-18) using a random function. The sequence length is 54 and assume that the number of main memory frames allocated to the thread is 6, that is, M = 6. 2、 Implement the LRU algorithm for page replacement on the above access sequence. 3、 Output the page replacement sequence and the page fault rate. Essential. General Requirements 1、 For each experiment project, submit a design report and code. The code should be implemented in C++. The requirements are as follows: a) The content of the design report should include the design ideas and implementation. b) The results of the design report should include testing and running results (screenshots of screen outputs). c) The conclusion of the design report should summarize the problems encountered, the solutions and experiences during the implementation process.
06-08
tcw@tcw:~/src$ valgrind --leak-check=full ./f ==112462== Memcheck, a memory error detector ==112462== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==112462== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==112462== Command: ./f ==112462== ==112462== Warning: client switching stacks? SP change: 0x1fff000048 --> 0x1ffe7fff80 ==112462== to suppress, use: --max-stackframe=8388808 or greater ==112462== Invalid write of size 8 ==112462== at 0x108A46: compute_all_shortest_paths (in /home/tcw/src/f) ==112462== Address 0x1ffe7fff88 is on thread 1's stack ==112462== ==112462== ==112462== Process terminating with default action of signal 11 (SIGSEGV) ==112462== Access not within mapped region at address 0x1FFE7FFF88 ==112462== at 0x108A46: compute_all_shortest_paths (in /home/tcw/src/f) ==112462== If you believe this happened as a result of a stack ==112462== overflow in your program's main thread (unlikely but ==112462== possible), you can try to increase the size of the ==112462== main thread stack using the --main-stacksize= flag. ==112462== The main thread stack size used in this run was 8388608. ==112462== Invalid write of size 8 ==112462== at 0x4A2C650: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so) ==112462== Address 0x1ffe7fff78 is on thread 1's stack ==112462== ==112462== ==112462== Process terminating with default action of signal 11 (SIGSEGV) ==112462== Access not within mapped region at address 0x1FFE7FFF78 ==112462== at 0x4A2C650: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so) ==112462== If you believe this happened as a result of a stack ==112462== overflow in your program's main thread (unlikely but ==112462== possible), you can try to increase the size of the ==112462== main thread stack using the --main-stacksize= flag. ==112462== The main thread stack size used in this run was 8388608. ==112462== ==112462== HEAP SUMMARY: ==112462== in use at exit: 8,429,576 bytes in 1 blocks ==112462== total heap usage: 1 allocs, 0 frees, 8,429,576 bytes allocated ==112462== ==112462== LEAK SUMMARY: ==112462== definitely lost: 0 bytes in 0 blocks ==112462== indirectly lost: 0 bytes in 0 blocks ==112462== possibly lost: 0 bytes in 0 blocks ==112462== still reachable: 8,429,576 bytes in 1 blocks ==112462== suppressed: 0 bytes in 0 blocks ==112462== Reachable blocks (those to which a pointer was found) are not shown. ==112462== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==112462== ==112462== For counts of detected and suppressed errors, rerun with: -v ==112462== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) 段错误 (核心已转储)
10-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值