Advance OS
Advance OS
In this project, a bash scripting-based command-line interface (CLI) system is to be created. The
main goal here is to develop a fundamental level of simulation capability that will permit the user
to authenticate and administer simulation data and perform FIFO and LIFO simulations. The idea
of breaking the project into scripts is beautiful, as each script is responsible for certain
functionality therefore the system is rather flexible, and the changes can be easily introduced.
Introduction
This project embodies a basic and easy-to-understand line command-based system that has all
functionalities involved for the management of users and simulation data along with the
simulations based on FIFO and LIFO. The system is implemented utilizing bash scripting to
supervise tasks that ought to be conducted to manage a small-scale simulation environment.
The basic functionalities that can be considered to be the foundation of this project are user
authentication, an admin panel for managing users, loading/simulation data, and FIFO and LIFO
simulations. All of these are written in bash scripts that are independent of each other such that
one can be run without the rest.
Authenticate Users: Input controls: Pay attention to ensuring that the system’s usage is restricted
to the rightful abilities.
Manage Users: Allow grant to make changes such as: creating new accounts, removing accounts,
and/or making changes to the user’s account.
Load/Create Simulation Data: Offer the facility to either get back details that were created by
simulations at some other time or create details by simulations as the case is required.
Simulate Data Processing: Use the processes of FIFO and LIFO data structures to mimic how
data could be in various situations.
Log and Analyze System Usage: This is important so that the usage of the system can be
evaluated and monitored, especially in terms of the interactions of the user.
This project is a good example of using basic techniques of bash scripting showing the
relationship between the various scripts where the system is made of. The scripts are
intentionally non-procedural, easy, and easy to write, with no addition of UI or any other extra
overhead and making use of habitually used commands like using ls for file manipulation, input
from the user, and so on. Through this project, one can learn the concept of process management,
how a website user is authenticated, or even simulate data structures on basic levels.
In sum, this project brings a first approach on the Bash Scripting application on a Linux setup,
giving a practical approach to how Bash script can be used for managing and updating tasks on a
Linux system through a project like this.
User Management
An admin manages user management functionality sh script. This script allows the admin to
perform create, delete, and update users. Username, password, and PIN (Text file with the user
details stored such as UPP ) db.
Create Users: This script asks the administrator for a username, password, and SECURITY
CODE. This validates the input to have a username and password with 5 alphanumeric characters
and a PIN as a 3 digit. Having indicated all of the above details, they add more information on
their UPPs. db file.
Delete Users: The administrator can delete a user: (enter username and pin) The script will
confirm before removing the targets and also delete from UPP entry. db file.
Password Updates: Admin and users are both able to update the password after PIN verification
The script checks if the new password is written twice before changing to UPP. db file.
User Login: The login. Find the section where this sh script handles user authentication. The
user is then asked to provide their username and password, which UPP verifies. db file. If
credentials are OK then only the user goes to the main screen.
Main Menu
The menu. sh script mainly shows the interface where the user can choose to fake the FIFO or
the LIFO queues or to leave the system. When an option is chosen, the simulation script of the
chosen option is fifo_simulation.sh or lifo_simulation.sh is run. Upon the completion of the
simulation, the user will be directed to the main menu.
FIFO Simulation: The fifo_simulation. It is a script that initiates and executes a preprogrammed
list of data on a first-in/first-out basis. A FIFO process takes data in the queue and processes it,
starting with the first data that was input to the queue.
LIFO Simulation: The lifo_simulation. As the name suggests each sh script, it processes the same
queue of data on a last-in-first-out basis. It operates on the queue on the last in first out LIFO
basis; that is, it processes the last items that are added to the queue first.