Professional Documents
Culture Documents
Yes is user who knows how to use system calls should be able to create a new command interpreter, The
command line interpreter (sometimes also called the shell) is that part of the Operating System that
understands and interprets commands which are entered by either a human or s program and carries them
out. So the command interpreter is simply a program which rends the instructions given by the user,
translates them into the context of the operating system and executes them.
On the other hand a system call is the programmatic way in which a computer program requests a service
from the kernel of the operating system it is executed on. In general system calls are how programs
interact with the operating system. Whenever a program or a programmer needs to make a request to the
kernel it will execute a system call
Based on the above we can conclude the command line interpreter is built on system calls. As a result it
makes sense that any user who is able to use system calls can create and develop a new user interface.
Since the command interpreter (or the shell) allows users functionalities such as creating and managing
processes, accessing scripts to shut down the computer or copy files, which can be accessed and
implemented through system-calls by a user-level program we can conclude it is possible to develop a
new command interpreter,
it is possible to develop a new command interpreter using the system-call interface on those OS’s where
the interpreter is not tightly integrated into the system (i.e., most operating systems other than Windows.)
The Unix family of operating systems provides multiple command-line interpreters (sh, bash, csh, etc.)
The ’sh’ in each of these programs stands for and is pronounced as “shell”, because the command-line
interpreter is thought to serve as a protective shell around the system programs. Linux also provides
multiple GUI command interpreters (Gnome, KDE, Xfc, etc.) The user is free to switch among the
multiple command-line and GUI command interpreters. One of the best ways to learn to program in a
Unix environment is to write your own command line interpreter. Bonus question: The command
interpreter for the Windows family of operating systems is called Windows Explorer. (It is sometimes
referred to as File Explorer or just Explorer.) In the United States vs. Microsoft anti-trust trial of 1998,
Microsoft claimed that it was not possible to remove Explorer from the Windows 95TM operating system
without completely breaking Windows.
The user will be able to develop a new command interpreter using the system-call interface
provided by the operating system. The command interpreter allows an user to create and manage
processes and also determine ways by which they communicate (such as through pipes and
files). As all of this functionality could be accessed by an user-level program using the system
calls, so it should be possible for the user to develop a new command-line interpreter.
It reads commands from the user or from a file of commands and executes them, usually by
turning them into one or more system calls. It is usually not part of the kernel since the
command interpreter is subject to
changes. An user should be able to develop a new command interpreter using the systemcall interface
provided by the operating system.
The command interpreter allows an user to create and manage processes and also determine ways by whic
h they communicate (such as through pipes and files). As all of
this functionality could be accessed by an userlevel program using the systemcalls, it should be
possible for the user to develop a new command‐line interpreter.
Qno2
Interprocess communication is the mechanism provided by the operating system that allows
processes to communicate with each other. This communication could involve a process letting
another process know that some event has occurred or transferring of data from one process to
another.
The two models of interprocess communication (IPC) are shared memory and message passing.
IPC with shared memory is fast, since processes can communicate simply by reading or writing
the shared memory. However, some method of synchronization is required in order to avoid
situations where two or more processes attempt to access their shared memory at the same time.
In addition, distributed systems don’t have any common primary memory, and thus can not use
this method
IPC with message passing requires less synchronization than shared memory, since there is no
overlap between the address spaces of the processes. There is, however, more overhead required
to setup message passing between processes, and to send and receive messages.
1. The message - passing model The commmicating processes exchange messages with one
another to transfer information. A connection must be opened before communication can happen
where a common mailbox allows the exchange of messages between the processes which can
happen either directly or indirectly.
Advantages
Disadvantages
Because of the implementation of the connection process described above it is slower than its
counterpart
2. The shared-memory model. Shared memory allows two or more processes to exchange
information by reading and writing data in shared memory areas. The shared memory can be
simultaneously accessed by multiple processes. Real life exatuples would be the POSIX systems,
as well as Windows operating systems.
Advantages
Communication is faster the message passing model when the processes are on the same
machine.
Disadvantages
The processes that use the shared memory model need to make sure that they are not writing to
the same memory location.
Be that as it may, the fundamental burden is it can deal with just little measures of information.
Shared—Memory model : In this, forms utilize shared memory makes and shared memory joins
framework calls to make and access districts of memory possessed by different procedures. At
least two procedures can trade data by perusing and composing information in the mutual zones.
Shared memory permits most extreme speed and accommodation of correspondence, since it
should be possible at memory speeds when it happens inside a PC Problems exist,
notwithstanding, in the regions of assurance and synchronization between the procedures sharing
memory.
Message passing
1)strengths: program structures better isolated, risky operations firewalled
2)weaknesses: message passes all the more gradually, for symmetrical duplicate operations are to
be made
Shared memory
2)weaknesses: sudden conduct when unauthentic projects wrongly gets to the mutual memory
segments.