Intro To OS
Intro To OS
4. Introduction
Es
t
el
ar
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.1_introduction_1.html
1/1
12/9/13
4. Introduction
In the figure 4.2 below, OS interface is a set of commands or
actions that an operating system can perform and a way for a program or
person to activate them.
el
ar
Es
t
1/2
12/9/13
Es
t
el
ar
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.1_introduction_2.html
2/2
12/9/13
ar
system:
el
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_1.html
1/1
12/9/13
ar
It occurs when there are many free small blocks in memory that
are too small to satisfy any request. In computer storage, fragmentation is a
phenomenon in which storage space is used inefficiently, resulting in to
reduced capacity as well as performance. Fragmentation also leads to wastage
of storage space. The term also refers to the wasted space itself.
el
Es
t
Internal fragmentation
Data fragmentation
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_2.html
1/1
12/9/13
i. Fragmentation
Internal Fragmentation
el
ar
Es
t
External Fragmentation
Data Fragmentation
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_3.html
1/2
12/9/13
Es
t
el
ar
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_3.html
2/2
12/9/13
ar
el
Es
t
Single
Contiguous Allocation is
the simplest form of
memory management. In
this type of memory
management, all memory
(with an exception of
small portion reserved for
running the operating
system) is available for a
Figure 4.3 : Single Contiguous Allocation
single program to run. So
only one program is
loaded in all available memory and so generally the rest of memory is wasted.
Simplest example of this type of memory management is MS-DOS. Advantage
of single contiguous memory allocation is, it supports fast sequential and
direct access. Provides good performance and the number of disk seek required
is minimal. Disadvantage of single contiguous memory allocation is
fragmentation.
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_4.html
1/1
12/9/13
ar
Es
t
el
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_5.html
1/2
ar
12/9/13
Es
t
el
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_5.html
2/2
12/9/13
ar
el
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_6.html
1/1
12/9/13
ar
Es
t
el
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_7.html
1/2
ar
12/9/13
Es
t
el
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_7.html
2/2
12/9/13
el
ar
Es
t
1.
2.
1/2
12/9/13
ar
Es
t
el
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_8.html
2/2
12/9/13
ar
el
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_9.html
1/2
12/9/13
Some of them are foreground processes while others are the background
processes. Foreground processes interact with a user and perform work for
users. In multiprocessing environment, the process that accepts input from the
keyboard or other input device at a particular point in time is at times called
the foreground process. This means that any process that actively interacts
with user is a foreground process. Background processes are the processes
which are not associated with a particular user, but instead have some specific
function to be performed. For example email notification is an example of
background processes. System clock displayed at the bottom right corner of
status bar in windows is another example of background process.
Es
t
el
ar
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_9.html
2/2
12/9/13
ar
el
Normal completion
Es
t
Memory unavailable
I/O failure
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_10.html
1/2
12/9/13
ar
Es
t
el
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_10.html
2/2
12/9/13
1.
Preemptive scheduling:
ar
Es
t
2.
el
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_11.html
1/3
el
ar
12/9/13
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_11.html
2/3
12/9/13
Es
t
el
ar
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_11.html
3/3
12/9/13
ar
Es
t
el
1/2
12/9/13
Provide fast and simple algorithms to write and read files in cooperation with device manager.
Grant and deny access rights on files to programs and users.
Allocate and de-allocate files so that files can be processed in cooperation with process manager.
Provide programs and users with simple commands for
handling files.
Es
t
el
ar
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_12.html
2/2
12/9/13
ar
el
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_13.html
1/3
12/9/13
for free blocks is needed. The disadvantage is that FAT can grow to an
enormous size, which can slow down the system. Compaction would be
needed time to time. This type of file allocation is used for disk
allocation in MS-DOS.
Chained allocation:
ar
With chained file allocation only the first block of file gets
an entry in the FAT. A block has sectors in it. Of these, the first sector
has got data as well as a pointer at its end that points to the next sector
to be accessed after it (or indicates that it was the last). That means each
sector (if it is not a last sector) has got a pointer at its end pointing to the
next sector that should be accessed. The advantage again is that the FAT
has a single entry for each file, indicating position of the first sector and
file name. There is no need to store the files contiguously.
Es
t
el
With indexed file allocation also only the first block of file
gets an entry in the FAT. In the first sector, no data is stored. It has only
pointers to where the file is on storage medium. That is why the first
block is known as the index block. It just contains the pointers or index
to file location on a storage medium. Here also the FAT will only contain
a single entry for each file, indicating file name and position of the first
sector. It is easy to retrieve a single block because the information about
its location is stored in the first block.
The disadvantage of indexed allocation is that for each file
an additional sector is needed to keep track of the location of a file. A
very small file also always occupies at least two blocks, where as the
data could have easily fit in one block. This results in secondary storage
space wastage. Indexed allocation is implemented in all UNIX systems.
It is reliable as well as fast. Also, now-a-days, the wastage of storage
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_13.html
2/3
12/9/13
Es
t
el
ar
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_13.html
3/3
12/9/13
ar
el
Es
t
Operating system also deals with the access time of these devices.
It helps make the device access fast and in the most efficient way possible.
Major concern of operating system in device management is to
prevent dead lock situation.
Dead Lock
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_14.html
1/2
12/9/13
el
ar
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.2_resources-managed-by-OS_14.html
2/2
12/9/13
4.2.1 Multiplexing
ar
el
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.3_resource-sharing-management_1.html
1/1
12/9/13
4.2.1 Multiplexing
Resource management basically includes multiplexing the
resources in two ways:
ar
Time Multiplexing
Space Multiplexing
el
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.3_resource-sharing-management_2.html
1/1
12/9/13
Introduction to Computer
Technology
Glossary
Term
used
Description
Scheme in document refers to techniques.
Process
el
Data
array
ar
Scheme
Es
t
https://aspire.tcs.com/aspire/courses/introduction_to_computer_systems/module4/session4.4_glossary.html
1/1