Đang Thực Hiện

PID Manager using threads (limited number)

PID Manager

To identify the range the possible pid values are:

#define MIN_PID 300

#define MAX_PID 5000

Required:

- use data structure (of your choice);

- one strategy is to adopt what Linux has done and use a bitmap (a value of 0 at position i indicates that a process id of value i is available and a value of 1 indicates that the process id is currently in use);

- implement the following API for obtaining and releasing a pid:

int allocate_ map (void)

- create and initialize a data structure for pids (returns -1 if unsuccessful, 1 if successful)

int allocate_ pid (void)

Allocates and returns a pid; returns -1 if unable to allocate a pid (all pids are in use)

void release_ pid (int pid)

Releases a pid

After that:

Add a multithread program that would test previous part of the work. The number of threads are limited (only 100) and each thread will request a pid, sleep for a random period of time, and then release the pod.

This part should test two cases:

That all pids are used and unique.

That pids rotate once you go beyond the maximum amount of available pids.

Then add pthreads to ensure that every pid is safe from race conditions.

Kĩ năng: Linux, Python, Lập trình C, Lập trình C++, Java

Xem nhiều hơn: hide application task manager using 2008, hide process task manager using vbnet, simple file manager using php javascript jamesbenson, file manager using php, hide program task manager using, interface cisco call manager using sip net, file manager using java script html, hide process task manager using visual basic, using infopath calculate number days dates, quiz manager using php mysql, pid control using atmel avr, check process task manager using vbnet, tcp send receive using threads vbnet, java rmi projects using threads, hide application task manager using vbnet, cisco call manager express xml phone number, program hide task manager using vbasic, using hudson build number project

Về Bên Thuê:
( 0 nhận xét ) Évry, France

ID dự án: #23580115

Được trao cho:

EvgeniiKuzin

Hi there! I am a software developer, working in a customer-focused company. I also have my own projects (one of them you can find here [login to view URL]) I am very interested in your project and i can s Thêm

€2 EUR / giờ
(0 Đánh Giá)
0.0

2 freelancer đang chào giá trung bình €3/giờ cho công việc này

xfjin

Hi, glad to bid on your project. I've read the description carefully. I have 10+ years of experiences in software design and development in C/C++. I have good skills to satisfy your demand in time. If I have a chance t Thêm

€4 EUR / giờ
(0 Nhận xét)
0.0