|
|
Don't forget to set CPU priority to RealTime
|
|
|
|
|
Device a simple shell with the following valid commands:
1. help
a. lists the names of currently available commands
2. add
a. takes 2 command line arguments corresponding to the two input values
3. subtract
a. takes 2 command line arguments corresponding to the two input values
4. multiply
a. takes 2 command line arguments corresponding to the two input values
b. overflows will be truncated
5. divide
a. takes 2 command line arguments corresponding to the two input values
b. this performs only integer division
c. division attempt by zero returns zero.
6. setlog
a. takes one argument indicating the name of the log file [default: q1.log]
7. start
a. starts the logging process to the logfile mentioned above
8. stop
a. stops logging process
9. quit
a. exits out of shell
10. back
a. Usage: back <cmd> <arg1> <arg2>
b. Executes the cmd in back ground and holds the child from exiting till explicitly
mentioned by fetch command
c. Internally, back returns the child id of the process created .
11. fetch
a. Usage: fetch <child id="">
b. childid is the id of the process to be fetched. This will print the result of the
operation performed by child
c. if no childid is given, any of the background children will be fetched.
12. ps
a. list the set of child processes with their process id and the name of the child.
Apart from these set commands, if any other command is typed, then a “Command not found”
error should be printed by your program on to the screen.
All the results from the child processes has to be send to shell process using shared memory
defined on a per-child basis.
If a process has been send to background using the back command, then it must stop itself from
sending the result back to shell. Only when the user types the fetch command, the child must
return the result to the shell.
Every 30 secs, the shell must display the currently running child processes on to the screen. (This
information should not be printed to the log file.)
From the time the start command is given, all the commands typed in the shell, and its results
must be written on to the log files, unless otherwise specified. Commands 1,6,7,8,9 and 12
should not be written to the log file, neither should their results be written.
|
|
|
|
|
Judging by your homework, you should be far enough in your class to know better than to think we'd do it for you.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Heh...
You gotta love these homework questions :p
|
|
|
|
|
You can check this link[^]
*jaans
|
|
|
|
|
Hi there, well i have a question?
i created a MDI form and i created a child for that parent form...am trying to limit the number of the parent's child to one and only one instance of a certain child.
|
|
|
|
|
|
can any body say how can I work with fax??
|
|
|
|
|
There's nothing built in, AFAIK. You'd need a fax driver, I guess.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello everyone...
I am using VS 2003.I have to add a dateTimePicker control and a NumericalUp and Down control to datagrid.How to do that..??? any idea...It will be very helpful if you are explayning with code or sufficient links.
|
|
|
|
|
|
Hi all,
I was wondering if anyone could help me with analyzing/reading other process’ memory space. I need to view the memory space in real-time, while running the application, to be able to segregate the variables storing the application state and various strings that are displayed in UI. Then, I need to be able to locate those variables automatically and read them in real-time, whenever application is running.
For example, take Windows Media Player. I would want to be able to get variables such as: string for song currently playing, state of the player (play/pause, volume, etc.), whenever the application is running in memory. Or, as another example, a list of users currently online on MSN and their status.
Are there any applications that would ease my task (e.g. to analyze memory space first)? What programming language could this be written in? (I assume it would be C/C++, and maybe C#?) How would I go about doing all this?
Thank you very much in advance.
|
|
|
|
|
I don't think that this would be possible because how would you figure out where the string is stored?
|
|
|
|
|
I know I am nekroing this thread, but considering the answer above I just had to:
Yes it is possible, although this is pretty advanced stuff imho and I can only point in the general direction, firstly because its early and I am tired and secondly because it is a very wide field. You will need to reverse engineer the specific target to find out where (at what addresses) it stores the information you need, then access the memory of the process from within your own application (ReadProcessMemory is your friend). Another way would be working with hooks. It is the same concept as writing trainers for games, there you need to find certain memory addresses too and change/freeze them, etc. So if you are still interested in the topic I would suggest reading up on writing trainers, reverse engineering software, API hooks, PE file format and the like. This should take a while :P
I really cant help much more, as what exactly you would need to do totally depends on the target application. Also most developers are not very fond of others reverse engineering their software. While it might not necessarily illegal to do so, many applications nowadays are packed or protected otherwise.
So yes, there are applications that "would ease your task". A debugger would help in actually aquiring the addresses of the data you want to aquire. Ollydbg is a nice and free debugger. You also might want to aquire a hex-editor. Use the programming language of your choice, as long as it supports the WinAPI.
|
|
|
|
|
Hello everyone,
If a and b are both float (or double, I think it does not matter?), and I want to calculate a/b. I am wondering whether there will be any issues which make the calculation result in-accurate compared with the calculation result by-hand (on a paper).
For example, if a is too big, or if b is too small? If such issue exists, what is the best practices to calculate a/b?
thanks in advance,
George
|
|
|
|
|
Floats are not accurate. Decimals are better in terms of accuracy but also slower.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
|
Depending on what is the result value and the precision that you want. Float has 7 while Double has 14 (IIRC) precision so it's generally more precise. But still depending on the value.
|
|
|
|
|
Thanks darkelv,
Any tutorials on this topic?
regards,
George
|
|
|
|
|
I've had float's giving some rather... Awkward answers when dealing with unnaturally large / small numbers.
Use double
double a = 9249716388365591935;<br />
double b = 0.000000000000000000000000000000000001;<br />
double c = (a / b);<br />
MessageBox.Show(c.ToString());
Although, that's the limit of double - "a" cannot be any larger (An extra digit)...
Although, if you actually NEED any larger numbers.....
I'll try find something :p
- Reelix
|
|
|
|
|
Thanks Reelix,
Let me know if you find any good tutorials.
regards,
George
|
|
|
|
|
|
Thanks Reelix!
Good link!
regards,
George
|
|
|
|
|
Moral of the Story:
double j;
|
|
|
|