We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Assignment No. 03

Semester: Fall 2016
Web Design and Development -CS506


Total Marks: 20


Due Date: January 17, 2017


Please read the following instructions carefully before submitting assignment:

  • You should submit your assignment before or on due date on VULMS.
  • Your assignment should be in word file.
  • Your assignment should be your own work in your own words. It should not be copied from internet, handouts or books.
  • Assignment sent via Email will not be replied and accepted in any case.
  • If the submitted assignment does not open or file is corrupt, it will not be marked and awarded Zero marks.


  • To build knowledge about how multithreading works in Java
  • To know how multithreading relates to operating systems terminologies.


For any query about the assignment, contact at CS506@vu.edu.pk


Question 1:                                                                                                                                Marks 10     

Discuss each of the following terms in the context of Java’s threading mechanisms: Each discussion should not be increased more than three lines.








Question 2:                                                                                                                                Marks 10     

There are two well-known problem in operating system i.e. deadlock and indefinite postpone. You are required to describe a scenario in which these problems may occur during the execution of multithreaded java program.


Note: Description of your scenario should not increase from 15 lines.




+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

See Your Saved Posts Timeline

Views: 4739


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>



For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.


.•°How to Download past papers from study groups°•. 

Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....

Q No 2 kaisye ho ga any one help???

no idea

Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....

is this answer ok for Q2

In a Java multi-threaded program indefinite postpone and deadlock may occur when a low priority thread has resources that another high priority thread wants and the high priority thread has resources that the low priority thread wants, but due to the high priority of the 2nd thread it will not preempt the processor and hence the low priority thread cannot finish its execution to release the lock on the resources it has.

first question ka answer plz share kr den.

yar main keh raha houn ke yeh teek hai ya nahi lekin tum ne tou blindly copy kar liya aur dosro ka jawab upload karne ko keh rahe ho. yeh teek hai ya nahi?

need answer of q1 plz

Well Question 1 is simple just definitions is your own words. Let me explain Question 2 in detail.

One example for deadlock is synchronization. For example we have two threads consumer and producer where both these two threads are using the same object stock (from database). Stock has quantity and order level.

Producer is producing stock and consumer is consuming the stock at same time so we are synchronizing the stock. And also has some checks for accessing the stock objects.

Now consumer locks the stock object and keeps consuming while there is no enough stock to consume. And producer is waiting for stock object to be free to add more stock but cannot access the stock object because it is locked by consumer. This is a situation of dead lock.

If you set the higher priority to producer thread and he has too much stock to insert then he will never free the stock object for indefinite period of time and consumer will wait for stock object to be free and use it. This is the situation of indefinite postpone or starvation.

Starvation is a situation is which system allot shared resources to one thread that has higher priority and lower priority thread wait to free that resource to use.

Indefinite postpone leads to deadlock.

This is one example don’t copy paste it otherwise you will get ZERO marks.

For better clarity explanation via images.

its a dead lock kya pocho kya btau.

Mandik Churane ki puri koshish kr ra he. sanp chorne ko tyar nahi but pura kha b nahi skta. Its a dead lock.

Final Example from Code (if you have little experience in if/else)

Case tab lia jay ga jab jab team ho gi. or team tab hire hogi jab jab koi case hoga. Its dead lock.

Note: I am note a CS506 Student. This is just for educational purpose. However, all explanation / example is good to understand but you cannot implement in your assignment solution because copy paste is not allowed from book or internet.

I hope now it is easy to understand deadlock and indefinite postpone and you can generate your own example/scenario for your assignment.

Thanks Bye Bye.

I'm totally a self learner start to end.

Compare programming with real life then it is very easy to understand. Chez ghool k pila do agle bande ko kabi bhole na mujhe ye pasnd.

I think jis ne ye example read krli ya dekh li hun ge wo dead lock kbi bhole ga nahi.

hahaha right ,, 


© 2020   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service