Process vs Program — Concept Check
Questions on Process vs Program. A program is a passive, static set of instructions stored on disk; a process is a program in active execution with its own memory space, OS resources, and lifecycle.
Questions in this quiz
7 questions on Process vs Program — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.You have a Java application running in multiple JVM processes from the same .jar file. One process crashes unexpectedly. What happens to the other processes?
- AThey all crash as they share memory.
- BThey restart automatically.
- CThey slow down significantly.
- DThey continue running unaffected.
2.A developer notices that running multiple instances of a service from the same executable file improves reliability. Why is this the case?
- AInstances run on the same thread, ensuring synchronization.
- BEach instance shares the same memory, reducing errors.
- CInstances communicate directly, bypassing network issues.
- DEach instance has its own memory space, isolating failures.
3.A program is stored as a .exe file on disk. What is it called when it is loaded and executed by the OS?
- AA job
- BA process
- CA thread
- DA task
4.A user runs two instances of a browser, each in a separate tab. What is the relationship between these instances?
- AThey are separate processes.
- BThey are part of the same process but different threads.
- CThey are threads of the same process.
- DThey share the same process ID (PID).
5.What happens when a process running a Java application consumes more memory than available?
- AAll processes using the same .jar file crash.
- BThe JVM handles it by using disk space as memory.
- CThe process automatically reduces its memory usage.
- DThe OS kills the process to free memory.
6.Why might a process running a microservice crash without affecting other instances of the same service?
- AAll instances share the same heap and stack.
- BEach instance runs in a separate process with its own resources.
- CA single process manages all instances, isolating crashes.
- DInstances are synchronized to prevent crashes.
7.In a system running multiple processes from the same program, what ensures that a crash in one does not affect others?
- AShared memory across processes
- BA single PID for all processes
- CProcess isolation with separate address spaces
- DCommon heap and stack for efficiency