本文介绍了模拟器程序设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我应该模拟操作系统如何使用C ++语言的信号量解决读者读写器问题.我花了3天的时间不停地工作(不是字面上的; P),因为它似乎没能完成工作,所以我想重新设计一个新的设计.有谁知道如何做这样的事情?
*程序应该具有读取器和写入器进程,但不一定必须是多线程的(我不知道如何在不使用我难以编程的线程的情况下拥有该线程).我所知甚少:((}
*程序应告知是否某个进程试图进入放置的关键部分而失败,因为另一个进程已经存在

请帮助我...我只有到星期一才能这样做:((<

Hello everyone,
I''m supposed to simulate how the operating system solves the reader writer problem using semaphores in c++ language. I spent 3 days working non-stop ( not literally ;P ) on it put it doesn''t seem to do the job so i''m thinking of starting over with a new design. Does any have any idea how to do such a thing??
* The program should have reader and writer processes yet it doesn''t necessarily has to be multi threaded { i don''t know how to have that without using threads which are so hard for me to program ->> i know so little :(( }
* The program should tell if a process tried to enter the critical section put couldn''t because another process is already there

please help me ... I only have till Monday to do it :((

推荐答案



这篇关于模拟器程序设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 03:21