Cs 609
Cs 609
Cs 609
Software can be categorized into two main types: System Software and Application Software.
System Software is concerned to the system or its resources while Application Software is
related to some application. Operating System is one of the good examples of System software
that acts as a manager for the System’s resources. It arbitrates and schedules the resources
among the processes to avoid any kind of conflicts.
There are varieties of Operating Systems available in the market but Windows is one of the
important Operating Systems developed by Microsoft. It is widely used inside the PCs, Laptops,
enterprise servers, handheld devices and cell phones etc.
Windows exist in several versions. New versions of Windows are introduced from time to time.
Actually, certain new APIs are included in the new version to improve or extend its
functionalities. The following major themes or features are considered while developing a new
version.
In the 1980s, Microsoft Disk Operating System was used inside the IBM PCs incorporating Intel
Processor. It was a text based and command line operating system. It was a single user OS. Its
filing system was based on FAT and was able to access up to the maximum of 4GB files.
Windows History
Keeping the demand of graphical user interface, Microsoft developed its first version Windows
3.1. In this version, DOS Kernel and FAT based file systems were used.
After that in the 1990s, certain new versions of Windows named Windows 95, 97 and 98 were
introduced supporting the 32-bit architecture of Intel’s processors.
Later on, Windows NT versions were introduced supporting a file system based on new
technology called NTFS. Its security and file system were better than the previous versions.
Windows Server 2008 OS was developed for professional use to manage enterprise and server
applications. Support for multi-core technology and 64-bit applications was provided in this OS.
Other Windows versions supporting 32-bit, 64-bit architecture, multi-core and multiprocessing
were also introduced including Windows XP, Windows Vista, Windows 7, 8 and Windows 10.
Above 90% PCs are based on Intel’s processors and Windows is the most appropriate OS for
Intel PCs. In the world of desktop, the most dominant OS is the Microsoft Windows which
enjoys a market share of above 80%. Windows is not confined to the desktop, it also has
support for diverse platforms including multi-core, multiprocessing, servers and mobiles etc.
Due to its dominance role, certain applications and software development tools are available in
the market that can easily integrate with Windows OS and can develop windows applications
ranging from small scale to enterprise level.
One of the key features of Windows OS is its rich GUI that makes its use very convenient. This
interface can be easily customized according to the local setup. The size, color and visibility of
graphical interface objects can also be changed by the user.
Compared to other operating systems, certain modern features exist in Windows due to which
most of the developers develop their applications for Windows targeting the huge market of
Windows.
Open-Source Software is a software that is publicly available with its source code to use, modify
and distribute with original rights. It is developed by the community rather than a single
company or vendor. In contrast, proprietary software is copyrighted and only available to use
under a license.
As Windows components are provided and updated only by a single vendor, its implementation
remains uniform throughout the world. Further, extensions in Window components or APIs are
only vendor-specific and so no non-standard extension is possible except for platform
differences.
Windows also support various types of hardware platforms like open systems.
In Windows OS, all the system resources including processes, threads, memory, pipes,
DLL etc. are represented by objects which are identified and referenced by a handle.
These objects cannot be directly accessed. In case, if any application approaches to
access these objects directly, Windows throws an appropriate exception. The only way
to access and operate on these objects is a set of APIs provided by Windows. Several
APIs can be related to a single object to manipulate it differently.
A long list of parameters is associated with each API where each parameter has its own
significance but only few parameters are specified for a specific operation.
To perform the task of multitasking and multi-threading efficiently, Windows provides a
number of synchronization constructs to arbitrate among the resources.
The names of Windows APIs are long and descriptive for its proper and convenient use.
Some pre-defined data types required for Windows APIs are:
o
BOOL (for storing a single logical value)
HANDLE (a handle for object)
LPTSTR (a string pointer)
DWORD (32-bit unsigned integer)
Windows Data types avoid the pointer operator (*).
Some lowercase prefix letters with variable names are used to identify the type of
variable. This notation is called Hungarian notation. For example, in the variable
name lpszFilename, ‘lpsz’ is Hungarian notation representing a long pointer to zero
terminated string.
windows.h is a header file including all the APIs prototypes and data types
NT File System
NTFS is an important file system supported by Windows, its main features are:
o Security: One user cannot access other user data without privileges.
o Fault tolerance (if a portion of disk corrupts, it works because different copies
of information are maintained in this files system).
o Support CD
Supports Universal Disk Format (UDF) & Live File System (LFS) also
Windows OS supports a number of File Systems. Each file system has its own
mechanism for naming files.
Letters like A, B, C etc. are used to represent Drive, Network Drives are represented by
higher letters like N, K, L etc.
Double slash (\\) in the start of path represents remote resource
Forward slash ( \ ) or backslash ( / ) is used as a path name separator
The first 31 ASCII characters (control characters) cannot be used in file names
Special symbols like \, /, colon (:), pipe (|) etc. cannot be used in filenames
File and directory names are case insensitive
File name and extensions are separated by (.)
Max size for file name is 255 and for path is 260 characters.
File extension takes 2 – 4 bytes
Single dot (.) represents current directory while double dot (..) represents one step back
(up) directory
CreateFile() API with a list of parameters is used to open or create a new file. Its return type is
HANDLE to an open file object in case of successful opening or creation. The parameters are:
Syntax:
BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD
lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
If the file is not opened in concurrent mode, then ReadFile() starts reading from the
current position.
If the current location is End of File, then no Errors occur and *lpNumberOfBytesRead is
set to zero
The function returns FALSE if it fails in case any of the parameter is invalid
Parameters
Syntax:
To write through the current size of file, the file must be opened with
FILE_FLAG_WRITE_THROUGH option.