Content Difference between WINDOWS & UNIX operating system based upon following criteria: 1.File system 2.Memory management 3.Device management
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 1/18
Content
Difference between WINDOWS & UNIX
operating system based uponfollowing criteria:
1.File system
2.Memory management
3.Device management
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 2/18
UNIX: overview
•
It is a machine independentoperating system. Ken Thompsondeveloped it in 1969
•
Unix OS was written by programmerto programmer. It use C language toinstead of the previously usedassembly language
• Time-sharing, multi-user, multi-tasking are basic designed in thesystem(Multiple users can have
multiple tasks running at same time)
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 3/18
Window NT: overview
• Microsoft released it in 1993. It wasa full 32-bit OS
•
Its design goals includeextensibility, portability, reliability,compatibility, performance andinternational support.
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 4/18
UNIX File System
• UNIX file is a Hierarchical file structure.
All the files are organized into a multi-leveled hierarchy called a directory tree
• The file system supports two mainobjects: file and directory
• The directory contains a root directorywith many subdirectories
• File is stored as an array of fixed-sizedata blocks with perhaps a fragment
• The block sizes are set during a filesystem creation
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 5/18
UNIX File SystemInterface
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 6/18
UNIX File SystemImplementation
• IN Unix system, a file is represented by
an Inode (Index Node)• An Inode is a record that stores most of
the information about a file on the disk,such as its size and location. Each file
has an own indoe, all inodes have thesame size• The inode contains pointer that points
to file block. In Unix, the first 12 pointers
of inode point to blocks directly, so smallfiles can be accessed efficiently.• Example for READ file
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 7/18
UNIX mapping of a filedescriptor to an Inode
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 8/18
Window NT File System
• The fundament entity in NTFS is a volume.
A volume is created by the NT diskadministrator utility, and is based on alogical disk partition. The volume mayoccupy a portion of a disk, may occupy anentire disk, or may span across severaldisks. In NTFS, all information about thevolume are stored in a regular file.
•
NTFS does not deal with individualsectors of a disk, but instead uses clustersas the unit of disk allocation. A cluster is anumber of disk sectors that is a power of
2. The cluster size is configured when an
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 9/18
• A file in NTFS is a structured objectconsisting of attributes. Each
attribute of a file is an independentbyte stream that can be created,deleted, read, and written.
•
Every file in NTFS is described byone or more records in an arraystored in a special file called the
master file table (MFT). The size of arecord is determined when the filesystem is created.
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 10/18
UNIX Memory Management• UNIX system uses swapping to handle
memory contention among processes.Processes are swapped out until enoughmemory is available. The process iseither in the memory or on the disk.
•
Decisions regarding which processes toswap in or out are made by thescheduler process. The scheduler wakesup at least once every 4 seconds tocheck for processes to be swapped in or
out• A process is more likely to be swapped
out if it is idle, has been in main memorya long time or it is large
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 11/18
• A process is more likely to be swappedin if it has been swapped out a long
time, or is small• Berkeley introduced paging to UNIX.
Paging is added in order to handle alarge programs . The basic idea is :some programs don’t need entiretybring into memory to run. Such as text,data. We can bring them to memory by
dynamic. When we need them, we canbring in.
• Paging can eliminate the external
fragmentation of memory. Page-r l m nt l rithm n k n h
Wi d NT M
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 12/18
Windows NT MemoryManagement
• The virtual-memory portion of the NT
executive is the virtual-memorymanager(VM)
• The VM manager in NT uses a page-based management scheme with a page
size of 4KB. Pages of data that areassigned to a process but are not inphysical memory are stored in thepaging file on disk
•
The VM manager uses 32 bit addresses,so each process has a 4 GB virtualaddress space. The upper 2GB isidentical for all processes, and is usedby NT in kernel mode. The low 2 GB isdistinct for every process, and is
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 13/18
• The NT VM manager uses a two-stepprocess to allocate memory. The
first step reserves a portion of theprocess’s address space. The secondstep commits the allocation byassigning space in the NT paging file.
• The VM manager allows a privilegedprocess to lock selected pages inphysical memory thus ensuring thatthe pages will not be swapped out tothe paging file
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 14/18
Summary Of FILE SYSTEMDifference
S f M
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 15/18
Summary of MemoryManagement
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 16/18
Device management inUNIX
• Device driver in UNIX are usually linkedinto object code of kernel.
• This mean when a new device is usedwhich was not included in original
construction of O.S the UNIX kernel has torelinked with the new device driver objectcode.
• E.g. /dev/pty (pseudo terminal)
D i t i
8/3/2019 Diffrence Between Windows and Unix
http://slidepdf.com/reader/full/diffrence-between-windows-and-unix 17/18
Device management inwindows
•
In windows device driver areimplemented as dynamic linklibraries(DLLs). This provides anumbers of benefits:
• DLLs contain shareable code whichmeans that only one copy of thecode needs to be loaded into
memory. This is convenient sincemost application requires to use thestandard drivers such as keyboards
and displays.