关于操作系统线程的java题目
The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8, .... Formally,it can be expressed as:
f ib0 = 0
f ib1 = 1
f ibn = f ibn?1 + f ibn?2
Write a multithreaded program that generates the Fibonacci series using
either the Java, Pthreads, or Win32 thread library. This program should
work as follows: The user will enter on the command line the number
of Fibonacci numbers that the program is to generate. The program will
then create a separate thread that will generate the Fibonacci numbers,
placing the sequence in data that is shared by the threads (an array is
probably the most convenient data structure).When the thread finishes
execution, the parent thread will output the sequence generated by the
child thread.
写一个多线程程序可以生成的斐波纳契级数,使用Pthreads Java线程库,或Win32线程库。
这个程序应该满足如下:用户将输入命令行参数,生成斐波纳契数。这个程序将创建一个
独立的线程,使得产生斐波那契数,放置在数据序列的线程共享的(数组是最便捷的数据结
构)。当线程结束执行时,将父线程输出产生的子线程输出。