* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Week 2 _Operating system File
Mobile operating system wikipedia , lookup
Burroughs MCP wikipedia , lookup
Berkeley Software Distribution wikipedia , lookup
Library (computing) wikipedia , lookup
Plan 9 from Bell Labs wikipedia , lookup
Process management (computing) wikipedia , lookup
Copland (operating system) wikipedia , lookup
Unix security wikipedia , lookup
Security-focused operating system wikipedia , lookup
Distributed operating system wikipedia , lookup
OPERATING SYSTEM CONCEPTS AND PRACTISE SYSTEM PROGRAMS System programs provide a convenient environment for program development and execution. They are divided into several categories : File management : These programs create, delete, copy, rename, print, dump, list, and generally manipulate files and directories Status information : Some system ask for time , memory space and related status information while others are complex. These programs format and print the output to the terminal. Some systems support registry. File modification: There are several text editors available to create and modify the contents of files. Programming-language support : Compilers, assemblers, debuggers and interpreters for common programming languages provided to user with the operating system. Program loading and execution : Once a program is assembled or compiled, it must be loaded into memory to be executed Communications : These programs provide the mechanism for creating virtual connections among processes, users, and computer systems. Most operating systems are supplied with programs that are useful in solving common problems or performing common operations. Such programs include web browsers, word processors and text formatters, spreadsheets known as system utilities or system programs OPERATING SYSTEM STRUCTURE The operating system is a complex structure and must be properly designed. A common approach is to partition the task into small components rather than have one monolithic system. We must know how the components are interconnected. Simple Structure Some systems do not have a well defined structures such operating systems started as small and then grew beyond scope. MS-Dos is an example of such a system which was designed by few people and grew popular. It was written to provide the most functionality in least space so it was not divided carefully. MS-DOS LAYER STRUCTURE In MS-DOS, the interfaces and levels of functionality are not well separated. Application programs are able to access the basic I/O routines to write directly to the display and disk drives well separated. When user program fails the entire system crashes UNIX is another system that initially was limited by hardware functionality. It consists of two separable parts: the kernel and the system programs. The kernel is further separated into a series of interfaces The kernel provides the file system, CPU scheduling, memory management, and other operating-system functions through system calls. This monolithic structure was difficult to implement and maintain. LAYERED STRUCTURE With proper hardware support, operating systems can be broken into pieces and that are smaller systems. The operating system can then retain much greater control over the computer. Implementers have more freedom in changing the inner workings of the system and in creating modular operating systems In top down approach the overall functionalities are determined A system can be made modular in many ways. One method is the layered approach, in which the operating system is broken up into a number of layers. The bottom layer (layer 0) is the hardware; the highest (layer N) is the user interface. LAYERED OPERATING SYSTEM An layered O.S is implementation of abstract object made up of data and the operations that can manipulate data. Layer M—consists of data structures and a set of routines that can be invoked by higher-level layers. Further Layer M consists of data structures and a set of routines invoked by higher level structures. ADVANTAGES OF LAYERED APPROACH Simplicity of construction and debugging. The layers are selected so that each uses functions and services of only lower-level layers. The first layer can be debugged without any concern for the rest of the system. If an error is found during the debugging of a particular layer, the error must be on that layer. DRAWBACK OF LAYERED APPROACH It involves defining various layers. The layered approach is less efficient than the other approaches. While executing a system call each layer adds overhead to the system call. MICROKERNEL In the mid-1980s, researchers at Carnegie Mellon University developed an operating system called Mach that modularized the kernel using the microkernel approach. It structures operating system by removing all nonessential components from the kernel . It implements them as system and user-level programs. This process results into a small kernel Main function of Microkernel is provide a communication facility between the client program and the various services that are also running in user space Communication is provided by message passing One benefit of the microkernel approach is ease of extending the operating system. All new services are added to user space and consequently do not require modification of the kernel. The microkernel provides more security and reliability If a service fails the other parts of operating system remains untouched. Operating system that uses microkernel approach are: Tru64 UNIX provides a UNIX interface to the user, but it is implemented with a Mach kernel. QNX is a real-time operating system that provides services for message passing and process scheduling MODULES The best current methodology for operatingsystem design involves using object-oriented programming techniques. This technique creates a modular kernel The kernel has a set of core components and dynamically links. This type of strategy uses dynamically loadable modules and is common in modern implementation of UNIX Solaris Modular Approach The structure is organized around a core kernel with seven types of loadable kernel modules: Loadable system calls Scheduling classes File systems Executable formats STREAMS modules Miscellaneous Device and bus drivers Allows the kernel to provide core services Each core component is separate. Each talks to the others over known interfaces. The Apple Macintosh Mac OS X operating system uses a hybrid structure. VIRTUAL MACHINES A virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardware. A virtual machine provides an interface identical to the underlying bare hardware. The operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory (a) Non virtual machine (b) virtual machine The virtual-machine concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines. Suitable for research and development. System development is done on the virtual machine, instead of on a physical machine and so does not disrupt normal system operation. The virtual machine concept is difficult to implement due to the effort required to provide an exact duplicate to the underlying machine BENEFITS Each virtual machine is completely isolated from all other virtual machines. Two approaches to provide sharing have been implemented System programmers are given their own virtual machine System development is done on the virtual machine instead of on a physical machine. EXAMPLES OF VIRTUAL MACHINE VMware Architecture It is a popular commercial application that abstracts Intel 80X86 hardware into isolated virtual machines. • It runs as an application on a host operating system such as Windows or Linux. • It allows this host system to concurrently run several different guest operating systems as independent virtual machines. JAVA VIRTUAL MACHINE Java is a popular object-oriented programming language. Java also provides a specification for a Java virtual machine—or JVM. Java program consists of one or more classes. For each Java class, the compiler produces an architecture-neutral byte code output (.class) file that will run on any implementation of the JVM. JAVA VIRTUAL MACHINE The JVM is a specification for an abstract computer, it consists of a class loader and a Java interpreter that executes the architecture-neutral byte code. The class loader loads the compiled . Class files. The verifier checks that the . class file is valid Java byte code. It automatically manages memory by performing garbage collection. It can be implemented on top of host operating systems or as a part of web browser. In hardware on a chip specifically designed to run Java programs. If the JVM is implemented in software, the Java interpreter interprets the byte code operations one at a time. SYSTEM BOOT Operating system must be made available to hardware so hardware can start it Small piece of code – bootstrap loader, locates the kernel, loads it into memory, and starts it Sometimes two-step process where boot block at fixed location loads bootstrap loader When power initialized on system, execution starts at a fixed memory location Firmware used to hold initial boot code OPERATING SYSTEM GENERATION Operating systems are designed to run on any of a class of machines; the system must be configured for each specific computer site. SYSGEN program obtains information concerning the specific configuration of the hardware system. Booting – starting a computer by loading the kernel. Bootstrap program – code stored in ROM that is able to locate the kernel, load it into memory, and start its execution.