Windows 10 Io

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30

ISAS (Information Search and Analysis

Skills)

”Input Output System of Windows 10 OS”

Name:

Ismi Rizki Sopiyanti

Maulida khoirun Nuzul

Salsabilla Armelia Putri

Faculty:

Susi Maulidiah

Class: 1CC5 (CEP CCIT - TI Reguler)

Faculty of Engineering University of


Indonesia

Depok 16424
Preface

Thanks to Almighty God who has given the bless for finishing this ISAS
(Information Search and Analysis Skills) about Input and Output System in
Windows OS (Operating System). Also we wish to express our deep and sincere
gratitude for those who have in completing this paper especially Ms. Susi
Maulidiah.

Our ISAS (Information Search and Analysis Skills) paper conteins about
Input and Output System in Windows OS (Operating System). There are
definition about Windows 10 OS and definition abaout Input Output System in
Windows OS. That can help people using and knowing about windows OS.

This paper may have some flaws infections, we hope raeders


will give comments and suggestion in building this article also can
expand the knowledge of the raeders.

Depok, November 26th 2019

Author
TABLE OF CONTENTS

TABLE OF CONTENT……………………………………. i

TABLE OF FIGURES……………………………………. ii

CHAPTER I………………………………………………...1

INTRODUCTION…………………………………………. 1

1.1 Background……………………………………………. 1

1.2 Writting Objective…………………………………….. 2

1.3 Problem Domain……………………………………… 2

1.4 Writting Methodology………………………………… 2

1.5Writting Framework……………………………………. 2

CHAPTER ………………………………………………... 5

BASIC THEORY………………………………………… 5

II.1 Definition of Operating System……………………….. 5

II.2 Definition of Input Output System of Windows 10…….5

II.3 Methods of Input/Output System Windows……6

II.4 Function of Basic Input/Output System………. 6

CHAPTER III…………………………………………….. 7
III.1 I/O Problem…………………………………………...7

III.2 I/O Device……………………………………………...8

III.3 I/O Manager…………………………………………8

III.4 I/O Drivers…………………………………………..9

III.5 I/O System Components ……………………………10

III.6 I/O Media……………………………………………..11

III.7 I/O Scheduling………………………………………..14

III.8 Synchronous and Asynchronous I/O………………....14

III.9 I/O File Buffering and Chacing………………………15

III.10 I/O Performaces…………………………………….16

III.11 I/O Completion Part………………………………..17

III.12 I/O Cancelletion…………………………………….17

III.13 I/O priorities………………………………………...18

CHAPT ER IV……………………………………………23

CONCLUSION AND SUGGESTION…………………. 23

IV.1 Conclusion……………………………………………23

IV.2 Suggestion……………………………………………23

BIBLIOGRPAHY………………………………………...25

APENDIX…………………………………………………25
TABLE OF FIGURES

3.1 Table provide an overwiew of speed of some I/O devices……….7

3.2 I/O system components …………………………………………12

3.3 USB……………………………………………………………...13

3.4 I/O Scheduling Diagram…………………………………………14

3.5 Synchronous and Asynchronous………………………………...15

3.6 File Cache Diagram……………………………………………...16

3.7 Performances…………………………………………………….17

3.8 Cancelling Synchronous I/O System…………………………….20

3.9 Cancelling Asynchronous I/O System…………………………..21

3.10 I/O Priorities……………………………………………………21


CHAPTER I

INTRODUCTION

I.1 Background

An operating system (OS) is a program, but is different from word


processing programs, spreadsheet, and all the other software programs on
your computer. The operating system (OS) is an example of the system
hardware and that interact with the user and application software. In
short, the operating system in the computers master control program.
(Andrew S. Tanenbaum, Herbert Bos, 2014)

Windows 10 is an operating system developed by Microsoft for


personal computers that is part of the Windows NT family.Windows 10
was launched on 30 September 2014, and was released on 29 July 2015
and in November 2015, Threshold 2 of Windows 10 10 (v10.0.10586) was
first released for public release. (tipskominfo, 2017)

All Operating Systems must have an Input and Output System,


Input Output System are an important part of an Operating System. If
there are no Input and Output System, then an Operating System will not
work properly.

BIOS (basic input/output system) is the program a personal


computer's microprocessor uses to get the computer system started after
you turn it on. It also manages data flow between the computer's operating
system and attached devices such as the hard disk, video adapter,
keyboard, mouse and printer
1.2 Writting Objective

The purpose of the ISAS are:

1. Definition of Operating System


2. Definition of Windows 10 OS
3. Tell about BIOS

1.3 Problem Domain

Accordance with the title of ISAS “Input Output System Of


Windows” we will discuss about:

- To know the Input Output System of Windows 10 OS


- To know the I/O Sysyem Components of Windows 10 OS
- To know the I/O Device of Windows 10 OS

1.4 Writting Methodology

The method which used in this ISAS is the method of


browsing from internet, reading online journal, and make a survey
from problem domain.

1.5 Wrting Framework

The paper was written by systematic as follows:

CHAPTER I : INTRODUCTION

I.1 Background

Discuss the briefly description about operating system (OS),


description about Windows 10 OS, tell about Input Output Sytem of
Windows 10 OS.

1.2 Writting Objective


The purpose of article is to understand about operating system
(OS), description of Windows 10 OS, description about Input Ouput
Sytem of Windows 10 OS, description about features Input Output
System of Windows 10 OS.

1.3 Problem Domain

First, tell about the Operating System (OS) especially


Windows 10 OS, to know the Input Output System of Windows 10
OS. Second, How does Input and Output Sytem of Windows 10 OS
work.

1.4 Methodology Writting


To get data which needed, this paper use the method of
observing or direct observation techniques, author reads famous
repository online journal.
1.5 Writting Framework

This paper Writting Framework consists of four chapter, the


first chapter is introduction which tells the background, writting
objective, several problem domain, methodology writting and writting
framework of this paper.

CHAPTER II: BASIC THEORY

II.1 Definition of Operating System

II.2 Definition of Basic Input Output System

II.3 Methods of Input Output Sytem Windows

II.4 Function of Bsic Input Output System

CHAPTER III: PROBLEM ANALYSYS


III.1 Input Output problem

III.2 Input Output Device

III.3 Input Output Manager

III.4 Input Output Drivers

III.5 Input Output System Components

III.6 Input Output media

III.7 Input Output Scheduling

III.8 Synchronous and Asynchronous Input Output

III.9 Input Output File Buffering and Charging

III.10 Performances

III.11 Input Output Completion Part

III.12 Input Output Cancellation

III.13 Input Output Priorities

CHAPTER IV: CONCLUSION AND SUGGESTION`

IV.1 Conclusion

IV.2 Suggestion

CHAPTER II

BASIC THEORY

II.1 Definition of Operating System


The operating system is a program that acts as an intermediary
(interface) between the computer user (user) with a computer (hardware).
The operating system is a computer system software that helps
hardware in carrying out the functions of process management functions.
(Setiawan, 2017)

II.2 Definition of Basic Input/Output System

BIOS (basic input/output system) is the program a personal


computer's microprocessor uses to get the computer system started after turn
it on. It also manages data flow between the computer's operating system
and attached devices such as the hard disk, video adapter, keyboard, mouse
and printer.(Rouse, 2014)
The Windows I/O system consists of several executive components
that together manage hardware devices and provide interfaces to hardware
devices for applications and the system. The components that make up the
I/O system, including the I/O manager, Plug and Play (PnP) manager, and
power manager. Then, examine the structure and components of the I/O
system and the various types of device drivers. And look at the key data
structures that describe devices, device drivers, and I/O requests, then
describe the steps necessary to complete I/O requests as they move through
the system. Finally, present the way device detection, driver installation,
and power management work.(Mark E. Russinovich, 2012)

II.3 Methods of Input/Output System Windows

There are two different approaches to console I/O, the choice of


which depends on how much flexibility and control an application needs.
The high-level approach enables simple character stream I/O, but it limits
access to a console's input and screen buffers. The low-level approach
requires that developers write more code and choose among a greater range
of functions, but it also gives an application more
flexibility.(BitcrazedMicrosoft, 2018)

II.4 Function of Basic Input/Output System

The BIOS is the place which houses the settings for computer's CPU,
RAM, storage and ports. This means that it loads before the operating
system and handles the basic setup of how the machine behaves. Initially, it
conducts a general check of your hardware to ensure that the RAM, hard
drives, and other aspects are all alive and well, before loading the operating
system itself. Accessing the BIOS gives users the option to decide which
disk is checked first for an operating system (handy if you’re fixing a
system crash by booting from a USB drive), plus several other functional
controls. (Casserly, 2018)
CHAPTER 3

PROBLEM ANALYSYS

III.1 I/O Problems

Input and output have been a problem in operating system. One reason for this is the
large difference in speeds within a computer system. In the processor and the memory, data
processor and the memory, data processes very quickly though by comparison
communication with peripheral devices is very slow.

To write to the screen and a file is a slow process. A user typing on a keyboard can
wait several seconds before he types a character, while for the processer, it is not a good use
of time to wait for input/ output devices.

Table 3.1 Table provides an overview of the speed of some input/output devices

(An Introduction to Windows Operating System Book)

Another challenge with input/output is that hardware connecting to a computer is


from different manufactures. For example, is there are many types of screens, and these
require separate drivers. It would hence be cumbersome if programmers had to create code
for each that might be using the program.

The operating system takes care of communication with hardware. It makes


programming much easier when programmers can communicate with the operating system,
rather than directly with the hardware. For example, in his code a programmer can write an
output to the screen as Write (“A Massage”).
The operating system takes care of the communication with the screen, mouse,
printers and similar equipment. Application can therefore work on different computer with
different hardware devices connected. (Krough, 2016 )

III.2 I/O Devices

The type of data can divide input and Output devices that they send, there are:

 Block Devices
Block Devices store data in blocks, each of which has an address. The
typical size of a block has generally been between 512 bytes and 32768 bytes.
Hard drivers, CD-ROM and USB drives are examples of block devices.

 Character Devices
Character Devices are another type of input/output device than Block
Devices. Character devices transmit and receive data as characters. Examples
of Character Devices are the keyboard, the mouse, printers and network
connections. Devices that are not disc are usually Character Devices. (Krough,
2016 )

III.3 I/O Manager

The input/ output Manager is the central component of the input/output system. It
firms, a connection between software and hardware that provides an infrastructure that
support hardware drivers.

The input/ output Manager takes care of system hardware drivers, and does a variety
of services related to the equipment attached. The input/output Manager takes care of the
following tasks:

 The implementation of drivers.


 The configuration of drivers.
 Access to hardware devices.
 Operations on hardware equipment. (Krough, 2016 )
III.4 I/O Drivers

Each physical device attached to a computer needs software specifically designed for
it and its task. A driver is software that makes it possible for the operating system to
communicate with hardware, and is either a part of the operating system or a small
program designed to communicate with the operating system.

When an application needs to use a driver. It calls a function that belongs to


the operating system’s library. The operating system then calls that driver’s code.
When the peripheral device is ready. It sends a interrupt signal to the processor.

The operating system calls a driver using a Device Switch is an array. Each
driver has an index in this array that contains a collection of pointers that point to
methods used to use the driver.

Different operating system manages drivers in two ways:

1. The driver is always in the memory, so that it is sleeping when not in use.
2. The driver is loaded into the memory only when necessary.

A data structure called an IORB is important for a driver.

IORBR – Input Output Request Block

The data structure contains parameters for input/output drivers, and the information in
an IORB can be:

 A flag indicating whether to read, print or similar.


 Where data is located in memory.
 The Number of bytes to transfer.
 The peripheral unit numbers.

To make sure that the drivers for hardware work well with the rest of Windows
Operating System. Microsoft has defined a model called a Windows Driver Model
(WMD) that drivers are expected to work with Microsoft also has a Driver Verifier
that examines many of function of drivers to make sure thet they follow requirements
of WDM.
There are hundreds of thousand of hardware drivers for a Windows operating system,
which provides a lot of code. Application errors in the driver code means that the
system stops, and That Windows will then show the Blue Screen of the Death. The
normal program execution then stops. (Mark Russinovich, 2008)

III.5 I/O System Components

The design goals for the Windows I/O system are to provide an abstraction of devices,
both hardware (physical) and software (virtual or logical), to applications with the following
features:

 Uniform security and naming across devices to protect shareable resources.

 High-performance asynchronous packet-based I/O to allow for the implementation of


scalable applications.

 Services that allow drivers to be written in a high-level language and easily ported between
different machine architectures.

 Layering and extensibility to allow for the addition of drivers that transparently modify the
behaviour of other drivers or devices, without requiring any changes to the driver whose
behaviour or device is modified.

 Dynamic loading and unloading of device drivers so that drivers can be loaded on demand
and not consume system resources when unneeded.

 Support for Plug and Play, where the system locates and installs drivers for newly detected
hardware, assigns them hardware resources they require, and also allows applications to
discover and activate device interfaces.

 Support for power management so that the system or individual devices can enter low power
states.

 Support for multiple installable file systems, including FAT, the CD-ROM file system
(CDFS), the Universal Disk Format (UDF) file system, and the Windows file system (NTFS).

 Windows Management Instrumentation (WMI) support and diagnosable so that drivers can
be managed and monitored through WMI applications and scripts.
To implement these features the Windows I/O system consists of several executive
components as well as device drivers, which are shown in Figure 3.2

 The I/O manager is the heart of the I/O system. It connects applications and system
components to virtual, logical, and physical devices, and it defines the infrastructure that
supports device drivers.

 A device driver typically provides an I/O interface for a particular type of device. A driver is
a software module that interprets high-level commands, such as read or write, and issues low-
level, device-specific commands, such as writing to control registers. Device drivers receive
commands routed to them by the I/O manager that are directed at the devices they manage,
and they inform the I/O manager when those commands are complete. Device drivers often
use the I/O manager to forward I/O commands to other device drivers that share in the
implementation of a device’s interface or control.

 The PnP manager works closely with the I/O manager and a type of device driver called a bus
driver to guide the allocation of hardware resources as well as to detect and respond to the
arrival and removal of hardware devices. The PnP manager and bus drivers are responsible
for loading a device’s driver when the device is detected. When a device is added to a system
that doesn’t have an appropriate device driver, the executive Plug and Play component calls
on the device installation services of a user-mode PnP manager.

 The power manager also works closely with the I/O manager and the PnP manager to guide
the system, as well as individual device drivers, through power-state transitions.

 Windows Management Instrumentation support routines, called the Windows Driver Model
(WDM) WMI provider, allow device drivers to indirectly act as providers, using the WDM
WMI provider as an intermediary to communicate with the WMI service in user mode.

 The registry serves as a database that stores a description of basic hardware devices attached
to the system as well as driver initialization and configuration settings.

 INF files, which are designated by the .inf extension, are driver installation files. INF files are
the link between a particular hardware device and the driver that assumes primary control of
the device. They are made up of script-like instructions describing the device they correspond
to, the source and target locations of driver files, required driver-installation registry
modifications, and driver dependency information. Digital signatures that Windows uses to
verify that a driver file has passed testing by the Microsoft Windows Hardware Quality Labs
(WHQL) are stored in .cat files. Digital signatures are also used to prevent tampering of the
driver or its INF file.

 The hardware abstraction layer (HAL) insulates drivers from the specifics of the processor
and interrupt controller by providing APIs that hide differences between platforms. In
essence, the HAL is the bus driver for all the devices soldered onto the computer’s
motherboard that aren’t controlled by other drivers. (Mark Russinovich, 2008)

Figure 3.2 I/O System Components (REF :


https://www.microsoftpressstore.com/articles/article.aspx?p=2201309)

III.6.1 I/O Media

Input and Output media can be divided into wired and wireless devices, both of
these media have their own advantages and disadvantages.

1. Wired devices
A wired device is a common type of wired configuration. Most wired devices
use cables to transfer data between connected PCs or to connect input and output
devices. Wired devices can have more stable connection as it is not interrupted by
electromagnetic signal, so you can have a faster data transferred from your input
devices to your computer

Usually wired devices don’t need additional battery in the devices, because the
power that they need is supplied from the computer through a cable and straight
to the devices, such as a Mouse, Keyboard, Monitor, etc. sometimes it’s really
annoying to charge your devices or change the battery in your devices, with wired
devices, you just need to plug it on.

Most of the Gaming devices are using wired devices, because it can
delivered a faster reaction time, it does not delayed. The connection from the
devices and Computer is slightly faster compared to a wireless connection. Wired
devices really suits people that like to play games and want a better performance.

However, it also has some disadvantages. With wired devices, it is


annoying to manage your cable and sometimes it can be really messed up and
tangled. If you are travelling to somewhere and need more convenient devices, it
is better to use wireless devices.

Here are some types of USB connectors:

o Type-A: The standard flat, rectangular interface that you find on one
end of nearly every USB cable. Most computers have multiple USB-A
ports for connecting peripherals. You will find them on game consoles,
TVs, and other devices too. This cable only inserts in one way.
o Type-B: An almost square connector, mostly used for printers and
other powered devices that connect to a computer. They are not very
common these days, as most devices have moved onto a smaller
connection
o Mini-USB: A smaller connector type that was standard for mobile
devices before micro-USB. While not as common today, you will still
see these on some cameras, the PlayStation 3 controller, MP3 players,
and similar.
o Micro-USB: The current standard (though slowly declining in
popularity) for mobile and portable devices, which is even smaller than
mini-USB. While you will still find micro-USB on all sorts of
smartphones, tablets, USB battery packs, and game controllers, some
have moved onto USB-C.
o Type-C: The newest USB standard, this reversible cable promises
higher transfer rates and more power than previous USB types. It is
also capable of juggling multiple functions. You will see it on many
new laptops and smartphones, including the MacBook, Pixel phones,
and Nintendo Switch Pro Controller. We discuss USB-C more below.
o Lightning: This is not a true USB standard, but is Apple’s proprietary
connector for the iPhone, iPad, Air Pods, and more. It is a similar size
to USB-C and comes standard on Apple devices released since
September 2012. Older Apple devices use the much larger 30-pin
proprietary connector.[5]

Figure 3.3 USB ( https://www.makeuseof.com/tag/understanding-usb-cable-types-one-use/)

2. Wireless devices
Wireless devices has developed rapidly in past few decades. Wireless devices
means that you can connect from a devices to others with a wireless connection,
so you do not have to arrange the cable, you just have to connect it and it is done.

Wireless devices are really convenient and useful. In this era, many devices
have a wireless connection such as printer, mouse, keyboard, etc. It becomes
popular because it is easy to use, if you want to print, you just need to connect
your smartphone to a printer and press print.

With wireless devices, you can have a better arrangement of your devices, and
you can manage or control it easily. If you have a smart light bulb, you can
connect it to a wife and remotely configure it everywhere and anywhere as long
as you got an internet connection. This type of devices really suits people that like
to travel and do not want to mess with a long tangled cable.

However, with wireless devices, it has some disadvantages too. The price is
expensive compared to the wired ones and you have to charge it. In addition,
maybe your connection can be interrupted by an electromagnetic field, your
connection will not be as stable as the wired ones. (Abraham Silberschatz, 2004)

III.7 I/O Scheduling

Scheduling I/O requests can greatly improve overall efficiency. Priorities can also
play a part in request scheduling. For the example is the scheduling of disk accesses.
Buffering and caching can also help, and can allow for more flexible scheduling
options. On systems with many devices, separate request queues are often kept for each
device (Abraham Silberschatz, 2004)

Figure 3.4
I/O
Scheduling Diagram (https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/13_IOSystems.html )

III.8 Synchronous and Asynchronous I/O

Input and output are slow processes, which means that the system must wait
for input/output operations. How long the system must wait varies, from a few
milliseconds to save a file to hard drive to up to several minutes of waiting for a
character from the key board.

Instead of waiting for input/output operations, it may be better for a thread to


do something else. However, a thread often has to perform an input/output operation
before it can continue. For instance, if a thread uses ReadLine() to read a line of data
from the screen, the thread cannot proceed until the line is read if the thread requires
the data from the line in the further program execution.

Output goes somewhat better. If we have written (“A message”) in a thread,


the thread can proceed without waiting for the print to the screen to happen.

There are two ways for a thread to deal with input and output:
1. Synchronous I/O
2. Asynchronous I/O

Through the use of synchronous I/O, a process will wait to continue until an
input/output operation is complete, as the thread goes to sleep while waiting.
Through the use of asynchronous I/O, the process continues to run without waiting
until an input/output operation is performed. Another term for asynchronous I/O is no
wait I/O

Asynchronous I/O requires synchronization in the code of the thread. It is


possible to use a semaphore, which causes the thread to wait until it gets a signal from
driver. Using a semaphore with asynchronous I/O provides the same effect as
synchronous I/O. however, an advantage of asynchronous I/O is that the thread can
execute some other code before the thread starts to wait for the input/output operation
to finish. (Krough, 2016 )
Figure 3.5 Synchronous and asynchronous

(https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/13_IOSystems.html)

III.9 I/O File Buffering and Caching

1. File Buffering

File buffering is usually handled by the system behind the scenes and is
considered part of file caching within the Windows operating system unless
otherwise specified.

Although the terms caching and buffering are sometimes used


interchangeably, buffering specifically in the context of explaining how to
interact with data that is not being cached (buffered) by the system, where it is
otherwise largely out of the direct control of user-mode applications. (Andrew S
Tanenbaum, 2007)

2. File Caching
Caching occurs under the direction of the cache manager, which operates
continuously while Windows is running. File data in the system file cache is
written to the disk at intervals determined by the operating system, and the
memory previously used by that file data is freed—this is referred to as flushing
the cache.

The policy of delaying the writing of the data to the file and holding it in the
cache until the cache is flushed is called lazy writing, and it is triggered by the
cache manager at a determinate time interval.

The time at which a block of file data is flushed is partially based on the
amount of time it has been stored in the cache and the amount of time since the
data was last accessed in a read operation. This ensures that file data that is
frequently read will stay accessible in the system file cache for the maximum
amount of time. (Andrew S Tanenbaum, 2007)

Figure 3.6 File Cache Diagram

( https://docs.microsoft.com/en-us/windows/desktop/fileio/file-caching )

III.10 Performance

The I/O system is a major factor in overall system performance, and can place heavy
loads on other major components of the system ( Interrupt handling, process switching,
memory access, bus contention, and CPU load for device drivers just to name a few)
Interrupt handling can be relatively expensive, which causes programmed I/O to be
faster than interrupt-driven I/O when the time spent busy waiting is not excessive.
Network traffic can also put a heavy load on the system. Consider for example the
sequence of events that occur when a single character is typed in a telnet session. (Ed
Bott, 2015)

Figure 3.7 Performance

(https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/13_IOSystems.html)

III.11 I/O Completion Part

I/O completion ports provide an efficient threading model for processing multiple
asynchronous I/O requests on a multiprocessor system. When a process creates an I/O
completion port, the system creates an associated queue object for requests whose sole
purpose is to service these requests.

Processes that handle many concurrent asynchronous I/O requests can do so more
quickly and efficiently by using I/O completion ports in conjunction with a pre-
allocated thread pool than by creating threads at the time they receive an I/O request.

The CreateIoCompletionPort function creates an I/O completion port and associates


one or more file handles with that port. When an asynchronous I/O operation on one of
these file handles completes, an I/O completion packet is queued in first-in-first-out
(FIFO) order to the associated I/O completion port. One powerful use for this
mechanism is to combine the synchronization point for multiple file handles into a
single object, although there are also other useful applications. (Hart, 2015)

III.12 I/O Cancellation

While there are many ways in which IRP processing occurs and various methods to
complete an I/O request, a great many I/O processing operations actually end in cancellation
rather than completion. For example, a device may require removal while IRPs are still
active, or the user might cancel a long running operation to a device—for example, a network
operation. Another situation that requires I/O cancellation support is thread and process
termination.

When a thread exits, the I/Os associated with the thread must be cancelled. This is
because the I/O operations are no longer relevant and the thread cannot be deleted until the
outstanding I/Os have completed. The Windows I/O manager, working with drivers, must
deal with these requests efficiently and reliably to provide a smooth user experience. Drivers
manage this need by registering a cancel routine, by calling IoSetCancelRoutine, for their
cancellable I/O operations (typically, those operations that are still enqueued and not yet in
progress), which is invoked by the I/O manager to cancel an I/O operation.

When drivers fail to play their role in these scenarios, users may experience unkillable
processes, which have disappeared visually but linger and still appear in Task Manager or
Process Explorer. User-initiated I/O cancellation Most software uses one thread to handle
user interface (UI) input and one or more threads to perform work, including I/O. In some
cases, when a user wants to abort an operation that was initiated in the UI, an application
might need to cancel outstanding I/O operations.

Operations that complete quickly might not require cancellation, but for operations
that take arbitrary amounts of time—like large data transfers or network operations—
Windows provides support for cancelling both synchronous and asynchronous operations.

 Cancelling synchronous I/Os A thread can call CancelSynchronousIo. This


enables even create (open) operations to be cancelled when supported by a
device driver. Several drivers in Windows support this functionality. These
include drivers that manage network file systems (for example, MUP, DFS,
and SMB), which can cancel open operations to network paths.

Figure 3.8 Cancelling Synchronous I/O System

( https://docs.microsoft.com/en-us/windows/desktop/fileio/i-o-completion-ports )

 Cancelling asynchronous I/Os A thread can cancel its own outstanding


asynchronous I/Os by calling CancelIo. It can cancel all asynchronous I/Os
issued to a specific file handle, regardless of which thread initiated them, in
the same process with CancelIoEx. CancelIoEx also works on operations
associated with I/O completion ports through the aforementioned thread-
agnostic support in Windows. This is because the I/O system keeps track of a
completion port’s outstanding I/Os by linking them with the completion port.
(Krough, 2016 )
Figure 3.9 Cancelling Asynchronous I/O System

( https://docs.microsoft.com/en-us/windows/desktop/fileio/i-o-completion-ports )

III.13 I/O Priorities

The Windows I/O manager internally includes support for five I/O priorities, as
shown in Table 6-5, but only three of the priorities are used. (Future versions of Windows
may support High and Low.)

I/O has a default priority of Normal, and the memory manager uses Critical when it
wants to write dirty memory data out to disk under low-memory situations to make room in
RAM for other data and code. The Windows Task Scheduler sets the I/O priority for tasks
that have the default task priority to Very Low.

The priority specified by applications that perform background processing is Very


Low. All the Windows background operations, including Windows Defender scanning and
desktop search indexing, use Very Low I/O priority. Prioritization strategies Internally, the
five I/O priorities are divided into two I/O prioritization modes, called strategies.

These are the hierarchy prioritization and the idle prioritization strategies. Hierarchy
prioritization deals with all the I/O priorities except Very Low. It implements the following
strategy: All critical-priority I/O must be processed before any high-priority I/O. All high-
priority I/O must be processed before any normal-priority I/O. All normal-priority I/O must
be processed before any low-priority I/O. All low-priority I/O is processed after any higher-
priority I/O. As each application generates I/Os,

IRPs are put on different I/O queues based on their priority, and the hierarchy
strategy decides the ordering of the operations. The idle prioritization strategy, on the other
hand, uses a separate queue for non-idle priority I/O. Because the system processes all
hierarchy prioritized I/O before idle I/O, it’s possible for the I/Os in this queue to be starved,
as long as there’s even a single non-idle I/O on the system in the hierarchy priority strategy
queue. To avoid this situation, as well as to control back-off (the sending rate of I/O
transfers), the idle strategy uses a timer to monitor the queue and guarantee that at least one
I/O is processed per unit of time (typically, half a second).

Data written using non-idle I/O priority also causes the cache manager to write
modifications to disk immediately instead of doing it later and to bypass its read-ahead logic
for read operations that would otherwise preemptively read from the file being accessed. The
prioritization strategy also waits for 50 milliseconds after the completion of the last non-idle
I/O in order to issue the next idle I/O. Otherwise, idle I/Os would occur in the middle of non-
idle streams, causing costly seeks. (Mark Russinovich, 2008)

Table 3.10 IO Priorities


(https://www.microsoftpressstore.com/articles/article.aspx?p=2201309 )
CHAPTER IV

IV.1 Conclusion

The I/O system defines the model of I/O processing on Windows and performs
functions that are common to or required by more than one driver. Its chief responsibilities
are to create IRPs representing I/O requests and to shepherd the packets through various
drivers, returning results to the caller when an I/O is complete.

The I/O manager locates various drivers and devices by using I/O system objects,
including driver and device objects. Internally, the Windows I/O system operates
asynchronously to achieve high performance and provides both synchronous and
asynchronous I/O capabilities to user-mode applications. Device drivers include not only
traditional hardware device drivers but also file-system, network, and layered filter drivers.
All drivers have a common structure and communicate with each other and the I/O manager
by using common mechanisms.

The I/O system interfaces allow drivers to be written in a high-level language to


lessen development time and to enhance their portability. Because drivers present a common
structure to the operating system, they can be layered one on top of another to achieve
modularity and reduce duplication between drivers. By using the Universal DDI baseline,
drivers can target multiple devices and form factors with no code changes. Finally, the role of
the PnP manager is to work with device drivers to dynamically detect hardware devices and
to build an internal device tree that guides hardware device enumeration and driver
installation.

The power manager works with device drivers to move devices into low-power states
when applicable to conserve energy and prolong battery life.

IV.2 Suggestion
Hopefully after read that and understanding it, a reader can choose the input and
output system according to their individual needs
Input and output system can be improves more in the Operating System. Wired and
wireless connector can be improved to be faster and more better, the process of input and
output in the main system or processor is pretty good. But, we think it can be improve more,
like the capeable input output devices to the main system

BIBLIOGRAPHY
Abraham Silberschatz, G. G. (2004). Operating System Concepts. WIley, india : Wiley
Edition.

Andrew S Tanenbaum, H. B. (2007). Modern Operating Systems. Amsterdam, Belanda :


Chegg Study .

Andrew S. Tanenbaum, Herbert Bos. (2014). Modern Operating System. English: Pearson.

BitcrazedMicrosoft. (2018). Input and Output Methods. About Character Mode Applications,
https://docs.microsoft.com/en-us/windows/console/input-and-output-methods.

Casserly, M. (2018). How to access BIOS in Windows 10. Tech Advisor,


techadvisor.co.uk/how-to-/windows/how-access-bios-in-windows-10-3681505/.

Ed Bott, C. S. (2015). Windows 10 inside out . English: Person education.

Hart, J. M. (2015). Windows System Programming (3rd Edition). English : Addison-Wesley


Professional.

Krough, E. (2016 ). An Introduction Windows Operating System . English : Bookboon.

Mark E. Russinovich, A. I. (2012). Understanding the Windows I/O System.


https://www.microsoftpressstore.com/articles/article.aspx?p=2201309.

Mark Russinovich, D. S. (2008). Windows Internal . United States : MIcrosoft Press .

Rouse, M. (2014). Definition Basic Input Output System. BIOS,


https://whatis.techtarget.com/definition/BIOS-basic-input-output-system.

tipskominfo. (2017). sejarah singkat windows 10. sejarah singkat windows 10,
tipskominfo.blogspot.com.

You might also like