{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

21 - -= Professional Aptitude Council Online Assessement...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -= Professional Aptitude Council: Online Assessement - Mozilla Firefox Ea Edit DEW Htgtory flookmarks got: flab insane . http:mracleindiaproaptitude.comfcommonionlineexamftest.php \v_ "H Eh Digital finger print technology it] fineleasa Notes IFedora Project .Fled Hat .Free Content 3. Email: Email from ‘ . Professional Aptitude ... fl 1111111111 1111111111 E 11m1=<111 _ IafiO - 20_ Now suppose that a similar program reads and checks words from many files. The programmer has decided to implement this extension by having a separate input thread for each file while keeping the single output thread. The input thread code is changed to: while not and of file read. word while not q.qetLoCk(l Bleep 500mg while q is full sleep 10m! q. add {ward} q. freeLock H The queue implementation is extended as follows: (a) adding a "locked" flag to the queue data structure (b) adding an operation getLockO that returns false if the flag is set otherwise it sets the flag and returns true (c) adding an operation freeLockO that unsets the flag Assuming that threads cannot be suspended during the execution of q.getLock or q.freeLock. what problems could occur with this approach? . Professional Aptitude Untitledl - Openoffice.c EEK Omcle [email protected]|106:— - Shell 1nd)! I“ Wednesday 06125.08 ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online