- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dave -
I'm not sure about performance increases (you'll just have to try it and see), but it should be pretty easy to set up a dedicated decryption thread. The first question to ask yourself, though, is "Does the processing allow for two threads(one to decrypt and one to continue with whatever else is going on) to be executing concurrently?" If not, you would just be dividing up a serial process between threads with no benefit and some additional overhead that would adversely affect performance.
How does the decryption process start now? Is there some interrupt that identifies when encrypted data is arriving and the process switches over to the decryption functions? If so, you should be able to spawn a thread early in the execution and, whenever the decrypt signal is seen, wake up the decrypt thread to start processing while the main thread continues with whatever it was doing. Once the work is done, the decryption thread goes back to sleep waiting for the next input. If the decrypted results are needed by the main thread, it can pause execution waiting for a signal from the decrypting thread that the data is available. Otherwise, the main thread would be free to continue processing in parallel with the decrypting thread.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page