0% found this document useful (0 votes)
65 views

Main Functions of An Operating System: 2017 Me 302 M. Usama Bin Manzoor

The document discusses the main functions of an operating system, including process management, memory management, file management, device management, security, and command interpretation. It then discusses measuring system performance in terms of throughput, turnaround time, and response time. Finally, it describes different memory management schemes used in operating systems, including uniprogramming, multiprogramming with fixed partitions, and multiprogramming with variable partitions.

Uploaded by

usama manzoor
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

Main Functions of An Operating System: 2017 Me 302 M. Usama Bin Manzoor

The document discusses the main functions of an operating system, including process management, memory management, file management, device management, security, and command interpretation. It then discusses measuring system performance in terms of throughput, turnaround time, and response time. Finally, it describes different memory management schemes used in operating systems, including uniprogramming, multiprogramming with fixed partitions, and multiprogramming with variable partitions.

Uploaded by

usama manzoor
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

2017 me 302 M.

Usama Bin Manzoor


Main functions of an operating system
Most operating systems perform the functions given below. A separate module of operating
system software performs each of these functions:

Process management. A process is a program in execution. During execution, a process


needs certain resources such as CPU time, memory space, files, and I/O devices. At a particular
instance of time a computer system normally consists of a collection of processes, scheduling of
system resources of different processes requesting them, and providing mechanism for
synchronization and communication among processes.
Memory management. To execute a program, it must be loaded in main memory, together
with the data it access. To improve CPU utilization and to provide better response time to its
users, a computer system normally keeps several programs in main memory. Memory
management module takes care of allocation and de-allocation of memory space to programs in
need of this resource.
File management. All computer systems store computer systems often, require, and share
information. Normally, a computer stores such information in units called files. Processes read
information from files and create new files for storing newly generated information. File
management module takes care of files-related activities such as organizations, storage, retrieval,
naming, sharing, and protection of files.
Device management. Normally a computer system consists of several I/O devices such as
terminal, printer, disk, and tape. The device management module of an operating system controls
all I/O devices. It keeps track of I/O request from processes, issues, commands to I/O devices
and ensures correct data transmutation to/from and I/O device. It also provides a simple and easy
to use interface between the devices and rest of the system.
Security. Computer systems often store large amount of information, some of which are
highly sensitive and valuable for their users. Users can trust on a computer system and rely on it
only if its various resources and information stored in it and protected against destruction and
unauthorized access. Security module protects the resources and information of a computer
system against destruction and unauthorized access. It also ensures that when the system
executes several disjoint processes simultaneously, one process does not interfere with others or
with the system itself.
Command interpretation. For using various system resources, a user communicates with
the operating system via a set of commands provided by it. The operating system also provides a
simple language called command language (CL) or job control language (JCL); using which a
user can put several commands together from the command set to describe the resource
requirements of a job. Commands interpretation module interprets user commands and directs
system resources to process the commands. With the mode of interaction of a system, users are
not much concerned about hardware details of the system.
The operating system also performs few more functions such as accounting of the system
resource usage by all users or processes, maintenance of log of system usage by all users, and
maintenance of internal time clock.

Measuring system performance


We usually measure efficiency of an operating system and overall performance of a computer
system in terms of the following perimeters:

Throughput. Throughput is the second amount of work that a system is able to do per unit
time. We measure it ass the number of jobs completed by the system per unit time. For example,
if a system is able to do n processes in t time, its throughput is n/t processes per second during
that interval. Throughput is normally measured in process/hour. Note that the throughput of the
system does not depend on its job processing efficiency only, but also on the nature of jobs
processed. For long processes, throughput of a system may be one process/hour; whereas for
short processes, it may be 100 processes/hour at the same time.

Turnaround time. From the point of view of an individual user, an important criterion is how
long it takes a system to complete a job submitted by him/her. Turnaround time is the interval
between the time of submission of a job to the system for processing and the time of completion
of the job. Although, higher throughput is desirable from the point of view of overall system
performance, individual users are more interested in better turnaround time for their jobs.

Response time. Turnaround time is not a suitable measure for interactive systems because in
such a system a process can produce some output early during its execution and can continue
executing while previous results are being output to the user. Hence, another measure used in
case of interactive systems is response time. It is the interval between the time of submission of a
job to the system for processing and the time of first response from the system for the job.

Memory management
Other than CPU, main memory is an important resource of a computer system that the operating
system must manage properly is an important resource of a computer system job is to keep track
of free and occupied (in use) parts of memory. CPU, material system performance. Memory
management module of an open get member need it, and de-allocates when they no more need.
In this section, we when management schemes used in earlier and modern operating systems
ramming Memory Model systems process one job only at a time, and all apply computers are
available exclusively for the job until it Un-programming memory model is suitable for such
memory management scheme, operating system of memory, and its remaining part is available
for the currently active user processes.

Uniprogramming memory model


The term loads a program from disk into user area of executes it. When the process finishes, the
operating cleans up the user area of memory and then loads the next (OS) memory and which is
ready for execution.
User area although this memory management scheme is simple and easy to unused implement, it
does not lead to proper utilization of main memory is because the unoccupied memory space in
user area remains unused for entire duration of execution of the currently active user process.
Hence, Uniprogramming memory mode very small or dedicated computer systems only (systems
used for a specific application only) use this memory management scheme

Multiprogramming Memory Models


In a multiprogramming system, multiple user process number of memory partitions and
multiprogramming with variable number of memory partitions. The schemes, which operating
systems use to facilitate this, are multiprogramming with variable number of partitions can reside
simultaneously in main memory.

Multiprogramming with fixed number of memory partitions


This is scheme, the operating system divides the user area of memory into a number of fixed-
sized part contain exactly one partition, Uniprogramming with Fixed Number of Memory.
Partitions bound the degree of partitions may be of same or different sizes, but the size of each
partition is fixed. That is, in a system with n memory partitions, the system can load maximum n
processes at a time.
The operating system queue all new jobs in an input queue. When a partition is free, it loads next
job from the input queue to the partition. When a process terminates, the partition it occupies
becomes free for use by another process. Note that in a system that uses partitions is free, it loads
the next job processes. Note that in a system that uses partitions of different sizes, when a
partition becomes free, the operating system loads the first process in input queue that fits into it.
IBM OS/360 mainframe systems used this scheme of memory management for several years. It
was called MFT (multiprogramming with a fixed number of tasks). It is no longer in use.

Multiprogramming with variable number of memory partitions


In the scheme described above, since all partitions are of fixed size, any space in the partitions
that is in access of actual memory requirements of the process loaded into it remains unused.
On the average, 50% of memory may remain unused due to this, resulting in underutilization of
memory resources. To overcome this problem, researchers introduced another scheme with
variable numbers of memory partitions. In this scheme, number, sizes, and locations of
partitions vary dynamically as processes enter and exit the system.
Initially, all memory in user area is available for user processes. When a process enters the
system, the operating system allocates to it as much memory ass it needs, keeping the rest
available for further requests. As processes enter and exit, the operating system allocates and
de-allocates memory partitions to them, each partition being equal to the size of memory
required by the corresponding process. Since memory requirements of different processes is
generally different, as process enters or exits the system, the system’s memory is partitioned
into various sizes of small free memory blocks. Operating systems maintains a table to keep the
track of free memory blocks. When a new process arrives, the operating system searches for a
free block that is large enough for the process, while the other parts contains memory
containing. If free block is too large, the operating system divides it into two halves.

You might also like