You are on page 1of 5

Qno1

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.

The two models of interprocess communication are messagepassing odel  and  the  shared‐


memory  model. 

There are two common models of interprocess communication:

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

It is useful for exchanging smaller amounts of data

There are no conflicts to avoid It is easier to implement

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

Allows maximum speed

It offers better convenience of communication

Communication is faster the message passing model when the processes are on the same
machine.

Disadvantages

It has security issues

The processes that use the shared memory model need to make sure that they are not writing to
the same memory location.

Problems in the area of synchronization

There are two common models of interprocess communication:

A diagram that illustrates interprocess communication is as follows:


The models of interprocess communication are as follows:
1.Shared Memory Model
Shared memory is the memory that can be simultaneously accessed by multiple processes. This
is done so that the processes can communicate with each other. All POSIX systems, as well as
Windows operating systems use shared memory.
Advantage of Shared Memory Model
Memory communication is faster on the shared memory model as compared to the message
passing model on the same machine.
Disadvantages of Shared Memory Model
Some of the disadvantages of shared memory model are as follows:
 All the processes that use the shared memory model need to make sure that they are not
writing to the same memory location.
 Shared memory model may create problems such as synchronization and memory
protection that need to be addressed.
2.Message Passing Model
Multiple processes can read and write data to the message queue without being connected to
each other. Messages are stored on the queue until their recipient retrieves them. Message queues
are quite useful for interprocess communication and are used by most operating systems.
Advantage of Messaging Passing Model
The message passing model is much easier to implement than the shared memory model.
Disadvantage of Messaging Passing Model
The message passing model has slower communication than the shared memory model because
the connection setup takes time
Message passing model: In this, the imparting forms trade messages with each other to exchange
data. Messages can be traded between the procedures either straightforwardly or in a roundabout
way through a typical letter box. Message passing is valuable for trading littler measures of
information, on the grounds that no contentions require be stayed away from. It is likewise
simpler to actualize than is shared memory for entomb PC correspondence.

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

1)strengths: quick and direct

2)weaknesses: sudden conduct when unauthentic projects wrongly gets to the mutual memory
segments.

You might also like