Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
PROCESS CREATIONWrite a C (or C++) program that can create a collection of processes (each with its base thread) when a user runs the program. Using the standard cmd prompt features, you can "launch" a process just by typing its name. I will need some way to provide multiple command lines to the program. One way to do this is to create a file with the list of commands that I wish to run. The program would then open the file, read a line from the file and create a process to run the command specified in that line. Repeat until all lines in the file have been read. For example, a line in your file might be like "/bin/pwd". Creating a process to run this command will print out the current working directory. This file name should be passed as an argument to the main program. Your main program fetches each line from the file and creates respective processes. The program uses fork and execve (or some other member of the family of exec system calls). Output:******************** START ***************************line is 9 longCOMMAND : /bin/pwd/home/rcotter/cs431/lab2line is 16 longCOMMAND : /usr/bin/whoamircotterline is 8 longCOMMAND : /bin/dfFilesystem 1K-blocks Used Available Use% Mounted on/dev/mapper/vg_kcsce450p2-lv_root 74663088 68578252 2292148 97% /tmpfs 508056 812 507244 1% /dev/shm/dev/sda1 198337 61827 126270 33% /bootline is 10 longCOMMAND : /bin/dateWed Sep 21 10:49:36 CDT 2011******************* END ******************************Second:THREAD CREATIONWrite a C (or C++) program that creates multiple threads, and then terminates after a specified interval. Each of these threads executes a predefined work function. Threads can be created by using the pthread_create system call. The number of threads to be created and a run time are passed as command line arguments. (For example "mythread 3 15" would create 3 threads and keep running for 15 seconds.) The output of each newly created thread should display the number of the thread that is executing the function. (For this, you will need to pass the thread number to the new thread through pthread_create( ) function.)Sample output:Loop 0 of thread 1 work cycleJust created thread 3070872432Loop 0 of thread 2 work cycleJust created thread 3062479728Loop 0 of thread 3 work cycleJust created thread 3054087024The Time Is Now: Wed Sep 21 11:12:20 Loop 9 of thread 1 work cycleLoop 9 of thread 2 work cycleLoop 9 of thread 3 work cycleThe Time Is Now: Wed Sep 21 11:12:29 2011
The Time Is Now: Wed Sep 21 11:12:29 2011
Timer Complete
Write a program that prompts the user to enter time in 12-hour notation. The program then outputs the time in 24-hour notation. Your program must contain three exception classes
give us the first letter of each word, the first half of each word, the reverse of each word, and a palindrome checker to see if the word is a palindrome.
Write a program at level 3 (Instruction Set Architecture Level) that will accept a lower case letter and output the uppercase version of the letter.
Explain the steps for building a rudimentary management system.
Computer programming
Write an iterative function power1 to compute xn for n >= 0 and write a recursive function power2 to compute xn by using the following recursive formulation
Write a C program that asks for and reads in two integers and then reports if one is a multiple of the other.
Pseudo code is an informal high-level and compact description of a computer programming algorithm that uses structural conventions of a programming language. Write a program that obtains two integer numbers from the user
A person has a name and a height in centimeters. Implement a dataset to process a collection of Person objects. Display the average height and the name of the tallest person.
getLowestInRow. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the lowest value in the specif..
After the array is created and loaded, the problem is then to sort the array and print out the contents of the sorted array. Please use a separate function for the sort routine and also a separate function for the print out of the array.
Write a mathematical expression that would predict the level of the ocean at this beach at any time of the day. Find times in the day when the ocean level is exactly at sea level.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd