There are two basic methods for user interaction with the operating system:
A. Provides command line interface or command explanationProgram(Command interpreter), allowing users to directly enter commands completed by the operating system.
B. the user interacts with the operating system through the graphical user interface (GUI.
I. Command Interpreter
Some operating systems include command interpreter programs in their kernels, and some other operating systems, such as Windows or UNIX, use command interpreter as a special program, when a task starts or the user logs in for the first time, the program runs. In a system with multiple command interpreters available, the command interpreter is called a shell.
The main function of the command interpreter is to obtain and execute the next command specified by the user. Most commands are runCompositionParts: Create, delete, and so on. There are two common methods to execute these commands:
1. The command interpreter containsCodeTo execute these commands. For example, commands for deleting files may cause the command interpreter to go to the corresponding code segment, set parameters, and execute appropriate system calls. For this method, the number of commands that can be provided determines the size of the command interpreter, because each command requires its own implementation code.
2. Many operating systems, such as UNIX, implement the vast majority of commands by system programs. In this case, the command interpreter does not need to understand any command. It only needs to use the command to determine a file, load it into the memory, and perform related operations. In this case, programmers can easily add new commands to the system by creating appropriate new files. This type of command interpreter may be small and does not need to be changed when new commands are added.
Ii. graphic user interface