- 2074 Chaitra · 2+4 marks
Context switching; distributed vs network OS
Short answer
Context switching saves the state of one process/thread and loads another’s, occurring on each node during scheduling or remote calls. A distributed OS offers a single system image with global resource management and transparency, while a network OS exposes multiple independent machines and requires users to know locations.
What do you mean by Context Switching in distributed system? How is distributed OS different from network OS?
Context switching in a distributed system
Context switching is the saving of the state (registers, program counter, stack pointer, memory map) of the running process or thread and loading of the state of another one, so that the CPU is shared. In a distributed system it occurs on each node whenever the scheduler changes the process, and when a process blocks on a remote call (RPC/RMI) or a message. Entering the kernel through a system call needs a cheaper mode switch between user mode and kernel mode.
- Process context switches are costly (address space, caches, TLB), thread switches are cheaper, which is why multithreaded servers are used.
- Process migration also needs the context to be transferred to another machine.
- The overhead should be reduced by threads, lightweight IPC and a microkernel.
Distributed OS versus network OS
| Point | Distributed OS | Network OS |
|---|---|---|
| View | Single system image | Collection of separate computers |
| Transparency | High | Low; users know the location |
| Resource management | Global, by the OS | Local on each node |
| Process placement | OS decides, may migrate | User chooses the machine |
| OS on nodes | Same (homogeneous) | May differ |
| Communication | Message passing/RPC built in | File transfer, remote login via services |
| Fault tolerance | Better | Depends on user |
| Examples | Amoeba, Mach | Windows Server, UNIX + NFS |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Network OS vs distributed OS · Distributed System, chapter 3
- Short note: Distributed OS · Distributed System, chapter 3
- Autonomous vs distributed system · Distributed System, chapter 1
- Models of distributed system · Distributed System, chapter 1
- True distributed system; middleware organisation · Distributed System, chapter 3
- Nested vs distributed transaction; 2PC · Distributed System, chapter 8 · asked 2×
- Process vs thread; context switching · Operating System, chapter 2
- Context switching in RTOS · Embedded System, chapter 6 · asked 3×
- Context switching, 5-state model, MLFQ · Operating System, chapter 2
- T/F: switching surge ratio vs system voltage · Transmission and Distribution System Design, chapter 3 · asked 4×