Description: 基于DOS的多任务系统的实现
1. 用C语言完成线程的创建和撤消,并按优先权加时间片轮转算法对多个线程进行调度;
2. 改变时间片的大小,观察结果的变化。思考:为什么时间片不能太小或太大;
3. 假设两个线程共用同一软件资源(如某一变量,或某一数据结构),请用记录型信号量来实现对它的互斥访问;
4. 假设有两个线程共享一个可存放5个整数的缓冲,一线程不停的计算1到50的平方,并将结果放入缓冲中,另一个线程不断的从缓冲中取出结果,并将他们打印出来,请用记录型信号量实现这一生产者和消费者的同步问题;
5. 实现消息缓冲通信,并于3,4中的简单通信进行比较;
6. 思考:在线程间进行消息缓冲通信时,若对消息队列的访问没有满足互斥要求,情况会怎么样?-DOS-based multi-tasking system in a. C language to complete the creation and thread lift Priority increase as time slice Web algorithm for multiple-thread scheduling; 2. change the timing of the unit size, The results change. Thoughts : Why not films too little time or too much; 3. Assuming two threads to share the same software resources (such as a variable, or a data structure), with record-volume signal to achieve its exclusive interviews. 4. Suppose two threads share a deposit of five integer buffer keep a thread of 1-50 calculating the square, and the results Add buffer, Another constant thread removed from the buffer, and print them out, Please record-volume signal achieve this producers and consumers synchronization; 5. Implementation news buffer communications, and 3, 4 simple comm Platform: |
Size: 4139 |
Author:Li |
Hits:
Description: 基于DOS的多任务系统的实现
1. 用C语言完成线程的创建和撤消,并按优先权加时间片轮转算法对多个线程进行调度;
2. 改变时间片的大小,观察结果的变化。思考:为什么时间片不能太小或太大;
3. 假设两个线程共用同一软件资源(如某一变量,或某一数据结构),请用记录型信号量来实现对它的互斥访问;
4. 假设有两个线程共享一个可存放5个整数的缓冲,一线程不停的计算1到50的平方,并将结果放入缓冲中,另一个线程不断的从缓冲中取出结果,并将他们打印出来,请用记录型信号量实现这一生产者和消费者的同步问题;
5. 实现消息缓冲通信,并于3,4中的简单通信进行比较;
6. 思考:在线程间进行消息缓冲通信时,若对消息队列的访问没有满足互斥要求,情况会怎么样?-DOS-based multi-tasking system in a. C language to complete the creation and thread lift Priority increase as time slice Web algorithm for multiple-thread scheduling; 2. change the timing of the unit size, The results change. Thoughts : Why not films too little time or too much; 3. Assuming two threads to share the same software resources (such as a variable, or a data structure), with record-volume signal to achieve its exclusive interviews. 4. Suppose two threads share a deposit of five integer buffer keep a thread of 1-50 calculating the square, and the results Add buffer, Another constant thread removed from the buffer, and print them out, Please record-volume signal achieve this producers and consumers synchronization; 5. Implementation news buffer communications, and 3, 4 simple comm Platform: |
Size: 4096 |
Author:Li |
Hits:
Description: 线程调度,时间片轮转,优先级设置,对于多任务系统的认识有一定的积极性的斑竹-Thread scheduling, time slice rotation, priority setting, for the understanding of multi-tasking system has some positive Chiloscyllium Platform: |
Size: 2048 |
Author:wabf |
Hits:
Description: 操作系统进程并发模拟系统,以时间片轮处理的方式实现了简单的线程功能,并基于此架构实现多种方式并发运行的进程模拟系统-Concurrent simulation system for the operating system process to the time slice of the way round to deal with a simple thread function and based on this framework a variety of ways to achieve concurrent operation of the process simulation system Platform: |
Size: 3072 |
Author:Louiewiget |
Hits:
Description: 本例主要介绍如何使用正在工作的线程,充分利用时间片完成工作-This example describes how to use the main thread is the work of making full use of time slice to complete its work Platform: |
Size: 33792 |
Author:jack |
Hits:
Description: thread进程调用,根据优先级 时间片调用运行进程-thread process to call, according to the priority call to run the process time slice Platform: |
Size: 1024 |
Author:勒娇囡 |
Hits:
Description: 多线程编程可以使程序具有多条并发执行线索,就像日常工作中由多人同时合作完成一个任务。
2、线程:
(1)线程是指程序的一个指令执行序列,WIN32 平台支持多线程程序,允许程序中存在多个线程。
(2) 在单 CPU 系统中,系统把 CPU 的时间片按照调度算法分配给各个线程,因此各线程实际上是分时执行的,在多 CPU 的 Windows NT 系统中, 同一个程序的不同线程可以被分配到不同的 CPU 上去执行。
-Multithreaded programming can make the program execute concurrently with a number of clues, like the daily work of collaboration by the people while a task. 2, threads: (1) thread is a program instruction execution sequence, WIN32 platform supports multi-threaded program that allows multiple program threads. (2) in a single CPU system, the system according to the CPU time slice allocated to each thread scheduling algorithm, so the thread is actually sharing executive, in the Windows NT multi-CPU system, with a different program thread can be assigned to different CPU up implementation. Platform: |
Size: 1901568 |
Author:tanjing |
Hits:
Description: 操作系统DOS多任务系统代码
有关时间片轮转、线程间切换、线程间通信、-自动检测中英文中译英英译中百度翻译
翻译结果(中 > 英)复制结果
Operating system DOS multi task system code
The time slice rotation, switching between threads, thread communication
Platform: |
Size: 8192 |
Author:陈 |
Hits:
Description: 本书主要针对c/c++语言在商用工程开发中的程序实战进行论述,从需求出发,从商用解决方案的角度来理解c和c++语言的程序设计技巧。首先讨论商用开
发的原则,然后是基础知识、基本技巧,接着是无错化方法,最后提升到世界观层面论述并行开发的正确理念。商用程序员在实际工作中最为关注的无错化、并行、
时间片、内存池、线程池、任务池、工程库和跨平台等相关问题,在本书中都有宝贵的经验总结和理念梳理。本书不是教科书,更多的是在开发技巧、测试调试、工
程代码库等方面给出实例与总结。本书也可以说是教科书,作者试图通过实战技巧的训练,帮助读者升华出一种全新的程序设计理念。本书可以帮助你摆脱
“training”式编程开发思维与方法,培养“商用”和“产品”标准的工程开发技能。
本书适合作为c和c++的程序员进行“商用化开发”和“工程化开发”的参考。-The book mainly discussed for c/c language program in the development of commercial projects combat needs, from the perspective of commercial solutions to understand the c and c language programming skills. First discussion of a commercial open
The principle of the hair, then the basic knowledge and skills, followed by error-free method, and finally elevated to the level view of the world discusses the parallel development the right idea. Commercial programmers of most concern in the practical work error-free, parallel,
Time slice, the memory pool, thread pool, task pool, engineering, library and cross-platform issues in this book has valuable lessons learned and the concept of combing. Book is not a textbook, in the development of skills, testing, debugging, work
Cheng code library examples are given and summarized. The book can also be said of textbooks, the authors attempt to combat skills training to help readers sublimation of a new programming philosophy. This book can help yo Platform: |
Size: 2273280 |
Author:David |
Hits:
Description: 一个自己独立开发的模拟任务切换的简易内核,采用动态私有任务栈,时间片轮询模式用户还可自行添加新的线程;经过测试,没有问题。适用于Arm7内核的各款芯片-Simple kernel of an independently developed simulation task switching, dynamic private task stack, the time slice polling mode, users can also add their own new thread tested, there is no problem. Sections of the chip for Arm7 kernel Platform: |
Size: 1024 |
Author:吴爱军 |
Hits:
Description: 并行是指时间上的同时处理。并发是将程序分成多个线程分段执行,通过调度线程执行顺序,来实现多个程序对于用户来说是同时运行的,就像你可以听歌的同时修改文档一样。但具体到线程级别的话,这些线程实际上是线性执行的,只不过执行消耗的时间片实在太短,人感觉不出来,只是觉得两个程序都在正常运行。目前能算得上并行的话也就多核技术了,而且还得解决同步问题,只能说更加接近并行的概念。-Parallel processing is the same in time. Concurrency is staging a program into multiple threads, thread scheduling through the execution order to achieve multiple programs are running simultaneously for the user, just like you can listen to music at the same time modify documents. But specific to the thread level, these threads are actually linear execution, but execution elapsed time slice is too short, people do not feel it, just think both programs are running. Currently words can also be regarded as a parallel multi-core technology, and it had to solve the synchronization problem, only that closer parallel concept. Platform: |
Size: 2113536 |
Author:王林 |
Hits: