• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

address space?

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone!
could anyone please tell me what is meant by an address space in terms of threads( from the definition that threads share the same address space).

Thanks in advance,
Ravissant Markenday
 
Ranch Hand
Posts: 443
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two threads share the same same addressable memory i.e. two threads can access the same memory location (they run in the same process\JVM). If the threads run in seperate address spaces i.e. different processes -> seperate JVM's then changes in memory are not visible to the other thread. Basically all it means if you change the same variable in two threads they can see the results of the other threads actions (ignoring memory barrier issues etc etc), if they ran in sperate address spaces (JVM/processes) this can't happen as the JVM prevents it (if it didn't a good OS would)

In old school terms an application on a theoretical OS might be assigned one range of physical memory address and another application (process\JVM) another range to run so they both have their own address space and shouldn't write to the other i.e. one thread might have access to memory locations 1000-2000 and annother in a seperate process 2000-4000 (obviously what I have described there is a GROSS simplification and not a real world example i.e. completely ignored address mapping \ virtual memory etc etc etc . Its a bit easier to understand if you do C++ with pointers etc.
 
Ravissant Markenday
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the detailed reply Chris!
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic