11-21-2012
That seems a bit beyond me DGPickett, lol. But I do see how multi-threading would make searching multiple things a lot faster.
I'm planning on using multi-threads for my upcoming Digital Forensic's assignment. Need to write a program to crack a password entered in (no encryption).
What I'm going to do is have one thread per character of password entered, go through the ascii table on each, writing 8 characters to a string and compare that to the string entered.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I just tried to run this command: /usr/lib/sendmail -d0.1 -bt < /dev/null | grep -i version
Its doing what I want: writing out the sendmail version.
But on some machines it writing the version and then exit to the prompt but on others its writing the version but then hangs, I need to... (0 Replies)
Discussion started by: jOOc
0 Replies
2. Solaris
hi all,
i had a program which created a socket on port 7113, but for some reason the program was hunbg and I had to Ctrl+c it. I ran the program for a couple of times and now when I do a netstat -a I see that these sockets are lingering and that might be the reason why my program is not... (1 Reply)
Discussion started by: Naanu
1 Replies
3. UNIX for Dummies Questions & Answers
Ok, this question my be different. I can ping our unix box, but when we I to access the webpage I cant. To access the webpage I type http://ipaddress:some port. How do I check if a port is hanging and how would I un hang it. Sorry if question doesnt make sense. (1 Reply)
Discussion started by: NycUnxer
1 Replies
4. Shell Programming and Scripting
Hello,
I have the following shell script and when i execute, it keeps hanging and nothing happens
Please let me know.
Requirement is to read data from file and pass it to the sql and create files as shown.
code
/********
#!/bin/sh
while read user.dat
do
echo "user = $1 email =... (1 Reply)
Discussion started by: rakeshsr12
1 Replies
5. Programming
Hi Experts,
I have a programming assignment that asks us to implement a pipegrep function. it basically has 5 stages and each stage has a thread and buffers are used between stages.
am currently implementing stage 1 . In stage 1 am suppose to read directory and store the filenames in buffer1... (15 Replies)
Discussion started by: amejoish
15 Replies
6. Solaris
Hi Folks,
When i execute the command df -kh in my system the o/p hangs..
The command runs fine but takes a lot of time before coming back to the # prompt.
Can anyone please suggest the possible cause and solution?. (10 Replies)
Discussion started by: vivek.goel.piet
10 Replies
7. Shell Programming and Scripting
Hey folks. Long time lurker, first time poster. I'm a bit of a newbie at "coding" (obviously, scripting is a teensy bit different than coding) and I've run into a problem that I just can't seem to get around.
I'm going through a list of servers to check their name, IP, reverse-NSLOOKUP name and... (2 Replies)
Discussion started by: Bearwhale
2 Replies
8. Shell Programming and Scripting
/bin/sed -n '$q;5633653,0 p' lfile
lfile is a log file that is being updated several times a second.
so, the command above figures out the line number it wants in the lfile and then proceeds to output all lines from that line number to the end of the file.
the problem is, the end of the... (2 Replies)
Discussion started by: SkySmart
2 Replies
9. Shell Programming and Scripting
Hi All,
I am transfering a file through sftp. But the script is hanging at exit occasionally.
I am suspecting that sftp is hanging due to buffer size issue.
If that is the case can any body suggest a solution.
Please find the code.
echo "cd /${CUST_ID}/inbound/${SAFET_ID}" >... (0 Replies)
Discussion started by: Girish19
0 Replies
10. Shell Programming and Scripting
Could you please give your inputs on the below issue:
source.xml
<?xml version="1.0" encoding="UTF-16"?>
<P1 >
<C1 type="i"><2></C1>
<V1 type="string"><6.2></V1>
<D1 type="string">
<D2><1.0></D2>
<D2><2.0></D2>
</D1>
......................
......................
many more... (7 Replies)
Discussion started by: unme
7 Replies
LEARN ABOUT OSF1
pthread_rwlock_wrlock
pthread_rwlock_wrlock(3) Library Functions Manual pthread_rwlock_wrlock(3)
NAME
pthread_rwlock_wrlock - Acquires a read-write lock for write access.
LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so)
SYNOPSIS
#include <pthread.h>
int pthread_rwlock_wrlock(
pthread_rwlock_t *rwlock);
PARAMETERS
Address of the read-write lock object to acquire for write access.
DESCRIPTION
This routine attempts to acquire a read-write lock for write access. If any thread already has acquired the lock for write access or read
access, the lock is not granted and the calling thread blocks until it can acquire the lock. A thread can hold only one lock for write
access on a read-write lock.
Results are undefined if the calling thread holds the read-write lock (whether for read or write access) at the time this routine is
called.
If the read-write lock object referenced by rwlock is not initialized, the results of calling this routine are undefined.
If a thread is interrupted (via a Tru64 UNIX signal or an OpenVMS AST) while waiting for a read-write lock for write access, upon return
from the interrupt routine the thread resumes waiting for the lock as if it had not been interrupted.
Realtime applications can encounter priority inversion when using read-write locks. The problem occurs when a high-priority thread acquires
a read-write lock that is about to be unlocked (that is, posted) by a low-priority thread, but the low-priority thread is preempted by a
medium-priority thread. This scenario leads to priority inversion in that a high-priority thread is blocked by lower-priority threads for
an unlimited period of time. During system design, realtime programmers must take into account the possibility of priority inversion and
can deal with it in a number of ways, such as by having critical sections that are guarded by read-write locks execute at a high priority,
so that a thread cannot be preempted while executing in its critical section.
RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Successful completion. The current thread already owns the read-write lock for write or read access. The value specified by rwlock does
not refer to an initialized read-write lock object.
ERRORS
None
RELATED INFORMATION
Functions: pthread_rwlock_init(3), pthread_rwlockattr_init(3), pthread_rwlock_rdlock(3), pthread_rwlock_trywrlock(3),
pthread_rwlock_unlock(3)
Manuals: Guide to DECthreads and Programmer's Guide
delim off
pthread_rwlock_wrlock(3)