Hi all,
i'm reading Andrew S.Tanenbaum's book --- Modern Operating System.At the part of discussing race condition.And the author gives a solution with using the TSL instruction,say that one process must call the enter_region function before entering the critical regions and call the leave_region after finish hes job,as following:
and i'm ok with that code,but the author gives another similar code and says it is essentially the same as the solution with TSL,code is following:
---------- Post updated at 04:36 AM ---------- Previous update was at 04:32 AM ----------
---------- Post updated at 04:39 AM ---------- Previous update was at 04:36 AM ----------
sorry I forget now the LOCK is already 1 and no process can enter it.....
Hi i am writing a script where i am running , 5 scripts together in 1 script .
Now what i want is when these 5 scripts run completely , i should execute some other commands like i have compile the data etc.
I have have 5 echo statements at the end of all those scripts .
Like echo "1 is done" in... (1 Reply)
I've been experimenting with pseudo-terminals and found something I don't quite understand. Writing an EOF character to the master end doesn't work quite as I expect. Once I've written any other data, the master pty seems to treat a single ^D as a seperator, i.e. writing "abcabc" would let cat do... (1 Reply)
Hi,
I'm currently writing a bash script, that starts multiple threads:
____________________
#!/bin/bash
loop=0
while((loop!=10))
do
thread &
((loop++))
done
#wait for all sub-processes (thread) to finish
wait
___________________
Now I want to know, what happens, if a... (2 Replies)