Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - c l
Search - c l - List
某贸易中心共10层,设有载客电梯1部。为了处理问题的方便,有以下的限定条件:   (1) 电梯的运行规则是:可到达每层。   (2) 每部电梯的最大乘员量均为K人(K值可以根据仿真情况在10~20人之间确定)。   (3) 仿真开始时,电梯随机地处于其符合运行规则的任意一层,为空梯。   (4) 仿真开始后,有N人(>20人)在该国际贸易中心的1层,开始乘梯活动。   (5) 每个人初次所要到达的楼层是随机的,开始在底层等待电梯到来。   (6) 每个人乘坐电梯到达指定楼层后,再随机地去往另一楼层,依此类推,当每人乘坐过L次(L值可以根据仿真情况在3~10次之间确定)电梯后,第L+1次为下至底层并结束乘梯行为。到所有人结束乘梯行为时,本次仿真结束。   (7) 电梯运行速度为S秒/层(S值可以根据仿真情况在1~5之间确定),每人上下时间为T秒(T值可以根据仿真情况在2~10之间确定)。   (8) 电梯运行的方向由先发出请求者决定,不允许后发出请求者改变电梯的当前运行方向,除非是未被请求的空梯。-a total of 10 layers, with a passenger elevator. To address the issue of convenience, have the following qualifications : (a) lift the operating rules is : can be reached on each floor. (2) each lift crew of the largest volume of all K (K value can be based on the simulation of the 10 to 20 between determined). (3) simulation at the beginning, randomly located in the lift line with its rules of operation arbitrary layer of air staircase. (4) simulation began, a N (gt; 20) at the International Trade Center in one layer, started by ladder activities. (5) Each person must first reach the floors are random, in the bottom wait for the elevator arrived. (6) Each person taken the lift arrived at the designated floor and then another random foot to the floor, and so on, when each rode L (L value c
Date : 2025-12-27 Size : 9kb User : 张虹

c语言,多线程实现简单的终端处理器,读取文件,遇到特殊字符时采取相应操作 -A multi-threaded program using the pthread library. Your assignment is to write a program that emulates a simple terminal handler. The terminal handler process consists of three threads. Thread 1reads characters from input. In the input, some upper case letters represent control characters. Each character read by thread 1 is passed onto thread 2 before another is read. Thread 2 stores the characters as received. However, the following four characters are control characters that ask thread 2 to take action accordingly. B – erase last character from buffer L – insert an end-of-line marker into buffer C – remove contents of buffer U – remove current incomplete line from buffer The third thread, Thread 3, should read complete lines of characters (a line of character is complete, if it has an end-of-line character) from the buffer. Thread 3 should then print this line. Thread 2 should allow access only to completed lines in the buffer. You may assume that a completed line
Date : 2025-12-27 Size : 2kb User : za
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.