 Hello everyone, today we are going to discuss on the topic input output and file management. Let us see the learning outcome of this topic. At the end of this session, students will be able to understand the PC bus structure of IO management and overview of the management in operating system. Now look at this diagram, it is an introduction of input output PC bus structure. Here we are having multiple different types of input and output devices which are getting connected with the main processor who is a main system. Here I have drawn one block diagram a typical PC bus structure. So here I have tried to show you that how the different devices are getting connected. Now this is my main processor okay and the CPU and this processor is having the cache memory connected. Obviously because processor will store its required and frequently required data or instruction. In this particular cache memory and with this particular main memory it will be having one control unit and that is the bridge okay. Memory controller and this particular data which will be coming to the memory may be coming from some IO devices okay that is why it is known as PCI bus or it is also known as IO bus okay. The full form of PCI bus is peripheral component interconnect. This PCI bus can also be called as the IO bus because it is dedicated to have or to establish a communication between the system and the IO devices. This is my monitor on which the display will take place so it is getting connected with the PC okay. A PCI bus through controller known as display or graphics controller. Here we are having the SCSI controller. The full form of SCSI is a small computer system interface and with this particular SCSI controller high speed hard disk are connected. So this particular SCSI controller will provide SCSI bus and with this SCI bus the disk will remain connected. We are having another kind of disk it is the ID disk controller integrated device electronics. So with this particular ID disk controller we are having multiple number of disks connected okay. With the local dedicated disk buses we have we are having this expansion bus interface. So where we can have more ports and with the help of the ports we can connect other peripheral devices. So like keyboard and it can be mainly categorized in ports into different head. One is the parallel port and one is the serial port which is shown in the diagram. So this is the normal IO PC bus structures what we have having in our computer system. Next we are talking about the file management. What is the file management is? It is the process of manipulating files in computer system okay. Management includes the process of creating, modifying and deleting the files okay. So there are three types of files. One is ordinary files, directories and special files okay. And in standard mix file, regular directory, symbolic link, PIFO special, block special, character special and socket which is defined by the POSIX personal operating system interchange okay. Now talking about file organization what is a file organization? It is the way the data is stored in a file okay. It determines the method of access, efficiency, flexibility and storage devices to use. There are four methods of organizing files on a storage media. One is sequential read bytes one at a time in order. Second random records are stored randomly but accessed directly. Serial records are entered in the order of their creation. Indexed or sequential file system contains an index to a particular field of each record in a file. File directories, file directories what it is a collection of files which contains the information about files including attributes, location and ownership okay. The information contained in the device directories are name first one is only information kept in human readable form okay. Identifier non-human readable unique tag usually it is a number. Then type which is needed for system that support different types. Then location pointer to file location on device size current file size. Protection controls who can do reading writing and executing time date and user identification that is data for protection, security and usage. Monitoring file organizations are create, write, read, repository within okay. File, file seek, delete, truncate, open, search the directory structure on disk for entry FI and move the content of entry into the memory and close move the content of entry in memory to directory structure on the disk. File operations, what are the different file operations we carried out in the operating system? First one is a create, second one is a write, third one is a read, reposition within the file that is file seek, delete, truncate, open file that is search the directory structure on the disk for entry file and move the content of the entry to the memory, close move the content of the entry in memory to the directory structure on disk. What are the different file types in the OS? OS recognizes and supports file types, helps prevent user mistakes, convenient by automatically doing various jobs after a command. It must define every file types that is allowed and difficult to create new file types, commonly implemented by using an extension name and create attribute used to identify the file type and invoke the creator application program internal file structure can be indicated by file types. So two components are common to file names, one is related to file name, second extension called suffix in the unix, a complete file name identified a file's absolute file name being the long name that includes path information, restrictions on file name with each operating system that is MS-DOS which allows names from 1 to 8 alpha memory characteristic but without spaces most modern operating system do not have restrictions on file names. An extension usually two or three characteristics long and is separated by a period that is dot operator and the purpose is to identify the file type or its contents. What are the different access methods? One is sequential access and another direct access and indexed access. In sequential access it is easiest, the file searched from its beginning until record is found. In direct access method only on direct access storage devices records identified by their relative address to the beginning of the file and in indexed access combine the best of sequential and direct access. What are the direct access methods? Records identified by logical address them relative to the beginning of the file. User identifies a field in the record format and designates it as the key field because it uniquely identifies the each record. Given to the file manager which takes the necessary steps to translate the logical address into physical address that is called a cylinder surface and record numbers preserving the file organization. Next talking about the file sharing, file sharing is very important of files on multi-user system is desirable which are the sharing may be done through protection scheme and on distributed system files may be shared across a network. Network file system is a common distributed file sharing method which is really used in the operating system in case of file sharing is exist. Basic file management system calls yes of course in operating system we are using system call is a way for program to interact with the operating system when the program makes a system call at that time it makes a request to the operating system's kernel. There are five different categories of system calls are there. One is process control, second file management, third device management, fourth information management, fifth communication here we will discuss about the system calls only for file management in the Unix operating system. So system calls for the file management there are four system calls for the file management. One is open, read, write and close. These are the related to the system calls for file management. What is open is open system call is used to know the file descriptor of user created files. Since read and write use file descriptor as their first parameter know the file descriptor open system call is used. Syntax fd is equal to fd is equal to open file o create and o rdwr 0777. File name is the name of the file, mode is used to define the file opening mode such as create, read and write mode, permission is used to define the file permission and return value function returns the file descriptor. Next is a read system call. Read system call is used to read the content from the file. It can also be used to read the input from the keyboard by specifying the file as a descriptor. What is the syntax length is equal to read file descriptor buffer max length. Example n is equal to read 0 comma buffer 50. Here file descriptor is the file descriptor of the file. Buffer is the name of the buffer where data is to be stored. Max length is a number of specifying the maximum amount of that data can be read. And return value if successful read returns the number of bytes actually read. Write system call it is used to write the content to the file. What is the syntax is write fd, hello world and 12. Here file descriptor is the file descriptor of the file. Buffer is the name of the buffer to be stored. Length is the length of the data to be written. Return value if successful write returns the number of bytes actually read. Close system call is used to close the open file. It tells the operating system that you are doing with the file and close the file. Syntax integer close integer fd where fd is the file descriptor of the file to be closed. Return value if the file closed successfully it returns 0 as it returns minus 1. Now after studying all these things related to the IO management. The question you have to answer this question. The question is input or port hardware contains dash. Options are a, bus, b, controller, c, IO port and its registers, d all of the mentioned. What is the answer is all of the mentioned here. Next question dash refers to the logical structure of the records. One is physical organization, b logical organization, structure organization and d is the file organization. The answer is d file organization refers to the logical structure of the records. So this topic is very important for the conceptual point of view regarding IO management. These are the references where I have taken points. Thank you.