Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Can applets create threads?

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a question from a mock exam:
A malicious applet has been developed to slow a machine down by calculating square roots of huge numbers (thus using plenty of CPU) and by creating a new thread every few seconds. Will this applet work or should the Java security manager stop it? (assuming a strict java security policy)

Surprise surprise the correct answer is the applet will work!
Whereas I knew the security.policy file cannot limit the CPU resources the applet uses, I would have thought that it can limit thread creation. I am pretty sure the security.policy can avoid an applet creating processes, but not that sure about threads.
Any suggestions?
Thanks
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the applets can create a threads !
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is thought to be an annoyance as opposed to a serious security problem. If you closed your applet viewer the problem goes away. On the otherhand the ability to run animations, downloads, calculations and keep a UI going at the same time is a nice feature.
 
It's feeding time! Give me the food you were going to give to this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic