You are on page 1of 14

Course: Operating System (3439) Semester: Spring, 2020

ASSIGNMENT No. 2
Q. 1 Describe the terms: I/O Software and Disks with the help of suitable examples.

Operating System - I/O Software


I/O software is often organized in the following layers:

User Level Libraries - This provides simple interface to the user program to perform
input and output. For example, stdio is a library provided by C and C++ programming
languages.
Kernel Level Modules - This provides device driver to interact with the device
controller and device independent I/O modules used by the device drivers.
Hardware - This layer includes actual hardware and hardware controller which interact
with the device drivers and makes hardware alive.
A key concept in the design of I/O software is that it should be device independent where it
should be possible to write programs that can access any I/O device without having to
specify the device in advance. For example, a program that reads a file as input should be
able to read a file on a floppy disk, on a hard disk, or on a CD-ROM, without having to
modify the program for each different device.

Interrupt Handlers:
An interrupt handler, also known as an interrupt service routine or ISR, is a piece of
software or more specifically a callback function in an operating system or more

Page 1
specifically in a device driver, whose execution is triggered by the reception of an
interrupt.
When the interrupt happens, the interrupt procedure does whatever it has to in order to
handle the interrupt, updates data structures and wakes up process that was waiting for an
interrupt to happen.
The interrupt mechanism accepts an address ─ a number that selects a specific interrupt
handling routine/function from a small set. In most architectures, this address is an offset
stored in a table called the interrupt vector table. This vector contains the memory
addresses of specialized interrupt handlers.

User-Space I/O Software:


These are the libraries which provide richer and simplified interface to access the
functionality of the kernel or ultimately interactive with the device drivers. Most of the
user-level I/O software consists of library procedures with some exception like spooling
system which is a way of dealing with dedicated I/O devices in a multiprogramming
system.
I/O Libraries (e.g., stdio) are in user-space to provide an interface to the OS resident
device-independent I/O SW. For example putchar(), getchar(), printf() and scanf() are
example of user level I/O library stdio available in C programming.

Operating System - Disks


Generally, a disk is a a round plate on which data can be encoded. There are two basic
types of disks: magnetic disks and optical disks.

MAGNETIC DISKS:
On magnetic disks, data is encoded as microscopic magnetized needles on the disk’s
surface. You can record and erase data on a magnetic disk any number of times, just as you
can with a cassette tape. Magnetic disks come in a number of different forms:
Hard Disk - Hard disks can store anywhere from 20MB to more than 1-TB (terabyte).
Hard disks are also from 10 to 100 times faster than floppy disks.
Removable Cartridge - Removable cartridges are hard disks encased in a metal or
plastic cartridge, so you can remove them just like a floppy disk. Removable cartridges are
very fast, though usually not as fast as fixed hard disks.

OPTICAL DISKS:

Page 2
Optical disks record data by burning microscopic holes in the surface of the disk with a
laser. To read the disk, another laser beam shines on the disk and detects the holes by
changes in the reflection pattern.
Optical disks come in three basic forms:
CD-ROM - Most optical disks are read-only. When you purchase them, they are already
filled with data. You can read the data from a CD-ROM, but you cannot modify, delete, or
writenew data.
Erasable Optical (EO) - EO disks can be read to, written to, and erased just like
magnetic disks.
The machine that spins a disk is called a disk drive. Within each disk drive is one or more
heads (often called read/write heads) that actually read and write data.
Accessing data from a disk is not as fast as accessing data from main memory, but disks
are much cheaper. And unlike RAM, disks hold on to data even when the computer is
turned off. Consequently, disks are the storage medium of choice for most types of data.
Another storage medium is magnetic tape. But tapes are used only for backup and
archiving because they are sequential-access devices (to access data in the middle of a tape,
the tape drive must pass through all the preceding data).
Q. 2 Differentiate between the following terms:
 Files and Directories
 Swapping and Paging

Files VS Directories

S.NO. COMPARISON FILE DIRECTORY

1. Extensions Files can have Directories does not have


extensions. any extensions.

2. Organizations Serial, sequential, Single directory per user and


indexed sequential and multiple directory per user
direct file organizations. organization.

3. Contain other No. Yes.


same entity

4. Basic Collection of data. A place to store a group of


related files and Directories.

Page 3
5. Space There is a specific size of Folder does not consume
consumption a file. space in the memory.

Page 4
Swapping VS Paging

Swapping Paging

It is procedure of copying out the entire It is a technique of memory allocation.


process.

Swapping occurs when whole process is Paging occurs when some part of process
transferred to disk. is transferres to disk.

In this process is swapped temporarily Paging occurs when some part of process
from main memory to secondary is transferres to disk.
memory.

Swapping can be performed without any Non-contiguous Memory Management.


memory management.

Swapping is done by inactive processes. Only active process can perform paging.

It provides the direction regarding the No suggestion is given regarding the


solution. solution in it.

Q. 3 What is meant by “Network Operating System”? Explain it with the help of proper
examples.

Network Operating System (NOS)


A network operating system (NOS) is a computer operating system (OS) that is designed
primarily to support workstations, personal computers and, in some instances,
older terminals that are connected on a local area network (LAN). The software behind
NOS allows multiple devices within a network to communicate and share resources with
each other.

The composition of hardware that typically uses a NOS includes a number of personal
computers, a printer, server and file server with a local network that connects them
together. The role of the NOS is to then provide basic network services and features that
support multiple input requests simultaneously in a multiuser environment.

Page 5
Types of Network Operating Systems:
There are two basic types of network operating systems, the peer-to-peer NOS and
the client/server NOS:

1. Peer-to-peer network operating systems allow users to share network resources saved
in a common, accessible network location. In this architecture, all devices are treated
equally in terms of functionality. Peer-to-peer usually works best for small to medium
LANs and is cheaper to set up.
2. Client/server network operating systems provide users with access to resources
through a server. In this architecture, all functions and applications are unified under
one file server that can be used to execute individual client actions regardless of
physical location. Client/server tends to be most expensive to implement and requires
a large amount of technical maintenance. An advantage to the client/server model is
that the network is controlled centrally, makes changes or additions to technology
easier to incorporate.

Examples of Network Operating Systems:


True network operating systems are categorized as software that enhances the functionality
of operating systems by providing added network features. A few examples of these
network operating systems and their service providers are:

 Artisoft’s LANtastic- This is a simple, user-friendly NOS that supports most PC


operating systems.

 Banyan’s VINES- This uses a client-server architecture to request specific functions


and services.

 Novell’s NetWare- This was the first network operating system to be released and is
designed based on XNS protocol architecture.

 Microsoft’s LAN Manager- This operates as a server application and was developed to


run under the Microsoft OS. Now, most of the functionality of LAN Manager is
included in the Windows OS itself.

In addition, some multi-purpose operating systems, such as Windows NT and


Digital's OpenVMS come with capabilities that enable them to be described as a network
operating system. Further, the most popular operating systems
like Windows, Unix, Linux and Mac include built-in networking functions that may not
require additional network services.

Page 6
Q. 4 (a) What are those windows operating systems which have become very popular at the
time of their releases?

Microsoft Windows, commonly referred to as Windows, is a group of


several proprietary graphical operating system families, all of which are developed and
marketed by Microsoft. Each family caters to a certain sector of the computing
industry.

Microsoft introduced an operating environment named Windows on November 20,


1985, as a graphical operating system shell for MS-DOS in response to the growing
interest in graphical user interfaces (GUIs).[5] Microsoft Windows came
to dominate the world's personal computer (PC) market with over 90% market share,
overtaking Mac OS, which had been introduced in 1984. Apple came to see Windows
as an unfair encroachment on their innovation in GUI development as implemented on
products such as the Lisa and Macintosh (eventually settled in court in Microsoft's
favor in 1993). On PCs, Windows is still the most popular operating system.

There are some windows operating systems which have become very popular at the
time of their releases:

1. Windows XP
2. Windows 7
3. Windows 10
4. Windows 2000

Q. 4 (b) Name at least twelve of them and also explain four popular operating systems in detail
along with their important features.
Microsoft Windows, also called Windows and Windows OS, computer operating
system (OS) developed by Microsoft Corporation to run personal computers (PCs).
Featuring the first graphical user interface (GUI) for IBM-compatible PCs, the
Windows OS soon dominated the PC market. Approximately 90 percent of PCs run
some version of Windows.
There are various versions of windows OS released since 1985 when Microsoft
Windows was introduced first time. Fewer of them are listed below:
 Windows 1
 Windows 2
 Windows 3
 Windows 95
 Windows 98

Page 7
 Windows 2000
 Windows ME (Millennium Edition)
 Windows XP
 Windows Vista
 Windows 7
 Windows 8
 Windows 10

Windows XP:
In 2001 when Microsoft introduced Windows XP it caught users' eye. Since then, it is
one of the most extensively used Operating system all over the world regardless of the
release of newer versions of Windows OS. On account of its countless advantages &
easy to use features, users continue to use Windows XP rather than using its successor
Windows Vista or Windows 7. This post will give you a technical overview of
Windows XP, different editions, and Win XP features and functions.
The "XP" in Windows XP stands for eXPerience. Windows XP was made by
integrating some of the best features of its predecessors such as security,
manageability, reliability of Windows 2000, plug & play, user friendly graphical user
interface of Windows Millennium (ME) that made a completely new Operating
System. The noticeable feature of Windows XP is that it uses very less computer
resources than higher version of Windows OS.

Different Versions of Windows XP:


 Windows XP Starter
 Windows XP Home
 Windows XP Professional
 Windows XP Media Center Edition
 Windows XP 64-bit Edition

What's New in Windows XP – Best Features:


Windows XP Operating system was introduced as an update to Windows
2000. Besides, it replaced Windows 95/98. Microsoft unveiled Windows
XP with new features and benefits over its precursor. Some of the main
features of Windows XP are listed below:
Remote Desktop - Windows XP professional OS enables user to use remote desktop
connection feature means they can sit at a PC and access another PC remotely.

Page 8
Device Driver Rollback - This new Windows XP feature let users uninstall
installed device driver. If users install device driver that causes system instability then
they can easily roll back the previous driver.
Built-in CD burner - When Windows XP arrived, it came up with its own in-built
CD burner feature. Now there is no longer need to install CD burning software, user
can burn files directly via Windows Explorer.
Encrypted file system support multi-user - This feature is for Windows XP
Professional, Encrypted file system make it possible to access encrypted files and
folders by multiple users.
Device support improvement - Windows XP supports USB 2.0, Intel High
Definition Audio based hardware, FireWire, & Windows Image Acquisition based
scanners etc.
Windows 7 is an operating system released by Microsoft on October 22, 2009. It
follows the previous (sixth) version of Windows, called Windows Vista.

Windows 7:
Like previous versions of Windows, Windows 7 has a graphical user interface (GUI)
that allows you to interact with items on the screen using a keyboard and mouse.
However, Windows 7 is also includes a feature called "Windows Touch" that supports
touchscreen input and multi-touch functionality. For example, you can right-click a
file by touching it with one finger and tapping it with another. You can also zoom in
on an image by touching it with two fingers, then spreading your fingers apart.
Windows 7 is bundled with several touch-ready programs that are designed for
touchscreen use.
Windows 7 also includes several new multimedia features. One example is "Play To,"
a program that allows you to stream audio and video to different computers or devices
within your house. The "HomeGroup" feature makes it easy to share media files and
other data between computers. It also makes it possible to share printers on a home
network. The "Remote Media Streaming" feature allows you to access the music,
video, and photo libraries on your computer from remote locations.
The search feature in Windows 7, called "Windows Search," allows you to see results
of searches as soon as you start typing in the search box. Windows Search categorizes
the results by file type and displays text snippets that indicate where the search phrase
was found in each result. After the search results are returned, it is possible to narrow
the results by filtering them by date, file type, file size, and other parameters. You can
search local drives, external hard drives, and networked drives all using the standard
Windows Search interface.

Windows 7 is available in the following editions:

 Windows 7 Home Premium


 Windows 7 Professional

Page 9
 Windows 7 Ultimate

Windows 8:
Windows 8, code-named Midori, is a version of Microsoft Windows that was
released on October 26, 2012. This iteration contains some of the biggest changes
Microsoft has made to their operating system since Windows 95. It features new
programming and technology that makes run faster than the previous versions. It also
has a more streamlined look and feel. Windows 8 includes a tablet interface,
called Metro, which is compatible with touch screen displays and stills offers access to
the traditional Windows desktop. Below is an example of the new Windows 8 Start
screen, which replaced the Start button and Start menu.

Windows 8 and 8.1 Features:


 Metro interface - Completely new designed interface called Metro that helps
Windows run better as a tablet. Other sections of Windows, for example the Task
Manager, were redesigned.
 Store - New app store that allows you to install Windows apps.
 Microsoft account login - Users can now utilize their Microsoft account to have
access to the same Windows settings across multiple computers.
 More login options - Can now login to Windows using a Pin or picture password.
 32-bit and 64-bit - Windows 8 is available to be installed as either 32-bit or 64-
bit.
 Improved Windows Defender - Improved Windows Defender with antivirus
capabilities.
 USB 3.0 support - Native support for USB 3.0.
 Xbox Live - Microsoft has also built Windows 8 with Xbox Live integration in
mind.
 Internet Explorer 10 - Internet Explorer 10 is included.

Windows 10:

Microsoft released Windows 10 in July 2015 as a follow-up to Windows 8. The


company has said it will update Windows 10 continuously, rather than release a new,
full-fledged operating system as a successor.

Windows 10 features built-in capabilities that allow corporate IT departments to


use mobile device management (MDM) software to secure and control devices

Page 10
running the operating system. In addition, organizations can use traditional desktop
management software such as Microsoft System Center Configuration Manager.

Windows 10 Mobile is a version of the operating system Microsoft designed


specifically for smartphones.

Windows 10 Features:
The familiar Start Menu, which Microsoft replaced with Live Tiles in Windows 8,
returned in Windows 10. Users can still access Live Tiles and the touch-centric Metro
interface from a panel on the right side of the Start Menu, however.

Microsoft Windows 10 Continuum allows users to toggle between touchscreen and


keyboard interfaces on devices that offer both. Continuum automatically detects the
presence of a keyboard and orients the interface to match.

Windows 10's integrated search feature allows users to search all local locations, as


well as the web simultaneously.

Microsoft Edge debuted with Windows 10 and replaces Internet Explorer as the
default web browser. Edge includes tools such as Web Notes, which allows users to
mark up web sites, and Reading View, which allows users to view certain websites
without the clutter of ads. The browser integrates directly with Cortana, Microsoft's
digital assistant, which is also embedded within Windows 10.

Q. 5 Write short notes on the following topics:


 CPU Management

Managing the CPU


The OS is used to run programs by clicking on an icon, selecting the program from a
menu, or typing in an instruction at the command line.

When the OS runs a piece of software it has to find the program files on
the storage drive, load them into main memory, and instruct the CPU to start executing
the program from the beginning.

In each case, the OS performs the same sequence of steps:

Page 11
1. the program code is found on the
storage drive
2. a section of RAM is reserved for the
program and space is allocated for the
program's data
3. the program code is copied from
storage into the reserved space in the
memory
4. the CPU program counter is set to the
memory location of the first instruction
in the program, and execution begins

Multitasking:
The OS makes it possible to run several programs at once. Several programs can be
stored in RAM at the same time, however only one program at a time is processed by
the CPU. Programs can be in one of three states:

 running
 waiting
 runnable
Only one process can be running at any one time. CPUs are extremely fast, so if a
program is processed for even a short time it can do quite a lot. The OS decides the
best way to swap between running, runnable and waiting processes. It controls which
process is being executed by the CPU at any point in time, and shares access to the
CPU between processes. The job of working out when to swap processes is known
as scheduling.

Swapping happens so fast that it appears that all processes are running at the same
time. When there are too many processes, or some of them are making the CPU work
especially hard, it can look as though some or all of them have stopped.

Q. 5 Write short notes on the following topics:


 Cooperative Processes
Cooperating processes are those that can affect or are affected by other processes
running on the system. Cooperating processes may share data with each other.

Reasons for Needing Cooperating Processes:


There may be many reasons for the requirement of cooperating processes. Some of
these are given as follows:

Page 12
 Modularity:
Modularity involves dividing complicated tasks into smaller subtasks. These
subtasks can completed by different cooperating processes. This leads to faster and
more efficient completion of the required tasks.

 Information Sharing:
Sharing of information between multiple processes can be accomplished using
cooperating processes. This may include access to the same files. A mechanism is
required so that the processes can access the files in parallel to each other.

 Convenience:
There are many tasks that a user needs to do such as compiling, printing, editing
etc. It is convenient if these tasks can be managed by cooperating processes.

 Computation Speedup:
Subtasks of a single task can be performed parallely using cooperating processes.
This increases the computation speedup as the task can be executed faster.
However, this is only possible if the system has multiple processing elements.

Methods of Cooperation:
Cooperating processes can coordinate with each other using shared data or messages.
Details about these are given as follows −

 Cooperation by Sharing:
The cooperating processes can cooperate with each other using shared data such as
memory, variables, files, databases etc. Critical section is used to provide data
integrity and writing is mutually exclusive to prevent inconsistent data.
A diagram that demonstrates cooperation by sharing is given as follows −

Page 13
In the above diagram, Process P1 and P2 can cooperate with each other using
shared data such as memory, variables, files, databases etc.

 Cooperation by Communication:
The cooperating processes can cooperate with each other using messages. This may
lead to deadlock if each process is waiting for a message from the other to perform
a operation. Starvation is also possible if a process never receives a message.
A diagram that demonstrates cooperation by communication is given as follows −

In the above diagram, Process P1 and P2 can cooperate with each other using
messages to communicate.

Page 14

You might also like