operating system ppt

27
I/O system K.KAVIYA(14BIT008) SUBMITTED TO: Ms.R.MADHUBALA, MCA.,

Upload: kaviya-kumaresan

Post on 12-Apr-2017

50 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Operating system ppt

I/O system K.KAVIYA(14BIT008) SUBMITTED TO: Ms.R.MADHUBALA, MCA.,

Page 2: Operating system ppt

MASS STORAGE STRUCTUREThis file system can be viewed logically consist of following parts: Disk structure Disk scheduling Disk Management Swap-space Management

Page 3: Operating system ppt

Disk structure Disk provide the bulk of secondary storage Magnetic tape was used an early secondary storage medium Modern disk drives are addressed as large one-dimensional arrays of logical blocks The logical blocks is the smallest unit of tranfer. The one-dimensional array of logical blocks is mapped onto the sectors of the disk sequentially. It is difficult to perform two reasons Most disks have some defective sectors. The number of sectors per track is not a constant on some drives.

Page 4: Operating system ppt

Disk scheduling The disk drives has fast access time and disk bandwidth The access time has two major components. Seek time Rotational latency The disk bandwidth is the total number of byes transferred, divided by the total time between the first request for service and the completion of the last transfer. The request specifies several pieces of informationI. Whether this operation is input or outputII. What the disk address for the transfer isIII. What the memory address for the transfer isIV. What the number of bytes to the transferred is

Page 5: Operating system ppt

FCFS Scheduling The simplest form of disk scheduling is the first

come, first-served(FCFS) algorithm. The algorithm does not provide the fastest

services.

SSTF Scheduling It seems reasonable to service all the requests close to the current head position, before moving the head far away to service. The assumption is the basis for the shortest- seek-time-first algorithm The SSTF algorithm selects the request with the minimum seek time from the current head position

Page 6: Operating system ppt

SCAN Scheduling In the scan algorithm the disk arm starts at one end of the disk, and moves toward the other end. The direction of head movement is reversed, and servicing continues. The scan algorithm is sometimes called the elevator algorithm

C- SCAN scheduling Circular scan scheduling is a variant of SCAN designed to provide a more wait time The C-SCAN scheduling algorithm treats the cylinders as a circular list that wraps around from the final cylinder to the first one.

Page 7: Operating system ppt

Selection of a disk-scheduling algorithm• The scheduling algorithms described the seek distances for modern disks, the rotational latencyCan be nearly as large as the average seek time. • But it is difficult for the operating system to scheduled for improved rotational latency because modern disks do not disclose the physical location of logical blocks.

Page 8: Operating system ppt

Disk ManagementDisk Formatting• A new magnetic disk is a blank slate.• It must be divided into sectors that the disk controller can read and write. This process is called Low level formatting• A sector number and an error-correcting code.• The operating system still needs to record its own data structures.• In two steps• The first step is two partition the disk into one or more groups of cylinders • The second step is logical formatting.• In this step the operating system stores the initial file system data structures into the disk

Page 9: Operating system ppt

Boot Block The bootstrap is stored in read only memory The full bootstrap program is stored in a partition called the boot blocks, at a fixed location on the disk. A disk that has a boot partition is called a boot disk or system disk.

Bad blocks Most frequently, one or more sectors become defective. Most disks even come form the factory with bad blocks This scheme is known as sector sparing or forwarding

Page 10: Operating system ppt

Swap-Space Management Swap-space management is another low-level task of the operating system The main goal for the design and implementation of swap space is to provide the best throughput for the Virtual memory system

Swap-space use Swap space is used in various ways by different operating systems, depending on the implemented memory-managementAlgorithms.

Swap-space Location A swap space can reside in two places. Swap space can be carved out of the normal file system or it can be in a seperated disk partition.

Page 11: Operating system ppt

• Swap space is allocated to a process when the process is started. The space is set aside to hold the program known as the text pages or the text segment, and the data segment Two per-process swap maps are used by the kernal to track swap-space use. The text segment is a fixed size so its swap space is allocated in 512 KB chunks except for the final chunk.

Page 12: Operating system ppt

Windows 2000 Windows 2000 Operating system is a 32-bit preemptive multitasking operating system for Intel pentium and later microprocessor. In 1980 Microsoft and IBM cooperated to develop the OS/2 operating system in single processor Intel 80286 Microsoft developed a portable operating system that supported both the application system. There are four versions of windows 2000 The professional version intended for desktop use. The other three are server version datacenter version.

Page 13: Operating system ppt

Design principles The design goals that Micros0ft has stated for windows 2000 include Extensibility, portability, compatibility, performance. Extensibility refers to the capacity of the operating system to keep up advances in computing technology Windows 2000 uses a client-server model. Mach operating system and supports multiple processing by remoter procedure call(RPC). An operating system is portable and it can be moved from one hardware architecture to another.

Page 14: Operating system ppt

System components The architecture of windows 2000 is a layered system of modules. The user-mode subsystems are in two categories environment subsystems emulate different operating systems;the subsystems provide security functions. One of the chief advantages of the architecture is the intreactions between modules can be kept simple remainder of this section describes these layers and subsytems.

Page 15: Operating system ppt

Hardware-Abstraction layer HAL is the layer of software that hides hardware differences from the operating system,virtual-machine interface that is used by the kernel,the exculive and device drivers. One advantage of this approach is that only a single of each device driver is needed-it can run on all hardware flatform will porting the driver code.

Page 16: Operating system ppt

Kernel The kernal of windows 2000 provides the fundation for the executive and subsystems. kernal uses to sets of objects. The first set comparises the dispatcher. Dispatcher objects control dispatching and synchoronous the event object is used to record an event occurances. Synchronize the later with some action A semaphore objects acts as a counter or gate to control the number that access some resource. The thread object is the entity that is run kernal and is associated with a process object.

Page 17: Operating system ppt

Timer objects are used to keep track of the time and and to signal time outs when operations and need to be interrupted The second set of kernal objects comparises the control objects. The power states object to check whether the power a process object represents the virtual address space and control. The system uses the profile object to measure the amount of time used by a amount of code

Page 18: Operating system ppt

Threads and scheduling Windows 2000 uses the process and threads for executable code . Each process has one or more threads. Each thread has its own state. It includes a priority, processor, affinity, and accounting information. The six possible thread states or ready, stand by , running, waiting, and terminated.

Page 19: Operating system ppt

Ready means waiting to run. The highest priority thread is moved to the standby state. A thread is running when it is executing on a processor A thread is in the waiting state when it is waiting for a signal A new thread is in the transition state while it is waiting resourcs necessary for execlution A thread enters the terminated state finishes execution

Page 20: Operating system ppt

Exception and interrupts Kernal also provides trap handling for exceptions and interrupts that are used by hardware or software windows 2000 defines several architecture exceptions including memory-access violation integer overflow or underflow, integer divide by zero, floating-point by zero , illegal instruction , data misalignment, privileged instruction, read error , guard-page, violation, paging files, quote exceeded, debugger, point and debugger, single step. The exeption dispatcher creates and exception that contains the reason for the exception and finds an exception handler deal with it.

Page 21: Operating system ppt

The kernal uses an interrupted dispatch table to bind each interrupt that a service routine Windows 2000 takes advantage of this property to software interrupts to perform system functions kernal uses the dispatch interrupt to control thread context switching to the kernal is running. It queues a deferred procedure call(DPC) that contains the address of the function to be executed and generates interrupt. They cannot modify its memory: create, acquire, or wait on objects, call system services or page faults.

Page 22: Operating system ppt

Low level processor synchronization Third reponsibility of the kernal is to provide low-level processor synchronization. The APC mechanism is similar to the DPC algorithm but was most use. The APC mechanism enables threads to set up a procedure call that happen out of the blue at some future time. windows 2000 can run on symmetric multiprocessor machines, so the kernal must prevent two of its threads from modifying a shared data structure in same time.

Page 23: Operating system ppt

Recovery after a power failure The fourth and final responsibility of the kernal is to provide recovery after a failure A power fail interrupt which has the second-highest priority notifies the operating system whenever a power loss is detected. The power notify object provides a way for a device driver to register a routine that is call on power restoration and ensures that devices get set to the proper and recovery

Page 24: Operating system ppt

Executive

Object manager Virtual- Memory Manager process manager Local-procedure-call facility I/O manager Security reference monitor Plug-and-play manager

Page 25: Operating system ppt

Environmental subsystemMS-DOS subsystem16-bit Windows Environment Win32 Environment POSIX subsystem OS/2 subsystem Logon and security subsystem

Page 26: Operating system ppt

File system• Internal layout• Recovery• Security• Volume Management andFault Tolerance• Compression• Reparse Points

Page 27: Operating system ppt

Networking Windows 2000 supports both peer-to-peer and client server networking. The networking components provide data transport, interprocess communication file sharing across a network, and the ability to send print jobs to remote printers.

Protocols Distributed processing Mechanisms