Professional Documents
Culture Documents
Phase 4
Phase 4
Phase 4
Introduction:
Phase 4 of our project aims to further elevate functionality of remote CLI shell by
introducing the scheduling capabilities in server. This enhancement stimulates the role
of scheduler, providing concurrency for serving the multiple clients. Server now
listens to requests from the clients, manages a waiting queue, and employs a
scheduling algorithm to efficiently select and run the processes.
Key Objectives:
Implementation Details:
1. Waiting Queue:
Waiting queue is introduced in order to handle incoming client requests. This queue
serves as a holding area for processes, allowing server in order to manage and
prioritize their execution.
2. Scheduling Algorithm:
Scheduling algorithm combines Round Robin with Short-Remaining-Job-First
prioritization in a selectively preemptive manner. The following specifics are
implemented:
Use a selectively preemptive Round Robin algorithm with the different quantums.
Start with the short quantum for the first round, followed by the longer quantum
for subsequent rounds.
Prioritize processes with Short-Remaining-Job-First in order to ensure the
efficient execution.
Consider a round completed even if the process is preempted before its quantum
is finished.
Assign a burst time of -1 to shell commands for the immediate execution.
Utilizing First-Come-First-Served algorithm when remaining burst times are
equal.
Prevent selecting same process consecutively unless it is only process left.
3. Thread Management:
Three types of threads are managed within server:
Testing:
Conclusion:
The introduction of scheduling capabilities in Phase 4 represents the significant
evolution in remote CLI shell. Server's ability to efficiently manage the multiple
clients, prioritize tasks, and dynamically schedule processes demonstrates enhanced
the concurrency and responsiveness. The implementation of a sophisticated
scheduling algorithm contributes to system's versatility, providing the robust
foundation for handling diverse workloads concurrently. This phase marks a crucial
step towards creating a powerful and scalable remote shell for the users in order to
interact seamlessly with the remote resources.