SlideShare una empresa de Scribd logo
1 de 30
I/O System and
Case Study
By
Prakash.G
14BIT035
 One of the important jobs of an Operating System is to
manage various I/O devices including mouse, keyboards,
touch pad, disk drives, display adapters, USB devices,
Bit-mapped screen, LED, Analog-to-digital converter,
On/off switch, network connections, audio I/O, printers
etc.
 An I/O system is required to take an application I/O
request and send it to the physical device, then take
whatever response comes back from the device and send
it to the application. I/O devices can be divided into two
categories −
 Block devices − A block device is one with which the
driver communicates by sending entire blocks of data.
For example, Hard disks, USB cameras, Disk-On-Key
etc.
 Character devices − A character device is one with
which the driver communicates by sending and receiving
single characters (bytes, octets). For example, serial
ports, parallel ports, sounds cards etc
Device Controllers:
 Device drivers are software modules that can be plugged into an OS to
handle a particular device. Operating System takes help from device drivers
to handle all I/O devices.
 The Device Controller works like an interface between a device and a
device driver. I/O units (Keyboard, mouse, printer, etc.) typically consist of
a mechanical component and an electronic component where electronic
component is called the device controller.
 There is always a device controller and a device driver for each device to
communicate with the Operating Systems. A device controller may be able
to handle multiple devices. As an interface its main task is to convert serial
bit stream to block of bytes, perform error correction as necessary.
 Any device connected to the computer is connected by a plug and socket,
and the socket is connected to a device controller. Following is a model for
connecting the CPU, memory, controllers, and I/O devices where CPU and
device controllers all use a common bus for communication.
Diagram:
 Synchronous vs asynchronous I/O
Synchronous I/O − In this scheme CPU execution waits while I/O proceeds
Asynchronous I/O − I/O proceeds concurrently with CPU execution
 Communication to I/O Devices:
The CPU must have a way to pass information to and from an I/O device.
There are three approaches available to communicate with the CPU and Device.
Special Instruction I/O
Memory-mapped I/O
Direct memory access (DMA)
Special Instruction I/O:
This uses CPU instructions that are specifically made for controlling I/O devices. These
instructions typically allow data to be sent to an I/O device or read from an I/O
device.
Memory-mapped I/O
 When using memory-mapped I/O, the same address space is shared by memory and I/O devices. The device is connected
directly to certain main memory locations so that I/O device can transfer block of data to/from memory without going
through CPU.
 While using memory mapped IO, OS allocates buffer in memory and informs I/O device to use that buffer to send data to
the CPU. I/O device operates asynchronously with CPU, interrupts CPU when finished.
 The advantage to this method is that every instruction which can access memory can be used to manipulate an I/O
device. Memory mapped IO is used for most high-speed I/O devices like disks, communication interfaces.
Direct Memory Access (DMA)
 Slow devices like keyboards will generate an interrupt to the main CPU
after each byte is transferred. If a fast device such as a disk generated an
interrupt for each byte, the operating system would spend most of its time
handling these interrupts. So a typical computer uses direct memory access
(DMA) hardware to reduce this overhead.
 Direct Memory Access (DMA) means CPU grants I/O module authority to
read from or write to memory without involvement. DMA module itself
controls exchange of data between main memory and the I/O device. CPU
is only involved at the beginning and end of the transfer and interrupted
only after entire block has been transferred.
 Direct Memory Access needs a special hardware called DMA controller
(DMAC) that manages the data transfers and arbitrates access to the system
bus. The controllers are programmed with source and destination pointers
(where to read/write the data), counters to track the number of transferred
bytes, and settings, which includes I/O and memory types, interrupts and
states for the CPU cycles.
Diagram:
Polling vs Interrupts I/O
 A computer must have a way of detecting the arrival of any type of
input. There are two ways that this can happen, known
as polling and interrupts. Both of these techniques allow the
processor to deal with events that can happen at any time and that
are not related to the process it is currently running.
 Polling I/O:
 Polling is the simplest way for an I/O device to
communicate with the processor the processor. The process of
periodically checking status of the device to see if it is time for the
next I/O operation, is called polling.
 The I/O device simply puts the information in a Status
register, and the processor must come and get the information.
Interrupts I/O
 An alternative scheme for dealing with I/O is the
interrupt-driven method. An interrupt is a signal to the
microprocessor from a device that requires attention.
 A device controller puts an interrupt signal on the bus
when it needs CPU’s attention when CPU receives an
interrupt, It saves its current state and invokes the
appropriate interrupt handler using the interrupt vector
(addresses of OS routines to handle various events).
When the interrupting device has been dealt with, the
CPU continues with its original task as if it had never
been interrupted.
Case Study Operating Systems: Windows
Features of Modern os
 To facilitate easy,
efficient, fair, orderly,
and secure use of
resources
 Provide a user
interface
 Organize files on disk
 Allocating resource to
different users with
security control
 Co-ordinate programs
to work with devices
and other programs
Beginning of Windows
 In 1988, Microsoft decided to develop a “new technology”
(NT) portable operating system that supported both the OS/2
and POSIX APIs
 Originally, NT was supposed to use the OS/2 API as its native
environment but during development NT was changed to use
the Win32 API, reflecting the popularity of Windows 3.0.
Advantages of windows
 Advantages over Windows
– It's almost free to relatively inexpensive
– Source code is included
– Bugs are fixed quickly and help is readily
available through the vast support in
Internet
– Linux is more stable than Windows
– Linux is truly multi-user and multi-
tasking
– multiuser: OS that can simultaneously
serve a number of users
– multitasking: OS that can
simultaneously execute a number of
programs
– Linux runs on equipment that other
operating systems consider too
underpowered, e.g. 386 systems, PDA,
etc
 Microsoft has made several
advancements and changes
that have made it a much
easier to use Operating
System, and although
arguably it may not be the
easiest Operating System
 Because of the large
amount of Microsoft
Windows users, there is a
much larger selection of
available software
programs, utilities, and
games for Windows.
Disadvantages of windows
Disadvantages of windows
 Although Microsoft Windows has made great improvements in
reliability over the last few versions of Windows, it still cannot
match the reliability ofLinux.
 to viruses and other attacks. Although Microsoft has made
great improvements over the years with security on their
Operating System,
their Operating System continues to be the most vulnerable
Windows system Architecture
File management in windows
 File management in windows can be done through Windows explorer or My Computer. Windows
Explorer displays the hierarchical list of files, folders, and storage drives (both fixed and removable) on
your computer. It also lists any network drives that have been mapped to as a drive letters on your
computer. Windows Explorer can be used to copy, move, rename, and search for files and folders. For
example, to copy a file, you can open a folder that contains the desired file to be copied or moved, and
then just drag and drop the file to target folder or drive. Contents
 1 Using Windows Explorer
 2 Opening drives and folders
 3 View file details
 4 Copying and moving files using Explorer
 5 Create a new folder
 6 Rename a file or folder
 7 Delete a file or folder

When files or folders are deleted from hard disk, Windows places them in the Recycle Bin, from where
they can be retrieved, until the Recycle Bin is made empty. Files or folders deleted from a
 File Management in Windows
 removable storage media such as network drive are permanently deleted and are not sent to the Recycle
Bin.
States of process management
 Running: A process will be in either
running(current process in system)or
ready to run(waiting to be assigned to
system cpu)
 Waiting:The process is waiting for a
resource or event. Interputable waiting
process can be interputable by signals
but are waiting directly on hardware
conditions and cannot be interpated
States of process management (contd)
 Stopped:The process can be stopped usually by receiving a
signal. A process that is being debugged can be in a stopped
state
 Zombie:This is a halted process which for some reason still has
task_struct data structure in task vector.It is like a dead process
Process management in windows
 A process contains its own independent virtual address space
with both code and data, protected from other processes. Each
process, in turn, contains one or more independently executing
threads. A thread running within a process can execute
application code, create new threads, create new independent
processes, and manage communication and synchronization
among the threads.
 By creating and managing processes, applications can have
multiple, concurrent tasks processing files, performing
computations, or communicating with other networked
systems. It is even possible to improve application
performance by exploiting multiple CPU processors
States of process management
 Ready:May be scheduled for execution. The microkernel dispatcher keeps
track of all ready threads and schedules them in priority order.
 Standby:A standby thread has been selected to run next on a particular
processor. The thread waits in this state until that processor is made
available. If the standby thread's priority is high enough, the running thread
on that processor may be preempted in favor of the standby thread.
Otherwise, the standby thread waits until the running thread blocks
orexhausts its time slice.
 Running:Once the microkernel performs a thread or process switch, the
standby thread enters the running state and begins execution and continues
execution until it is preempted, exhausts its time slice, blocks, or terminates.
In the first two cases, it goes back to the ready state
Process management Windows
Address Types in physical Memeory
 The following is a list of address types used in Linux.
 User virtual addresses:These are the regular addresses seen by user-space programs. User addresses
are either 32 or 64 bits in length, depending on the underlying hardware architecture, and each
process has its own virtual address space.
 Physical addresses:The addresses used between the processor and the system's memory. Physical
addresses are 32- or 64-bit quantities; even 32-bit systems can use larger physical addresses in some
situations.
 Bus addresses:The addresses used between peripheral buses and memory. Often, they are the same
as the physical addresses used by the processor, but that is not necessarily the case. Some
architectures can provide an I/O memory management unit (IOMMU) that remaps addresses
between a bus and main memory. An IOMMU can make life easier in a number of ways (making a
buffer scattered in memory appear contiguous to the device, for example), but programming the
IOMMU is an extra step that must be performed when setting up DMA operations. Bus addresses
are highly architecture dependent, of course.
Address Types in physical Memeory
 Kernel logical addresses: These make up the normal address space of the kernel. These
addresses map some portion (perhaps all) of main memory and are often treated as if
they were physical addresses. On most architectures, logical addresses and their
associated physical addresses differ only by a constant offset. Logical addresses use the
hardware's native pointer size and, therefore, may be unable to address all of physical
memory on heavily equipped 32-bit systems. Logical addresses are usually stored in
variables of type unsigned long or void *. Memory returned from kmalloc has a kernel
logical address.
 Kernel virtual addresses: Kernel virtual addresses are similar to logical addresses in that
they are a mapping from a kernel-space address to a physical address. Kernel virtual
addresses do not necessarily have the linear, one-to-one mapping to physical addresses
that characterize the logical address space, however. All logical addresses are kernel
virtual addresses, but many kernel virtual addresses are not logical addresses. For
example, memory allocated by vmalloc has a virtual address (but no direct physical
mapping). The kmap function (described later in this chapter) also returns virtual
addresses. Virtual addresses are usually stored in pointer variables.
Memory management in WIndows
 Each process on 32-bit Microsoft Windows has its own virtual address space that enables addressing up
to 4 gigabytes of memory. Each process on 64-bit Windows has a virtual address space of 8 terabytes.
All threads of a process can access its virtual address space. However, threads cannot access memory
that belongs to another process, which protects a process from being corrupted by another proces
 Virtual Address Space
 Memory Pools
 Memory Performance Information
 Virtual Memory Functions
 Heap Functions
 File Mapping
 Large Memory Support
 Global and Local Functions
 Standard C Library Functions
 Comparing Memory Allocation Methods
Memory management in windows
User Interface of Windows
 The Windows 9x user interface (9x
refers to Windows 95 and Windows 98
together) is characterised by a bar at the
bottom of your screen (it may be moved
to another edge by left-mouse-clicking
on it and dragging it to the desired edge
while continuing to hold down the
mouse button).
User Interface in windows
 This bar is called the "taskbar." It includes:
 The "Start menu" (which contains shortcuts to applications
stored on your hard drive)
 The list of open windows on your desktop (the Windows
desktop is the entire portion of the screen located above the
taskbar, where shortcuts to applications may be placed in the
form of icons)
 Icons representing shortcuts to programs loaded in the
computer memory, and which can be configured
User Interface in windows
 It includes the following shortcuts:
 Shut down: To shut down or restart a computer, or restart it in MS-DOS mode
 Run: Run a program using a command line (like in DOS). Arguments can be added to
an application (for example, in "dir /s", "/s" is an argument)
 Help: Windows online help
 Find: Lets you search for a file on the hard drive, or for another computer if you are on
a network
 Settings: This is the computer's "control center", where display, hardware, and software
settings can be configured.
 Programs: This contains links to your favorite programs. It can be modified by going to
Settings/Taskbar and Start menu, then clicking on Start menu
 The menu can include other shortcuts, too, such as: Documents: List of the most
recently opened documents
 Favorites: Lets you sort your favorite shortcuts, whether on the Internet or your hard
drive
 etc.
User Interface between windows

Más contenido relacionado

La actualidad más candente

SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded SystemsSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded SystemsArti Parab Academics
 
Basic MIPS implementation
Basic MIPS implementationBasic MIPS implementation
Basic MIPS implementationkavitha2009
 
Embedded System
Embedded SystemEmbedded System
Embedded Systemsureskal
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systemsRAMPRAKASHT1
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's modelv Kalairajan
 
Memory Organisation in embedded systems
Memory Organisation in embedded systemsMemory Organisation in embedded systems
Memory Organisation in embedded systemsUthraSowrirajan1
 
Introduction to Firmware
Introduction to FirmwareIntroduction to Firmware
Introduction to FirmwareCaroline Murphy
 
CPU and its components
CPU and its componentsCPU and its components
CPU and its componentssamina khan
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded SystemZakaria Gomaa
 
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSINTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSJOLLUSUDARSHANREDDY
 
Process management os concept
Process management os conceptProcess management os concept
Process management os conceptpriyadeosarkar91
 

La actualidad más candente (20)

SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded SystemsSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Introduction to Embedded Systems
 
Basic MIPS implementation
Basic MIPS implementationBasic MIPS implementation
Basic MIPS implementation
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systems
 
Memory management
Memory managementMemory management
Memory management
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
Memory Organisation in embedded systems
Memory Organisation in embedded systemsMemory Organisation in embedded systems
Memory Organisation in embedded systems
 
Memory management
Memory managementMemory management
Memory management
 
Introduction to Firmware
Introduction to FirmwareIntroduction to Firmware
Introduction to Firmware
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
CPU and its components
CPU and its componentsCPU and its components
CPU and its components
 
RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSINTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
 
Generation of os
Generation of osGeneration of os
Generation of os
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 

Similar a Operating System Case Study and I/O System

IO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREIO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREHariharan Anand
 
cental processing unit and all its components
cental processing unit and all its componentscental processing unit and all its components
cental processing unit and all its componentsssuserf86fba
 
introduce computer .pptx
introduce computer .pptxintroduce computer .pptx
introduce computer .pptxSHUJEHASSAN
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptKirti Verma
 
computer science and enginnering fundamental organisation.pptx
computer science and enginnering fundamental organisation.pptxcomputer science and enginnering fundamental organisation.pptx
computer science and enginnering fundamental organisation.pptxPannaBushratul
 
Computer system, devices and peripherals
Computer system, devices and peripheralsComputer system, devices and peripherals
Computer system, devices and peripheralsAllan Roloma
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computerNoor Zada
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating SystemSoumit Ghosh
 
Operating system notes ch1
Operating system notes ch1Operating system notes ch1
Operating system notes ch1Emmanuel Damka
 
Computer Programming.pdf
Computer Programming.pdfComputer Programming.pdf
Computer Programming.pdfLegesseSamuel
 
Introduction to Computer System-ppt.pptx
Introduction to Computer System-ppt.pptxIntroduction to Computer System-ppt.pptx
Introduction to Computer System-ppt.pptxInfofarazMotivativeA
 
Introduction to Computer MBA SEM I - Copy (4).ppt
Introduction to Computer MBA SEM I - Copy (4).pptIntroduction to Computer MBA SEM I - Copy (4).ppt
Introduction to Computer MBA SEM I - Copy (4).pptShivamSaini553956
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptxSalarAzam1
 

Similar a Operating System Case Study and I/O System (20)

IO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREIO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTURE
 
Unit 6
Unit 6Unit 6
Unit 6
 
cental processing unit and all its components
cental processing unit and all its componentscental processing unit and all its components
cental processing unit and all its components
 
introduce computer .pptx
introduce computer .pptxintroduce computer .pptx
introduce computer .pptx
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
 
computer science and enginnering fundamental organisation.pptx
computer science and enginnering fundamental organisation.pptxcomputer science and enginnering fundamental organisation.pptx
computer science and enginnering fundamental organisation.pptx
 
Computer system, devices and peripherals
Computer system, devices and peripheralsComputer system, devices and peripherals
Computer system, devices and peripherals
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computer
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1 q&a
 
Operating system notes ch1
Operating system notes ch1Operating system notes ch1
Operating system notes ch1
 
Operating system
Operating systemOperating system
Operating system
 
Ch1
Ch1Ch1
Ch1
 
Ch1
Ch1Ch1
Ch1
 
Computer Programming.pdf
Computer Programming.pdfComputer Programming.pdf
Computer Programming.pdf
 
Introduction to Computer System-ppt.pptx
Introduction to Computer System-ppt.pptxIntroduction to Computer System-ppt.pptx
Introduction to Computer System-ppt.pptx
 
Introduction to Computer MBA SEM I - Copy (4).ppt
Introduction to Computer MBA SEM I - Copy (4).pptIntroduction to Computer MBA SEM I - Copy (4).ppt
Introduction to Computer MBA SEM I - Copy (4).ppt
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computers
 
Introduction to computers i
Introduction to computers iIntroduction to computers i
Introduction to computers i
 

Último

在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信oopacde
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证wpkuukw
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证tufbav
 
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURELANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHUREF2081syahirahliyana
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证wpkuukw
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证ehyxf
 
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammamahmedjiabur940
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...samsungultra782445
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证tufbav
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一uodye
 
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证ehyxf
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahatimeghakumariji156
 
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptxCRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptxRishabh332761
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证ehyxf
 
Hilti's Latest Battery - Hire Depot.pptx
Hilti's Latest Battery - Hire Depot.pptxHilti's Latest Battery - Hire Depot.pptx
Hilti's Latest Battery - Hire Depot.pptxhiredepot6
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 

Último (20)

在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
在线办理(scu毕业证)南十字星大学毕业证电子版学位证书注册证明信
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURELANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
 
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
 
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
 
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptxCRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
 
Critical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptxCritical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptx
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
 
Hilti's Latest Battery - Hire Depot.pptx
Hilti's Latest Battery - Hire Depot.pptxHilti's Latest Battery - Hire Depot.pptx
Hilti's Latest Battery - Hire Depot.pptx
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
 

Operating System Case Study and I/O System

  • 1. I/O System and Case Study By Prakash.G 14BIT035
  • 2.  One of the important jobs of an Operating System is to manage various I/O devices including mouse, keyboards, touch pad, disk drives, display adapters, USB devices, Bit-mapped screen, LED, Analog-to-digital converter, On/off switch, network connections, audio I/O, printers etc.  An I/O system is required to take an application I/O request and send it to the physical device, then take whatever response comes back from the device and send it to the application. I/O devices can be divided into two categories −  Block devices − A block device is one with which the driver communicates by sending entire blocks of data. For example, Hard disks, USB cameras, Disk-On-Key etc.  Character devices − A character device is one with which the driver communicates by sending and receiving single characters (bytes, octets). For example, serial ports, parallel ports, sounds cards etc
  • 3. Device Controllers:  Device drivers are software modules that can be plugged into an OS to handle a particular device. Operating System takes help from device drivers to handle all I/O devices.  The Device Controller works like an interface between a device and a device driver. I/O units (Keyboard, mouse, printer, etc.) typically consist of a mechanical component and an electronic component where electronic component is called the device controller.  There is always a device controller and a device driver for each device to communicate with the Operating Systems. A device controller may be able to handle multiple devices. As an interface its main task is to convert serial bit stream to block of bytes, perform error correction as necessary.  Any device connected to the computer is connected by a plug and socket, and the socket is connected to a device controller. Following is a model for connecting the CPU, memory, controllers, and I/O devices where CPU and device controllers all use a common bus for communication.
  • 5.  Synchronous vs asynchronous I/O Synchronous I/O − In this scheme CPU execution waits while I/O proceeds Asynchronous I/O − I/O proceeds concurrently with CPU execution  Communication to I/O Devices: The CPU must have a way to pass information to and from an I/O device. There are three approaches available to communicate with the CPU and Device. Special Instruction I/O Memory-mapped I/O Direct memory access (DMA) Special Instruction I/O: This uses CPU instructions that are specifically made for controlling I/O devices. These instructions typically allow data to be sent to an I/O device or read from an I/O device.
  • 6. Memory-mapped I/O  When using memory-mapped I/O, the same address space is shared by memory and I/O devices. The device is connected directly to certain main memory locations so that I/O device can transfer block of data to/from memory without going through CPU.  While using memory mapped IO, OS allocates buffer in memory and informs I/O device to use that buffer to send data to the CPU. I/O device operates asynchronously with CPU, interrupts CPU when finished.  The advantage to this method is that every instruction which can access memory can be used to manipulate an I/O device. Memory mapped IO is used for most high-speed I/O devices like disks, communication interfaces.
  • 7. Direct Memory Access (DMA)  Slow devices like keyboards will generate an interrupt to the main CPU after each byte is transferred. If a fast device such as a disk generated an interrupt for each byte, the operating system would spend most of its time handling these interrupts. So a typical computer uses direct memory access (DMA) hardware to reduce this overhead.  Direct Memory Access (DMA) means CPU grants I/O module authority to read from or write to memory without involvement. DMA module itself controls exchange of data between main memory and the I/O device. CPU is only involved at the beginning and end of the transfer and interrupted only after entire block has been transferred.  Direct Memory Access needs a special hardware called DMA controller (DMAC) that manages the data transfers and arbitrates access to the system bus. The controllers are programmed with source and destination pointers (where to read/write the data), counters to track the number of transferred bytes, and settings, which includes I/O and memory types, interrupts and states for the CPU cycles.
  • 9. Polling vs Interrupts I/O  A computer must have a way of detecting the arrival of any type of input. There are two ways that this can happen, known as polling and interrupts. Both of these techniques allow the processor to deal with events that can happen at any time and that are not related to the process it is currently running.  Polling I/O:  Polling is the simplest way for an I/O device to communicate with the processor the processor. The process of periodically checking status of the device to see if it is time for the next I/O operation, is called polling.  The I/O device simply puts the information in a Status register, and the processor must come and get the information.
  • 10. Interrupts I/O  An alternative scheme for dealing with I/O is the interrupt-driven method. An interrupt is a signal to the microprocessor from a device that requires attention.  A device controller puts an interrupt signal on the bus when it needs CPU’s attention when CPU receives an interrupt, It saves its current state and invokes the appropriate interrupt handler using the interrupt vector (addresses of OS routines to handle various events). When the interrupting device has been dealt with, the CPU continues with its original task as if it had never been interrupted.
  • 11. Case Study Operating Systems: Windows
  • 12. Features of Modern os  To facilitate easy, efficient, fair, orderly, and secure use of resources  Provide a user interface  Organize files on disk  Allocating resource to different users with security control  Co-ordinate programs to work with devices and other programs
  • 13. Beginning of Windows  In 1988, Microsoft decided to develop a “new technology” (NT) portable operating system that supported both the OS/2 and POSIX APIs  Originally, NT was supposed to use the OS/2 API as its native environment but during development NT was changed to use the Win32 API, reflecting the popularity of Windows 3.0.
  • 14. Advantages of windows  Advantages over Windows – It's almost free to relatively inexpensive – Source code is included – Bugs are fixed quickly and help is readily available through the vast support in Internet – Linux is more stable than Windows – Linux is truly multi-user and multi- tasking – multiuser: OS that can simultaneously serve a number of users – multitasking: OS that can simultaneously execute a number of programs – Linux runs on equipment that other operating systems consider too underpowered, e.g. 386 systems, PDA, etc  Microsoft has made several advancements and changes that have made it a much easier to use Operating System, and although arguably it may not be the easiest Operating System  Because of the large amount of Microsoft Windows users, there is a much larger selection of available software programs, utilities, and games for Windows.
  • 15. Disadvantages of windows Disadvantages of windows  Although Microsoft Windows has made great improvements in reliability over the last few versions of Windows, it still cannot match the reliability ofLinux.  to viruses and other attacks. Although Microsoft has made great improvements over the years with security on their Operating System, their Operating System continues to be the most vulnerable
  • 17. File management in windows  File management in windows can be done through Windows explorer or My Computer. Windows Explorer displays the hierarchical list of files, folders, and storage drives (both fixed and removable) on your computer. It also lists any network drives that have been mapped to as a drive letters on your computer. Windows Explorer can be used to copy, move, rename, and search for files and folders. For example, to copy a file, you can open a folder that contains the desired file to be copied or moved, and then just drag and drop the file to target folder or drive. Contents  1 Using Windows Explorer  2 Opening drives and folders  3 View file details  4 Copying and moving files using Explorer  5 Create a new folder  6 Rename a file or folder  7 Delete a file or folder  When files or folders are deleted from hard disk, Windows places them in the Recycle Bin, from where they can be retrieved, until the Recycle Bin is made empty. Files or folders deleted from a  File Management in Windows  removable storage media such as network drive are permanently deleted and are not sent to the Recycle Bin.
  • 18. States of process management  Running: A process will be in either running(current process in system)or ready to run(waiting to be assigned to system cpu)  Waiting:The process is waiting for a resource or event. Interputable waiting process can be interputable by signals but are waiting directly on hardware conditions and cannot be interpated
  • 19. States of process management (contd)  Stopped:The process can be stopped usually by receiving a signal. A process that is being debugged can be in a stopped state  Zombie:This is a halted process which for some reason still has task_struct data structure in task vector.It is like a dead process
  • 20. Process management in windows  A process contains its own independent virtual address space with both code and data, protected from other processes. Each process, in turn, contains one or more independently executing threads. A thread running within a process can execute application code, create new threads, create new independent processes, and manage communication and synchronization among the threads.  By creating and managing processes, applications can have multiple, concurrent tasks processing files, performing computations, or communicating with other networked systems. It is even possible to improve application performance by exploiting multiple CPU processors
  • 21. States of process management  Ready:May be scheduled for execution. The microkernel dispatcher keeps track of all ready threads and schedules them in priority order.  Standby:A standby thread has been selected to run next on a particular processor. The thread waits in this state until that processor is made available. If the standby thread's priority is high enough, the running thread on that processor may be preempted in favor of the standby thread. Otherwise, the standby thread waits until the running thread blocks orexhausts its time slice.  Running:Once the microkernel performs a thread or process switch, the standby thread enters the running state and begins execution and continues execution until it is preempted, exhausts its time slice, blocks, or terminates. In the first two cases, it goes back to the ready state
  • 23. Address Types in physical Memeory  The following is a list of address types used in Linux.  User virtual addresses:These are the regular addresses seen by user-space programs. User addresses are either 32 or 64 bits in length, depending on the underlying hardware architecture, and each process has its own virtual address space.  Physical addresses:The addresses used between the processor and the system's memory. Physical addresses are 32- or 64-bit quantities; even 32-bit systems can use larger physical addresses in some situations.  Bus addresses:The addresses used between peripheral buses and memory. Often, they are the same as the physical addresses used by the processor, but that is not necessarily the case. Some architectures can provide an I/O memory management unit (IOMMU) that remaps addresses between a bus and main memory. An IOMMU can make life easier in a number of ways (making a buffer scattered in memory appear contiguous to the device, for example), but programming the IOMMU is an extra step that must be performed when setting up DMA operations. Bus addresses are highly architecture dependent, of course.
  • 24. Address Types in physical Memeory  Kernel logical addresses: These make up the normal address space of the kernel. These addresses map some portion (perhaps all) of main memory and are often treated as if they were physical addresses. On most architectures, logical addresses and their associated physical addresses differ only by a constant offset. Logical addresses use the hardware's native pointer size and, therefore, may be unable to address all of physical memory on heavily equipped 32-bit systems. Logical addresses are usually stored in variables of type unsigned long or void *. Memory returned from kmalloc has a kernel logical address.  Kernel virtual addresses: Kernel virtual addresses are similar to logical addresses in that they are a mapping from a kernel-space address to a physical address. Kernel virtual addresses do not necessarily have the linear, one-to-one mapping to physical addresses that characterize the logical address space, however. All logical addresses are kernel virtual addresses, but many kernel virtual addresses are not logical addresses. For example, memory allocated by vmalloc has a virtual address (but no direct physical mapping). The kmap function (described later in this chapter) also returns virtual addresses. Virtual addresses are usually stored in pointer variables.
  • 25. Memory management in WIndows  Each process on 32-bit Microsoft Windows has its own virtual address space that enables addressing up to 4 gigabytes of memory. Each process on 64-bit Windows has a virtual address space of 8 terabytes. All threads of a process can access its virtual address space. However, threads cannot access memory that belongs to another process, which protects a process from being corrupted by another proces  Virtual Address Space  Memory Pools  Memory Performance Information  Virtual Memory Functions  Heap Functions  File Mapping  Large Memory Support  Global and Local Functions  Standard C Library Functions  Comparing Memory Allocation Methods
  • 27. User Interface of Windows  The Windows 9x user interface (9x refers to Windows 95 and Windows 98 together) is characterised by a bar at the bottom of your screen (it may be moved to another edge by left-mouse-clicking on it and dragging it to the desired edge while continuing to hold down the mouse button).
  • 28. User Interface in windows  This bar is called the "taskbar." It includes:  The "Start menu" (which contains shortcuts to applications stored on your hard drive)  The list of open windows on your desktop (the Windows desktop is the entire portion of the screen located above the taskbar, where shortcuts to applications may be placed in the form of icons)  Icons representing shortcuts to programs loaded in the computer memory, and which can be configured
  • 29. User Interface in windows  It includes the following shortcuts:  Shut down: To shut down or restart a computer, or restart it in MS-DOS mode  Run: Run a program using a command line (like in DOS). Arguments can be added to an application (for example, in "dir /s", "/s" is an argument)  Help: Windows online help  Find: Lets you search for a file on the hard drive, or for another computer if you are on a network  Settings: This is the computer's "control center", where display, hardware, and software settings can be configured.  Programs: This contains links to your favorite programs. It can be modified by going to Settings/Taskbar and Start menu, then clicking on Start menu  The menu can include other shortcuts, too, such as: Documents: List of the most recently opened documents  Favorites: Lets you sort your favorite shortcuts, whether on the Internet or your hard drive  etc.