Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Course - Operating Systems (CMCSC09)

MS DOS
(MicroSoft Disk Operating System)

Submitted by
Tanya Chhabra (2022UCM2323)
Kabir Chhabra (2022UCM2331)
MS - DOS
1) INTRODUCTION -

MS - DOS (Microsoft Disk Operating System) is an operating system that was developed
for utilization in personal computers by Microsoft. It is based on Layered structure, split
into various different layers, each layer having its own function to perform.

Its user interface is based on a command line interface (CLI) also known as text - based
interface or character - user interface. It does not have a Graphical user interface (GUI)
like many modern operating systems have, so all commands and operations have to be
performed using CLI.

In MS DOS system calls were made using software interrupts. Some common system
calls in MS - DOS were interrupt 21h, interrupt 10h, interrupt 13h, interrupt 16h, interrupt
33h; Using these interrupts softwares running on MS - DOS could access various
system functions and hardware resources.

System programs are essential for managing operating system and performing various
tasks. These system programs are typically stored in the DOS directory. Some common
system programs in MS - DOS are COMMAND.COM, CHKDSK, FORMAT, DSKCOPY,
DEFRAG etc.
MS DOS did not support preemptive multitasking, meaning it could only execute one
program at a time.When a program was launched, MS-DOS would give control to that
program until it terminated or yielded control back to the operating system. MS-DOS
provided a simple environment where one program could run at a time, and the operating
system primarily served to manage system resources and provide basic services to
running programs.

MS DOS did not have a traditional short term and long term scheduler, since it only
supported a single process at a time.

Process creation and termination was relatively very simple in MS DOS compared to
modern operating systems since it only ran a single process at a time. A process was
created whenever the user typed the name of a program in the command prompt and
then control was transferred to it. Process termination was done in two ways, either
normally by simple exit() command or abnormally (or abruptly) whenever an error was
encountered.

Since MS-DOS was primarily a single-tasking operating system, there was minimal
support for IPC mechanisms.
Shared memory was not a native feature of MS-DOS, programmers could implement
basic shared memory techniques using low-level memory management functions and
custom IPC mechanisms.

MS-DOS itself did not directly support threads or true multitasking, programmers could
simulate concurrent execution or multitasking within the constraints of the environment
using various techniques and third-party tools. Therefore it mainly only supported single
threading. Similarly multicore programming was also quite limited in MS DOS because of
it being a single tasking system, also it did support any kind of Parallelism.

2) Process Synchronization in MD DOS -


Process synchronization in MS DOS was difficult because of it being a single tasking
system without any support for native concurrent execution. However programmers
could implement basic synchronization by using various programming techniques and
low level mechanisms. Some of those approaches are –

1. Semaphore - like techniques – MS-DOS didn't provide native semaphore support,


programmers could implement semaphore-like behavior using file locking
mechanisms. Processes could create and manipulate files as synchronization
objects. For example, a process could create a special file to act as a semaphore.
Processes wishing to access a shared resource would attempt to lock the file. If
the file was already locked by another process, they would wait until it was
unlocked.
2. Critical Sections – Programmers used critical sections through which exclusive
control could be given to shared resources. By implementing custom locking
mechanisms, such as using file locks or flags, processes could synchronize
access to critical sections of code.

3. Message Passing – Processes in MS-DOS could communicate indirectly through


message passing. One process could send messages to another process to
coordinate their activities or share data.This could be implemented using
techniques like file I/O or custom IPC mechanisms, such as interrupt-driven
communication.

4. Polling and Event flags – Processes could use polling or event flags to
coordinate their activities. For example, one process could periodically check the
status of a file or a memory location to determine if a condition was met before
proceeding. Event flags could be set or cleared by one process to signal other
processes to take specific actions.

5. Custom synchronization Mechanisms – Programmers could implement custom


synchronization mechanisms tailored to the specific requirements of their
applications.This could involve using low-level programming techniques, such as
interrupts or direct memory manipulation, to coordinate the activities of multiple
processes.

Therefore by using creative programming techniques one could perform process


synchronization in MS DOS because it lacked advanced synchronization that is found in many
modern operating systems.

3) Deadlocks in MS DOS –

Deadlocks are a concept that primarily applies to multitasking operating systems, where
multiple processes are running concurrently. MS-DOS was not a multitasking operating system
in its original form. It was a single-tasking operating system, meaning it could only run one
program at a time. Therefore, the concept of deadlocks doesn't directly apply to MS-DOS.
However, there were some attempts to introduce multitasking capabilities to MS-DOS through
third-party software such as task-switchers or multitasking environments like DESQview, so
some basic deadlock handling was required.

Deadlock handling in MS DOS –


Deadlock handling in MS-DOS was challenging due to its single-tasking nature and lack of
built-in support for preemptive multitasking or concurrent execution. However, programmers
could implement basic deadlock detection and avoidance strategies using various programming
techniques and low-level mechanisms provided by MS-DOS, some of these techniques are –
1) Resource Allocation Order – Programmers could establish a consistent order for
requesting resources to prevent circular wait conditions, which are a common
cause of deadlocks. They could define a strict order in which processes could
request resources.

2) Timeout Mechanisms – Processes could implement timeout mechanisms to


detect and recover from potential deadlock situations. For example, a process
could wait for a certain period to acquire a resource. If the resource was not
acquired within the specified time, the process could release any resources it
held and retry the operation.

3) Resource Reservation – Processes could reserve resources in advance to avoid


contention and potential deadlock situations. For example, a process could
reserve a resource exclusively before proceeding with critical operations to
prevent other processes from accessing it.

4) Detection and Recovery of Deadlocks – Programmers could implement custom


deadlock detection algorithms to identify potential deadlock situations. Once a
deadlock was detected, processes could take corrective actions, such as
releasing resources, terminating certain processes, or restarting affected
processes.

5) Avoidance of deadlocks (By avoiding circular dependencies) – Programmers


could design their applications to minimize the potential for circular
dependencies among resources. By carefully designing resource allocation
patterns and avoiding scenarios where processes could block indefinitely waiting
for resources held by other processes, programmers could reduce the risk of
deadlocks.

Therefore deadlock handling in MS-DOS required careful programming and design to


eliminate the risks associated with concurrent resource access.

4) File Management in MS DOS –

File management is a fundamental aspect of any operating system. In MS - DOS it


primarily revolved around managing files and directories stored in the disk. MS-DOS
provided a set of commands and utilities for performing various file management tasks
from the command prompt. Some of its key features are –
1) FIle naming and convention – MS-DOS supported a specific file naming
convention, where filenames could be up to eight characters long followed by a
period and an optional three-character extension (known as 8.3 filename format).
Filenames were case-insensitive, and special characters such as spaces were
not allowed in filenames. Underscores (_) or hyphens (-) were often used instead.

2) Directory Structure – MS-DOS organized files into directories (also known as


folders), which could contain other directories and files. The root directory
(designated by a backslash "") was the top-level directory on a disk, and
subdirectories could be created within it.

3) File Management Commands – Set of commands for for performing file


management tasks in MS - DOS are –

DIR: Display a list of files and directories in the current directory.


CD or CHDIR: Change the current directory.
MD or MKDIR: Create a new directory.
RD or RMDIR: Remove a directory.
COPY: Copy files from one location to another.
DEL or ERASE: Delete one or more files.
REN or RENAME: Rename a file.
TYPE: Display the contents of a text file.
ATTRIB: Change file attributes such as read-only, hidden, and system.

4) File System Formats – MS-DOS supported various file system formats, including
FAT12, FAT16, and later FAT32. These file systems determined how files and
directories were organized and stored on disk, as well as the maximum file size
and partition size supported.

5) Disk Management – MS-DOS provided commands for managing disks and


volumes –
FORMAT: Format a disk for use with MS-DOS.
DISKCOPY: Copy the contents of one disk to another.
CHKDSK: Check the integrity of a disk and file system for errors.

6) Batch Files and Scripts –


Programmers could create batch files (text files containing a series of MS-DOS
commands) to automate common file management tasks.
Batch files allowed users to execute sequences of commands with a single
command, making repetitive tasks more efficient.

5) I/O systems in MS DOS

I/O operations are imperative in all operating systems to allow communication between
internal hardware and peripheral devices. MS DOS provides a set of system calls and
interrupt services to handle such I/O operations effectively.
Here’s an overview of the key components of I/O systems in MS DOS-

a) Device Drivers: These are software modules which are loaded into memory at
boot time and are responsible for communication between internal hardware and
peripheral devices like printers, keyboards etc.

b) Interrupts: MS DOS relies mostly on interrupts for I/O operations. These are
signals generated by the hardware (internal as well as peripheral) to acquire the CPU’s
attention and communicate with other hardware devices.

c) Device I/O ports: These ports provide a means of communication between the
CPU and peripheral devices Device drivers use instructions such as IN and OUT to read
from and write to specific I/O ports, allowing them to control hardware devices directly.

d) BIOS services: MS-DOS interacts with hardware using the BIOS routines which
provide a standardized interface for accessing hardware functions. Applications running
in MS-DOS can make BIOS calls to perform I/O operations without needing to know the
specifics of the underlying hardware.

MS-DOS relies on a combination of device drivers, interrupts, BIOS services, file system
operations, and direct hardware access to manage input/output operations efficiently
and provide a platform for running applications on compatible hardware.

6) System Protection

MS DOS, which is a primitive operating system, has been primarily designed for single
user systems, hence lacks many sophisticated system protection features which can be
found in modern day operating systems.
Some basic aspects of system protection in MS DOS have been discussed below:

a) User Authentication: Absence of user login and passwords in the operating


system. Once a user boots the computer, the operating system does not require
users to log in to it.

b) File System Security: Files and directories are accessible to all users on the
operating system. This is because MS-DOS file systems (such as FAT12, FAT16,
and FAT32) lack built-in access control mechanisms.

c) Limited Multitasking: MS-DOS is a single-tasking operating system, meaning it


can only run one program at a time. This limits the risk of unauthorized access or
interference between running programs.

d) External Security Measures: Organizations using MS-DOS might have employed


external security measures such as physical security (e.g., restricting physical
access to computers), network security (e.g., firewalls and network
segmentation), and data backups to mitigate security risks. This implies no
in-built security measure by the operating systems.

e) Boot Sector Protection: MS-DOS boot sectors can be susceptible to viruses and
malware. However, some versions of MS-DOS included utilities for scanning and
cleaning infected boot sectors.

System protection in MS-DOS was relatively basic compared to modern operating


systems. It was designed for simpler computing environments and lacked the complex
security features necessary for protecting against modern threats.

7) System Security in MS DOS

Modern-day operating systems incorporate a wide array of security features to protect


against various threats, from user authentication and network security to encryption and
malware protection. MS DOS has relatively minimal system security features compared
to these.
Some of the system security features that MS DOS possesses has been discussed
below:

a) Boot Sector protection feature: It is a measure to safeguard the boot sector of


any storage device. For this, users can use antivirus softwares designed specially
for MS DOS to scan and clean infected sectors. Real time detection is also
possible in some of the softwares which prevents corruption of storage devices
at the earliest.

b) Password Protection: Although there is no inbuilt password protection feature,


external applications provide this measure for protection of the operating system
as well as access rights of data and programs.

c) Network Security: When MS DOS is connected to the network, users could


employ basic measures like firewalls and access control lists to protect against
network based attacks against the operating system.
CONCLUSION

MS - DOS (Microsoft Disk Operating System), was an operating system


developed by Microsoft in 1980’s. Its architecture was based on a layered
approach, with each layer to perform different functions. It did not have a
graphical user interface (GUI), rather had a command line interface (CLI)
where different commands had to be written to perform various operations.
MS - DOS being a primitive operating system did not support preemptive
multitasking, it could execute only a single program at a time. Since
natively only one program could be executed at a time, it had minimal
interprocess communication (IPC). With the help of some third party
programs, MS - DOS could perform multitasking, but at a very primitive
level. Deadlocks were not a major problem in MS - DOS since it was a
single task processing operating system, still it had some basic
mechanisms for deadlock handling. File management was an integral part
of MS - DOS, different operations could be performed on the files by
writing specific commands in the command line interface. MS - DOS
provided a variety of system calls and interrupts for input - output services,
like device drivers, I/O ports, BIOS etc. Since MS - DOS was a primitive
operating system designed mainly for use by a single user, therefore it
lacked sophisticated system security and protection measures. System
security and protection in MS - DOS was very simple compared to modern
day operating systems. Some earlier versions of Windows also ran their
GUI using MS - DOS as the basis.

Overall MS - DOS has played a significant role in Microsoft’s development


from a programming language company to a diverse software development
firm. MS DOS was the main operating system before Windows OS came
out. With developments in the operating system features like multitasking,
deadlock handling and security and protection features, the later versions
of Windows OS were released by Microsoft that now compete with modern
day operating systems.
REFERENCES
1) MS-DOSWikipediahttps://en.wikipedia.org › wiki ›
MS-DOS

2) MS-DOS Operating
SystemGeeksforGeekshttps://www.geeksforgeeks.o
rg › ms-dos-operating-syst…

3) What is DOS (Disk Operating


System)?TechTargethttps://www.techtarget.com ›
searchsecurity › definition

4) MS-DOS Operating
SystemJavatpointhttps://www.javatpoint.com ›
ms-dos-operating-system

5) ChatGPT

—--------------------------------------------END OF DOCUMENT—------------------------------------------------

You might also like