Chapter 3: Operating-System Structures: 1. Process Management
Chapter 3: Operating-System Structures: 1. Process Management
1. Process Management
3. File Management
5. Secondary Management
6. Networking
7. Protection System
8. Command-Interpreter System
1. Process Management :
We know that a program is a set of instructions. Sometimes CPU does not require all
the program at a time. It needs to execute only some part of the program at a time. It needs to
execute only some part of the program. In this case, the set of instructions which are needed
by CPU are loaded into memory. In some other cases, we can accommodate entire program
in memory. So, we accommodate entire program in memory. So, we accommodate some part
of the program in main memory. After executing it, we can accommodate another part and so
on. In some other cases, the program is very small and CPU requires entire program, then
entire program is loaded into main memory.
A process can be a program or set of instructions which are in main memory and
ready to execute.
We can say that a program is a Passive entity, which stored on the disk. A process is
an Active entity which is stored in main memory.
Page 1
A process needs several system resources like CPU time, files, I/O devices to
complete its task. These resources are allocated to the process at the time of creating the
process or at the time of running and these resources can be allocated by operating system.
i) process synchronization
User Processes are some part of the code in the user program. These processes
will run in the user program.
System Processes are some part of the code in the operating system. These
processes will run in monitor mode.
Main Memory is a large array of bytes. Any user must copied into main memory for
execution. CPU reads instructions from main memory and executes one after another. Some
part of main memory is reserved operating system. In the multiprogramming, to utilize CPU
and system resources efficiently, number of processes are copied into main memory and
those are executed concurrently.
Page 2
The following are responsibilities of operating system regarding memory
management.
a) Keep track of which parts of memory are currently being used and by whom.
3. File Management :
File is a collection of records and it is going to store some data. Generally, the files
are stored on disk. A file consists of sequence of bits, bytes, lines, records and whose
meaning is given by the creator of the file.
The operating system is responsible for the following activities in connections with
file management.
a) A buffer-caching system
Page 3
b) A general device-driver interface
5. Secondary Management :
All the programs must be in main memory before their execution. Main Memory is
known as primary storage and this is volatile and it is volatile and it has limited capacity. So,
we require secondary storage, which is non volatile and high capacity.
All the programs in the secondary storage must be copied into main memory before
their execution.
The operating system is responsible for the following activities in connection with
disk management:
b) Storage allocation
c) Disk scheduling
6. Networking :
A distributed system is a collection of processors and each processor is having its own
memory, peripheral devices and clock. The processors communicate with one another
through communication lines. The processors in distributed system are connected through a
network and it is configurated in different ways. Operating System generalizes network
access just like the file access with the details of networking contained in the network
interface driver by means of network protocol.
a) Computation speed-up
c) Enhanced reliability
Page 4
7. Protection System :
8. Command-Interpreter System :
Command Interpreter is one of the most important system program and it is interface
between user and operating system. Some operating systems include this program in the
kernel. Some operating systems like MS-DOS and UNIX treat this program as a special
program and they invoke this program when a job is initiated.
It is also known as control call interpreter / command line interpreter and sometimes it
is called as Shell.
Many commands are given to the operating system by control statements which deal
with:
Page 5
ii) I/O handling
v) file-system access
vi) protection
vii) networking
i) Program execution – system capability to load a program into memory and to run
it.
ii) I/O operations – since user programs cannot execute I/O operations directly, the
operating system must provide some means to perform I/O.
iii) File-system manipulation – program capability to read, write, create, and delete
files.
v) Error detection – ensure correct computing by detecting errors in the CPU and
memory hardware, in I/O devices, or in user programs.
Additional functions exist not for helping the user, but rather for ensuring efficient
system operations.
Page 6
ii) Accounting – keep track of and record which users use how much and what
kinds of computer resources for account billing or for accumulating usage
statistics.
System Calls :
System calls provide the interface between a running program and the operating
system.
Three general methods are used to pass parameters between a running program and
the operating system.
ii) Store the parameters in a table in memory, and the table address is passed
as a parameter in a register.
iii) Push (store) the parameters onto the stack by the program, and pop off the
stack by operating system.
Page 7
Passing of Parameters As A Table :
i) Process control
v) Communications
Page 8