文件名称:linux1
介绍说明--下载内容均来自于网络,请自行研究使用
本程序分3个子程序,分别使用1个终端运行它们,使用下面的通信机制完成所需功能。
程序1:接受用户输入的信息,包括:help、alarm1、alarm2、quit,并将这些信息分别发送给程序2和程序3。
程序2与程序1通过消息队列1进行通信,当收到help信息后,打开帮助文件helpfile,读取其中的内容,显示出来;当收到quit后,退出程序。
程序3创建2个子进程。程序3与程序1通过消息队列2进行通信,当收到alarm1时,通过信号量1通知子进程1报警(向屏幕输出报警信息);当收到alarm2时,通过信号量2通知子进程2报警(向屏幕输出报警信息)。
要求给出编译所用到的makefile文件。-The program is divided into three sub-programs, respectively, using an end-run them, use the following communication mechanism to complete the desired function. Procedure 1: Accept the information entered by the user, including: help alarm1 alarm2, quit, and information were sent to the program and procedures. Program and procedures through the message queue to communicate, open the help file after receiving help information helpfile read the contents of the displayed Upon receiving the quit exit the program. The program 3 Create two sub-processes. Program 3 and program message queue to communicate, inform the child process semaphore when received alarm1 1 alarm (the alarm information to the screen output) When received alarm2 when the alarm 2 notify the child process via semaphore (alarm information to the screen output). Required to give the file makefile used by the compiler.
程序1:接受用户输入的信息,包括:help、alarm1、alarm2、quit,并将这些信息分别发送给程序2和程序3。
程序2与程序1通过消息队列1进行通信,当收到help信息后,打开帮助文件helpfile,读取其中的内容,显示出来;当收到quit后,退出程序。
程序3创建2个子进程。程序3与程序1通过消息队列2进行通信,当收到alarm1时,通过信号量1通知子进程1报警(向屏幕输出报警信息);当收到alarm2时,通过信号量2通知子进程2报警(向屏幕输出报警信息)。
要求给出编译所用到的makefile文件。-The program is divided into three sub-programs, respectively, using an end-run them, use the following communication mechanism to complete the desired function. Procedure 1: Accept the information entered by the user, including: help alarm1 alarm2, quit, and information were sent to the program and procedures. Program and procedures through the message queue to communicate, open the help file after receiving help information helpfile read the contents of the displayed Upon receiving the quit exit the program. The program 3 Create two sub-processes. Program 3 and program message queue to communicate, inform the child process semaphore when received alarm1 1 alarm (the alarm information to the screen output) When received alarm2 when the alarm 2 notify the child process via semaphore (alarm information to the screen output). Required to give the file makefile used by the compiler.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
linux1\process3.o
......\process2.c
......\process1
......\helpfile.txt
......\process2.o
......\process1.o
......\process3.c
......\process2
......\process3
......\process1.c
......\makefile
linux1