help needed for an assignment script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help needed for an assignment script
# 1  
Old 12-14-2010
help needed for an assignment script

Hi,
please advise a script/c program for following:

write program p1 which will create shared memory to hold an integer value and will create One child process inside child process run another program say p2 .now p2 will continuousiy assign value 15 to shared memory created by p1. Program p1 will decreament shared memory value by 1 After each second now if shared memory value becomes 0 .p1 will kill program p2 and start p2 again (p1 is called watchdog that continuously monitors the p2 execution and if p2 hang/block for more than 15 second it start p2 again )



Thanks
# 2  
Old 12-14-2010
Home-/coursework goes here. Be sure to read the special rules.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making a bash script and small C program for a homework assignment

Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
Discussion started by: twk101
1 Replies

2. Shell Programming and Scripting

Script needed

Here is a file that I want to run a script to do the following File Content: 0883318739,13010,A,300,abcde 0880123456,5433,C,200,xcvfe 0882344242,4233,N,204,ghfsa Script to be get: Try to have a script that can match all the below criteria 1st field range from 08801xxxxx to 0882xxxxxx... (6 Replies)
Discussion started by: ahmed_as8
6 Replies

3. Shell Programming and Scripting

AWK Variable assignment issue Ksh script

Hi There, I am writing a ksh script which assigns variable values from file "A" and passes that variables to file "B". While passing the parameters an additional "$" sign is being assigned to awk -v option. Could any one help me with this please. #!/bin/ksh head -1... (3 Replies)
Discussion started by: Jeevanm
3 Replies

4. Shell Programming and Scripting

Expect script help needed- script failing if router unavailable

Hey all. Sometimes I'm tasked to change some router configs for the entire network (over 3,000 Cisco routers). Most of the time its a global config parameter so its done with a loop and an IP list as its the same configuration change for all routers. This is working OK. However, sometimes an... (3 Replies)
Discussion started by: mrkz1974
3 Replies

5. Homework & Coursework Questions

help needed for an assignment script

1. The problem statement, all variables and given/known data: Hi, please advise a script/c program for following: write program p1 which will create shared memory to hold an integer value and will create One child process inside child process run another program say p2 .now p2 will... (1 Reply)
Discussion started by: fed.linuxgossip
1 Replies

6. Shell Programming and Scripting

CPU assignment bash script

Hi guys, I'm basically looking for some help with a bash script I've written. It's purpose is to assign process to individual CPU cores once that process hits 15% CPU usage or more. If it drops below 15%, it's unassigned again (using taskset). My problem is that I can't think of a way to... (2 Replies)
Discussion started by: mcky
2 Replies

7. Shell Programming and Scripting

Trying to run a script over ssh, having issues with tty assignment

Hey folks! I'm trying to run a tcpdump command that monitors for possible malicious traffic. I want to be able to run this on any of several remote boxes that I monitor which all have different capture interfaces. I've gotten the script to the point where it logs into the box and attempts to run... (8 Replies)
Discussion started by: JASI
8 Replies

8. Shell Programming and Scripting

help needed in variable assignment

Hi all, I am having some value in feedrow in my script. And want to assign first three character in to DTYPE. I am using following syntax. DTYPE=`$FEEDROW|cut -c 1-3` But it's not assigning this valuse into DTYPE. Please suggest. Its really uegent. Regards, Gander_ss (2 Replies)
Discussion started by: gander_ss
2 Replies

9. UNIX for Dummies Questions & Answers

2 script for assignment.

I need a script that will check if what I input is a file or not. Also a short script that copies a file that I tell it to, to a directory I tell it to. Thanks. Those are the only 2 I need, I got the other 8 done. (1 Reply)
Discussion started by: snyper2k2
1 Replies
Login or Register to Ask a Question