1. RAM is Secondary Memory and Processor is Main memory.
  2. Programs always exist in Hard Disk memory and when started, instance of program would be loaded as process in Secondary Memory
  3. Thread is part of process. Process is unit of resource and thread is unit of execution
  4. If there is Single core Processor, processor would take turns while executing task called context switching. Task is nothing but piece of code in execution. Task is subset of process.
  5. OS Scheduler governs the context switching. Thread states are stored during context switching so it could be resumed from where it is left. Each Thread has its own Thread Stack
  6. Java thread is nothing but wrapper over OS thread or kernel thread. The reason why Java thread is wrapper around OS thread is only with OS thread the scheduling for processing could be done