What is a shell? A shell is an interactive user interface to an operating
system services that allows an user to enter commands as character strings
or through a graphical user interface. The shell converts them to system
calls to the OS or forks off a process to execute the command. System call
results and other information from the OS are presented to the user through
an interactive interface. Commonly used shells are sh,csh,ks etc.
Brief about the initial process sequence while the system boots up. While booting, special process called the 'swapper' or
'scheduler' is created with Process-ID 0. The swapper manages memory allocation
for processes and influences CPU allocation. The swapper inturn creates
3 children:
What are various IDs associated with a process? Unix identifies each process with a unique integer called
ProcessID. The process that executes the request for creation of a process
is called the 'parent process' whose PID is 'Parent Process ID'. Every
process is associated with a particular user called the 'owner' who has
privileges over the process. The identification for the user is 'UserID'.
Owner is the user who executes the process. Process also has 'Effective
User ID' which determines the access privileges for accessing resources
like files.
Explain fork() system call. The `fork()' used to create a new process from an existing
process. The new process is called the child process, and the existing
process is called the parent. We can tell which is which by checking the
return value from `fork()'. The parent gets the child's pid returned to
him, but the child gets 0 returned to him.
Predict the output of the following program code
Answer:
Explanation:
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|