1. NAME : P.LAVANYA
CLASS :III.B.SC(IT)
SUBJECT :OPERATING SYSTEM
DATE :7.3.2017
SUMITTED TO :Ms.R.MADHUBALA,M.C.A.,
1
2. DISK STRUCTURE
The traditional head-sector-cylinder, HSC numbers are mapped to linear block
addresses by numbering the first sector on the first head on the outermost
track as sector 0.
FCFS Scheduling
First-Come First-Serve is simple and intrinsically fair, but not very efficient.
Consider in the following sequence the wild swing from cylinder 122 to 14 and
then back to 124:
SSTF Scheduling
Shortest Seek Time First scheduling is more efficient, but may lead to
starvation if a constant stream of requests arrives for the same general area of
the disk.
SSTF reduces the total head movement to 236 cylinders, down from 640
required for the same set of requests under FCFS. Note, however that the
distance could be reduced still further to 208 by starting with 37 and then 14
first before processing the rest of the requests.
2
3. SCAN Scheduling
The SCAN algorithm, a.k.a. the elevator algorithm
moves back and forth from one end of the disk to the
other, similarly to an elevator processing requests in a
tall building.
C-SCAN Scheduling
The Circular-SCAN algorithm improves upon SCAN by
treating all requests in a circular queue fashion - Once
the head reaches the end of the disk, it returns to the
other end without processing any requests, and then
starts again from the beginning of the disk
3
4. LOOK Scheduling
LOOK scheduling improves upon SCAN by looking ahead at the
queue of pending requests, and not moving the heads any
farther towards the end of the disk than is necessary. The
following diagram illustrates the circular form of LOOK:
Selection of a Disk-Scheduling Algorithm
With very low loads all algorithms are equal, since there will
normally only be one request to process at a time.
For slightly larger loads, SSTF offers better performance than
FCFS, but may lead to starvation when loads become heavy
enough.
For busier systems, SCAN and LOOK algorithms eliminate
starvation problems.
The actual optimal algorithm may be something even more
complex than those discussed here, but the incremental
improvements are generally not worth the additional overhead.
4
5. Disk Management
105.1 Disk Formatting
Before a disk can be used, it has to be low-level formatted,
which means laying down all of the headers and trailers
marking the beginning and ends of each sector. Included
in the header and trailer are the linear sector numbers,
and error-correcting codes, ECC, which allow damaged
sectors to not only be detected, but in many cases for the
damaged data to be recovered ( depending on the extent of
the damage. ) Sector sizes are traditionally 512 bytes, but
may be larger, particularly in larger drives.
ECC calculation is performed with every disk read or write,
and if damage is detected but the data is recoverable, then
a soft error has occurred. Soft errors are generally handled
by the on-board disk controller, and never seen by the OS
5
6. Boot Block
Computer ROM contains a bootstrap program ( OS
independent ) with just enough code to find the first sector
on the first hard drive on the first controller, load that
sector into memory, and transfer control over to it. ( The
ROM bootstrap program may look in floppy and/or CD
drives before accessing the hard drive, and is smart enough
to recognize whether it has found valid boot code or not. )
The first sector on the hard drive is known as the Master
Boot Record, MBR, and contains a very small amount of
code in addition to the partition table. The partition table
documents how the disk is partitioned into logical disks,
and indicates specifically which partition is
the active or boot partition.
6
7. Bad Blocks
No disk can be manufactured to 100% perfection, and all
physical objects wear out over time. For these reasons all
disks are shipped with a few bad blocks, and additional
blocks can be expected to go bad slowly over time. If a large
number of blocks go bad then the entire disk will need to
be replaced, but a few here and there can be handled
through other means.
In the old days, bad blocks had to be checked for manually.
Formatting of the disk or running certain disk-analysis
tools would identify bad blocks, and attempt to read the
data off of them one last time through repeated tries. Then
the bad blocks would be mapped out and taken out of
future service. Sometimes the data could be recovered, and
sometimes it was lost forever
7
8. SWAP-SPACE MANAGEMENT
It is classified as
Swap-space Use
Swap-space Location
Swap-space Management
Swap-space Use
It is used in various way by different operating system, depending on
the implemented memory-management algorithms.
It include as hold the entire process image,and the code,data segments
The amount of swap space needed on a system can therefore vary
depending on the amount of physical memory, the amount of virtual
memory it is backing.
It can range from a few megabytes of disk space to gigabytes and
swapping can be spread over the system’s I/O devices.
8
9. Swap-space Location
A swap space can reside in two places: Swap space
can be carved out of the normal file system, or it can
be in a separate disk partition.
Navigating the directory structure and the disk-
allocation data structures takes time and extra disk
accesses.
External fragmentation can greatly increases
swapping times by forcing multiple seeks during
reading or writing of a process image.
Swap space can be created in a separate disk partition.
Some operating systems are flexible and can swap
both in raw partitions.
9
10. Swap-space Management : An Example
A Unix started with an implementation of swapping that copied
entire processes between contiguous disk regions and memory.
BSD, swap space is allocated to a process when the process is
started. Enough space is set aside to hold the program, known as
the text pages or the text segment, and the data segment of the
process.
Pages from the data segment are read in from the file system, or
are created and are written to swap space and paged back in as
needed.
Two per-process swap maps are used by the kernel to track
swap-space use.
The text segment is a fixed size, so its swap space is allocated in
512 KB chunks, except for the final chunk, which holds the
remainder of the pages, in 1 KB increments.
The blocks of large processes can be found quickly, and the swap
map remains small.
10
11. WINDOWS 2000
Microsoft windows 2000 operating system is a 32-bit
preemptive multitasking operating system for Intel
Pentium and later microprocessors.
The success the windows NT operating system, it was
previously name windows version 5.0 key goals for the
system are portability, security Portable operation
system Interface compliance, compatibility with MS-
DOS Microsoft windows application.
11
12. History:
In 1980, Microsoft and IBM cooperated to develop the
os/2 operating system, which was written in assembly
language for single-processor Intel 80286.
In 1988, Microsoft decided to make a fresh start and to
develop a technology.
The team planned for NT to use the OS/2 API ,
windows NT was changed to use the windows API
reflecting the popularity of windows 3.0
Windows NT 3.1 and window NT 3.1 advanced server.
Windows 2000 Datacenter server support up to 32
processors and up to 64 GB of RAM.
12
13. Design Principles
Windows 2000 include as
Extensibility
Portability
Reliability
Compatibility
Performance
International use.
13
14. Extensiblity:
The capacity of an operating system to keep up advances in
computing technology. On top of the executive , several server
subsystem operate in user mode. Among them are
environmental subsystems that different operating system.
Operating system is portable if it can be moved from one
hardware to another with relatively few changes.
Reliablity:
The ability to handle error conditions, including the the
operating system to protect itself and its users from defective.
NTFS file system-that recovers automatically from many kindsof
system errors after a system crash.
Compatibility:
Windows 2000 provides source-level compatibility to
applications that the IEEE 1003.1 Standard.
MS-DOS application can access hardware ports direcly.
14
15. Performance:
Windows 2000 is designed to afford good
performance. The subsystems of windows 2000 can
communicate with one another efficiently by
procedure-call(LPC) facility that provides high-
performance message.
International use:
Windows 2000 is also designed for international use.
It provides port for different locales via the national
language support.
15
16. System components
Advantage of this topic of architecture is that interactions between
modules can be kept simple remainder of this section describes these
layers and subsystems.
Hardware-Abstraction Layer:
HAL is the layer of software that hides hardware difference from
the operating system to help make windows 2000 portable.
Kernel:
The kernel is never paged out of memory, and its execution is
preempted. It has four main responsibilities: thread scheduling, low-
level processor synchronization, and recovery after a failure.
An object is just an instance of object type.
The event object is used to record an event occurence the latter with
some action.
A semaphore object acts as a counter or gate to control the number
that access some resources
16
17. Threads and Scheduling:
Each process has one or more threads, which are
execution dispatched by the kernel. Each thread has its
own state, include a priority, processor affinity, and
accounting information.
The six possible thread states are
ready
standby
running
waiting
transition
terminated
17
18. Ready:
Ready means waiting to run.
Standby:
The highest priority thread is moved to the standby state, which
means that will be the next to run.
Running:
A thread is running when it is executing on a processor it is run
until it is preempted by a higher priority thread.
Waiting:
A thread is in the waiting state when it is waiting for a signal such as
completion.
Transition:
A new thread is in the transition state while it is waiting resources
necessary for execution.
Terminated:
A thread enters the terminated state finishes execution
18
19. EXCEPTIONS AND INTERRUPTS
Kernel also provides trap handling for exceptions and
interrupts by hardware or software. Window 2000
defines several architecture exceptions, including
memory access violation, integer overflow, underflow,
floating point by zero.
The exception dispatcher creates an exception that
contains the reason for the exception and finds an
exception handler deal with it.
It queues a deferred procedure call (DPC)
19
20. LOWLEVELPROCESSOR
The APC mechanism is similar to the DPC
mechanism, But for more use.
An APC is more powerful than a DPC, in that it can
acquire and wait objects, cause page faults, and call
system services.
The kernel must prevent two of its threads from
modifying a shared data structure the same time.
The kernel uses spinlocks that reside in global
memory to have multiprocessor mutual exclusion.
20
21. Executive
The services are grouped as follows:
Object Manager
Virtual memory manager
Process manager
Local procedure call
21
22. Object Manger:
Object Manager is the centralized resource broker in
the Windows NT line of Operating Systems, which keeps
track of the resources allocated to processes. It is resource-
agnostic and can manage any type of resource, including
device and file handles..
Objects can either be Kernel object or Executive object.
Kernel objects represent primitive resources such as
physical devices, or services such as synchronization, which
are required to implement any other type of OS service.
Kernel objects are not exposed to user mode code, but are
restricted to kernel code. Applications and services
running outside the kernel use the Executive objects, which
are exposed by the Windows Executive along with its
components such as the memory manager, scheduler and
I/O subsystem.
22
23. VIRTUAL MEMORY MANAGER
The virtual memory portion of the windows 2000
executive win memory manager.
The VM manager 2000 uses a page based
management scheme with a page size of pages of data
that are assigned to a process but are not in physical
memory stored in the paging file on disk.
The copy on write mechanism allows the VM manager
to save memory.
The process has a page directory that contains 1204
page directory entries of 4 bytes
23
26. I/O MANAGER
I/O Manager is responsible for file system, cache
management, device and network drivers.
In many operating systems, caching is done by the
file system. The cache manager maps files into this
address space uses the capabilities of the VM manager
to handle file I/o.
Each cache block is described a virtual address
control block that stores the virtual address.
I/o managers receives a user level read request the
I/o manage sends an IRP to the cache manager.
26
28. I/o mechanism:
This mechanism simply copies data to from cache pages
and utilizes the cache manager to perform any needed I/O.
Pinning a page locks the page into a physical memory
page frame.
Security Reference Monitor:
A process opens a handle to an object security reference
monitor checks the process security token and the object
access control list.
Plug and play manager:
The operating system uses the plug and play manager
to recognize adapt to changes in the hardware
configuration.
28
29. Environmental Subsystem
Components of the Microsoft Windows NT or Windows 2000
operating system that support the running of applications from
different operating system architectures.
They are an essential part of the Windows NT operating system
that enables cross-platform support for applications written for
different operating systems. Windows NT and Windows 2000
include the following environmental subsystems:
Win32 subsystem for running 32-bit Windows applications
OS/2 subsystem for running OS/2 1.X character-based
applications (does not support the OS/2 Presentation Manager
GUI or Warp versions)
POSIX subsystem for running POSIX.1-compliant applications
29
30. File system
MS-DOS system have used the file allocation table file
system.
The NTFS file system is much better.
Internal layout:
A file in NTFS is not a simplybyt e stream as it is in
Ms-DOS or UNIX and structured object consisting of
attributes.
Small attributes stored in the MFT RECORD it self
and are called resident attributes.
30
31. Recovery:
This schema does not guarantee that all the user file content are
correct a crash, the log is stored in the third meta data file at the
beginning of the volume.
The logging functionality is provided by the windows 2000 log file
service.
Security:
The security of an NTFS volume is derived from the windows 2000
object model.
Volume management and fault tolerance:
Volume is called a volume set which can consist of up to 32 physical
information.
This scheme is also called RAID level 0 or disk striping.
31
32. NETWORK
A networking operating system provides services to clients over a
network. Both the client/server and peer-to-peer networking models
use network operating systems, and as such, Noses must be able to
handle typical network duties such as the following:
Providing access to remote printers, managing which users are using
which printers when, managing how print jobs are queued, and
recognizing when devices aren't available to the network
Enabling and managing access to files on remote systems, and
determining who can access what—and who can't
Providing routing services, including support for major networking
protocols, so that the operating system knows what data to send where
Monitoring the system and security, so as to provide proper security
against viruses, hackers, and data corruption.
Providing basic network administration utilities (such as SNMP, or
Simple Network Management Protocol), enabling an administrator to
perform tasks involving managing network resources and users.
32