REWRITE THIS PAPAER

profileiken305
Final-Rewrite.docx

1) Describe programmed, interrupt driven, and direct memory access. Provide an example of an I/O device for each access method.

In programmed I/O devices, the CPU has direct control over I/O. It refers to data transfers initiated by a CPU under driver software control to access memory on the device. The programmed I/O system was the simple type of I/O technique for the exchange of data or any type of communication between the processor and the external devices. The CPU issues a command then waits for I/O operations to be completed. As the CPU is faster than the I/O module, the problem with programmed I/O is that the CPU has to wait a long time for the I/O module to be ready to transmit data. The CPU must constantly check the status of the I/O module while waiting, and this process is known as Polling. The level of the performance of the entire system is relentlessly worsened as a result. Data is exchanged between the processor and I/O module. The overall operation of the programmed I/O can be summarized as follows:

1. The processor executes a program and encounters an instruction relating to the I/O operation.

2. The processor then executes that instruction by issuing a command to the applicable I/O module.

3. The I/O module will perform the requested action based on the I/O command issued by the processor and set the correct bits in the I/O status register.

4. The processor will regularly check the status of the I/O module until it finds that the operation is complete.

Interrupt driven is an I/O module that calls for the CPU when needed. The CPU issues commands to the I/O module, then proceeds with its normal work until interrupted by the I/O device on completion of its work. For input, the device interrupts the CPU when new data has arrived and is ready to be recovered by the system processor. The real actions to perform will depend on whether the device uses I/O ports or memory mapping. For output, the device delivers an interrupt, either when it is ready to accept new data or to acknowledge a successful data transfer. Memory mapped and DMA capable devices produce interrupts to tell the system they are done with the buffer. Although an interrupt driven module releases the CPU from having to wait for the devices, it is still inefficient in data transfers of large amounts due to the CPU having to transfer the data word by word between the I/O module and memory.

Direct Memory Access (DMA) is provided by some computer bus architectures that allows data to be sent directly from a disk drive to the memory on the computer's motherboard. The microprocessor is freed from involvement with the data transfer, hence speeding up the overall computer operation. A specified portion of memory is selected as an area to be used for DMA. In the ISA bus standard, up to 16 megabytes of memory can be addressed for DMA. The EISA and Micro Channel Architecture standards allow access to the full range of memory addresses. An alternative to DMA is the Programmed I/O interface in which all data transmitted between devices goes through the processor. A DMA channel enables a device to transfer data without exposing the CPU to a work overload. With DMA, the CPU can process other tasks while data transfer is being performed. DMA channels are slower than later data transfer methods.

Describe the functional components of an operating system, including kernels, modules, application program interfaces, and other services

The operating system is the core software component of a computer. It performs many functions and is an interface between the computer and the outside world. In the section about hardware, a computer is described as consisting of several component parts including your monitor, keyboard, mouse, and other parts. The operating system provides an interface to these parts using drivers for each component. The components of an operating system are process management, memory management, networking, file management, security, interrupt, and I/O.

Process management is tasked with managing the many processes that are running on the operating system. Software programs each have one or more processes associated with them when they are running. The operating system also has many processes associated with it, each performing a different function. All of these processes are managed by process management, which keeps processes in order, running efficiently, using memory allocated to them, and shutting them down when necessary.

Memory management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disks during execution. Memory management keeps track of each and every memory location, regardless of whether it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It also tracks whenever some memory gets freed or unallocated and it updates the status, respectively.

Networking is defined as a group of two or more computer systems linked together. There are many types of computer networks.

File management manages anything to do with computer files. When a file is created, file management is involved in the creation of the file, including where it is stored on a storage device. When a file is modified, file management helps with the modification of the file. If a file is deleted, file management is there to help with deleting the file and freeing up the space for another file to be stored there at a later time. File management also handles tasks related to the creation, modification, and deletion of folders, or directories, on a storage device.

Security refers to techniques for ensuring that data stored in a computer cannot be read or compromised by any individuals without proper authorization. Most computer security measures involve data encryption and passwords. Data encryption is the translation of data into a form that is meaningless without a deciphering mechanism. A password is a secret word or phrase that gives a user access to a particular program or system.

Interrupts are central to operating systems because they provide an efficient way for the operating system to interact with and react to its environment. It provides a computer with a way of automatically saving local register contexts, and running specific code in response to events. When an interrupt is received, the computer's hardware automatically suspends whatever program is currently running, saves its status, and runs computer code previously associated with the interrupt; this is analogous to placing a bookmark in a book in response to a phone call. In modern operating systems, interrupts are handled by the operating system's kernel. Interrupts may come from either the computer's hardware or the running program.

An I/O system is required to take an application’s 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.

Kernel is the central module of an operating system (OS). It is the part of the operating system that loads first, and it stays in main memory. It is important for the kernel to be as small as possible while still providing all the essential services required by other parts of the operating system and applications. The kernel code is loaded into a protected area of memory to prevent it from being overwritten by programs or other parts of the operating system. The kernel is responsible for memory management, process and task management, and disk management. The kernel connects the system hardware to the application software. Every operating system has a kernel.

Module is a part of a program in software. Programs are composed of one or more independently developed modules that are not joined together until the program is linked. A single module can contain one or several routines. A module is a self-contained component in hardware.

Application Program Interface (API) is a set of routines, protocols, and tools for building software applications. An API specifies how software components should interact, and are used when programming graphical user interface (GUI) components. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together. There are many different types of APIs such as Google Maps API and YouTube API for operating systems, applications or websites.

Differentiate between the logical and the physical views of file systems.

The physical view is how the actual data is stored on the system with a description of how data is to be accessible or received from a program. They contain only one record format. It uses a portion of memory. It also contains the original data. Records in database files can be external or program-described. A physical file can have a keyed sequence access path. This means that data is presented to a program in a sequence based on one or more key fields in the file. The physical size of a file is dictated by the minimum number of whole clusters a file needs. It can survive without a logical file. Logical view is how end users view data. A logical file is a view or representation of one or more physical files. It does not occupy any memory space. It does not contain any data. It loads itself at run time as per the defined access path. It contains more than one format and is referred to as many format logical files and up to 32 records formats. It cannot exist without a physical file. If there is a logical file for a physical file, the logical file can be erased without deleting the physical file. If your program processes a logical file which contains more than one record format, you can use a read by record format to set the format you wish to use.

Describe the functions and purposes of the file directory.

A directory is an organizational unit used to organize folders and files into a hierarchical structure. Directories contain information about files that are under them in the hierarchy. Directories are found in a hierarchical file system, such as Linux, MS-DOS, OS/2, and Unix. A directory is a named group of associated files that are separated by the naming convention from other groups of files. A user can change the contents of a file without changing its name

or change the name without changing the contents. An individual name in a directory identifies a single file. The same two files may have the same name in different directories, but not in the same directory. Directories provide access to entire files, which can be the similarity tables in a relational database.

Categorize various file protection systems, and provide a few examples from current operating systems.

The file system protection level effects the overall computer security due to the nature of sharing data between processes, people, and computers. It is important to protect data from unwanted access. A proper file system protection is needed to defend computers from most viruses because malware saves its code within the computer file system and prevents accidental deletion of data. Protection method is a way to prevent accidental or intentional misuse of a system. There are three features to protection method, which are: authentication, authorization and access enforcement. In the authentication feature, it is imperative to identify a principle behind each action, and it is usually done with passwords. An alternate form of authentication is a badge or key. In the authorization feature, it will be determined which principals are allowed to perform which actions. In the access enforcement feature, it will be a combination of authentication and authorization to enforce and control access. Any flaws can concede the entire protection method features.

Physical file protection is provided by turning a switch, moving a lever or covering a notch on the storage medium. Writing is forbidden when the software directs the computer to do so. Logical file protection is provided by the operating system. A protection system directs whether a given action performed by a given subject on a given object should be allowed. This allows both read/write and read only files to be stored on the same disk. Files can be hidden, which makes them invisible to most software programs as well as when users search the files.

Describe CPU scheduling; how it works and why we need it.

CPU scheduling is the act of selecting the next process for the CPU to service once the current process leaves the CPU idle stage. CPU idles due to I/O. An idle CPU is a wasted CPU. CPU scheduling is used to improve its efficiency. It is used to allocate resources among competing processes. Max CPU utilization is obtained with different programming. Many programs have a characteristic CPU-I/O burst cycle and alternating phases of CPU activity and I/O inactivity. CPU programs processes tend to perform lots of computation and do little I/O and it tends to have a few long CPU bursts. I/O programs processes tend perform lots of IO operations, and eac I/O operation is followed by a short CPU burst to process the IO, then more IO happens. The storage structure for the ready queue and the algorithm used to select the next process are not a FIFO queue. CPU scheduling decisions takes places under by the following:

1. A process switches from running to waiting state.

2. A process switches from running to ready state.

3. A process switches from waiting to ready state.

4. A processes switches from running to terminated state.

For #1 and #4, there is no choice. A new process must be chosen. The system is said to be non-cooperative. Once a process starts running, it keeps running until it finishes. Otherwise the system is said to be preemptive. Windows used non-preemptive scheduling up to Windows 3.x, and started using pre-emptive scheduling with Win95. Macs used non-preemptive prior to OSX, and pre-emptive since then. For #2 and #3, there is a choice to continue running the current process or select a different one. A scheduler will normally like to switch the CPU to another process when one process does I/O due to I/O will take a long time to finish processing.