| Solaris |
|
|
The following is some key features of fastgrep:
There are three kinds of thread in fastgrep: cascade thread, search thread, sub-search thread
> search thread: it is for the string pattern matching in a regular common file. When fastgrep meets a regular file, one search thread is created.
> cascade thread: it is for the management of the search threads. When fastgrep meets a directory, one cascade thread is created, and it recursively searching in subdirectories.
> sub-search thread: used in search threads. Search thread first checks the size of the file. When the file size is larger than a certain value (eg. 4M), search thread divides the file into blocks and then creates sub-search threads for searching patterns in each block.
The main thread puts the target file/directory into the work queue, while detects in the work queue. When a directory is detected, it creates a cascade thread and then puts the directory into the work queue; when a regular file is detected in the queue, a search thread is created.
The search thread first checks the size of the file. When size is larger than a certain value (eg. 4M), search thread divides the file into blocks and then creates sub-search threads for searching patterns in each block.
Terms of Use
|
Privacy
|
Trademarks
|
Copyright Policy
|
Site Guidelines
|
Site Map
|
Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
© 2012, Oracle Corporation and/or its affiliates.