




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Operating System Book cum accurate notes for study operating system subject in computer science engineering
Typology: Study notes
1 / 130
This page cannot be seen from the preview
Don't miss anything!
Hello,students, it is your first class and I will introduce you to the basic concepts of an operating system -
- You will understand what is an operating system. - Why should you learn Operating System.
To understand an Operating Systems ,you need to know what is an Operating System
An Operating System is system software which may be viewed as an organized collection of software consisting of procedures for operating a computer and providing an environment for execution of programs. It acts as an interface between users and the hardware of a computer system.
Now ,I will explain you the main purpose of an Operating System
- Convenience : transform the raw hardware into a machine that is more amiable to users. - Efficiency : manage the resources of the overall computer system
Operating system can also be defined as:
Colloquially, the term is most often used to mean all the software which “comes with” a computer system before any applications are installed.
Examples of operating systems
Let us discuss the fundamental goal of a Computer System
The fundamental goal of computer system is to solve user problems. Accordingly to achieve this goal has been designed. Since hardware alone cannot be used to solve the user problems software’s are developed. These programs required certain common operations. The common operations for controlling and allocating resources are then brought together into one piece of software i.e. operating system. An operating system may process its tasks sequentially or concurrently. It means that the resources of the computer system may be dedicated to a single program until its
completion or they may be allocated among several programs in different stages of execution. Why should you need an Operating System? The feature of operating system is to execute multiple programs in interleaved fashion or different time cycle is called multiple programming systems. Some of the important reasons why do you need an Operating System are as follows:
UNIT 1 LESSON-
300 | yyyy <— SW to handle interrupt type 1
.. .. ..
HW support: for each interrupt type (e.g. clock interrupt, IO completion, change to supervisor state, invalid instruction) the HW changes to program counter to a “prewired” memory address (in the above example, 100 for interrupt type 0, 101 for interrupt type 1, etc.) This results in the specific code to handle that interrupt being executed.
Examples:
Well, for one thing, this allows things the same machine code to be used in machines that don’t have quite the same instruction sets (say, across a product line from cheap slow processors to expensive fast processors). (Homework: explain how this might be done.)
Once the hardware supports this, then I/O can be handled much more efficiently. It is also used for security. If some instructions are privileged, then if a “normal” process attempts to execute them, the OS (through interrupt code) can validate what is happening.
The point has been to do things FAST. So that things are only checked when they need to be. This requires a combination of HW and SW support.
Memory Protection:
1. Base register: contents of base register are automatically added (by HW) to each address. Not done by SW since this would be too slow. Main Memory 0 +——————+ | | To switch from J1 to J3, OS changes | OS | base register contents of 10000 to | | 60000. 10000 +——————+ | | | J1 | This simplifies much system software. | | For example, compilers can now “pretend” 40000 +——————+ that all code is loaded starting at | J2 | addr 0.
2. Limit register: make sure user does not reference beyond allocation memory size. Load limit register with size of memory allocated to process. HW traps (that is causes an interrupt) if the process attempts to use an address larger than limit register contents. Note: this is NOT checked in software (much too slow). It must be done in hardware as a side effect of addressing memory SO THAT NOTHING SLOWS MEMORY REFERENCES DOWN. THE SAME GOES FOR THE USE OF THE BASE REGISTER. If memory references are validated, the mechanism must be very fast. How does the OS get around this? Two basic approaches:
Reference Books:
Author Dahmke, Mark.
Main Title Microcomputer Operating Systems / Mark Dahmke.
Publisher Peterborough, N.H : Mcgraw-Hill/Byte Books, C1982.
Author Deitel, Harvey M., 1945-
Main Title An Introduction To Operating Systems / Harvey M. Deitel.
Edition Rev. 1st Ed.
Publisher Reading, Mass : Addison-Wesley Pub. Co., C1984.
Author Lister, A. (Andrew), 1945-
Main Title Fundamentals Of Operating Systems / A.M. Lister.
Edition 3rd Ed.
Publisher London : Macmillan, 1984.
Author Gray, N. A. B. (Neil A. B.)
Main Title Introduction To Computer Systems / N.A.B. Gray.
Publisher Englewood Cliffs, New Jersey ; Sydney : Prentice-Hall,
Author Peterson, James L.
Main Title Operating System Concepts / James L. Peterson, Abraham Silberschatz.
Edition 2nd Ed.
Publisher Reading, Mass. : Addison-Wesley, 1985.
Author Stallings, William.
Main Title Operating Systems / William Stallings.
Edition 6th Ed.
Publisher Englewood Cliffs, Nj : Prentice Hall, C1995.
Author Tanenbaum, Andrew S., 1944-
Main Title Operating Systems : Design And Implementation / Andrew S. Tanenbaum, Albert S. Woodhull.
Edition 2nd Ed.
Publisher Upper Saddle River, Nj : Prentice Hall, C1997.
Author Nutt, Gary J.
Main Title Operating Systems : A Modern Perspective / Gary J. Nutt.
Publisher Reading, Mass. : Addison-Wesley, C1997.
Author Silberschatz, Abraham.
Main Title Operating System Concepts / Abraham Silberschatz, Peter Baer Galvin.
Edition 6th Ed.
Publisher Reading, Mass. : Addison Wesley Longman, C1998.
Notes
The second problem has been overcomes over the years through the technological improvement resulted in faster I/O devices. But CPU speed increased even faster. Therefore, the need was to increase the throughput and resource utilization by overlapping I/O and processing operations. Dedicated I/O processors, peripheral controllers brought a major development.
The development of Direct Memory Access(DMA) chip Was a major achievement, which directly transfer the entire block of data from its own memory buffer to main memory without intervention of CPU .DMA can transfer data between high speed I/O devices and main memory ,while the CPU is executing. CPU requires to be interrupted per block only by DMA. Apart from DMA, there are other two approaches to improve system performance by overlapping input/output and processing. These are:
Now ,I will explain you the situation –“,what happens if the CPU is fast”?
Spooling allows CPU to overlap the input of one job with the computation and output of other jobs. Even in a simple system, the spooler may be reading the input of one job while printing the output of a different job. Compared to buffering approach spooling is better. Multi-Programming Buffering and spooling improve system performance by overlapping the input, output and computation of a single job, but both of them have limitations. A single user cannot always keep CPU or I/O devices busy at all times. Multiprogramming offers a more efficient approach to increase system performance. It refers to a computer system’s ability to support more than one process (program) at the same time. Multiprocessing operating systems enable several programs to nm concurrently. This is a kind of parallel processing. More number of programs competing for system resources which lead to better utilization of system resources. The idea is implemented as follows. The main memory of a system contains more than on program as shown in the figure.
Multiprogramming The operating system picks one of the programs and start executing. During execution process program 1 may need some I/
O operation to complete. In a sequential Execution environment, the CPU would sit idle. In a Multiprogramming system, operating system will simply switch over the next program. When that program needs to wait for some I/O operation, it switches over to program 3 and so OIL if there is no other new program left in the main memory, the CPU will pass its control back to the previous programs.
Compared to operating system which supports only sequential execution, multiprogramming system requires some form of CPU and memory management strategies.
With each new generation of operating systems, you are introduced to new ways of thinking about how our computers work. To simplify things for the user, you must deploy a consistent interface in which they can do their work. It is equally important to extend this consistency to programmers, so they too can benefit. As an operating system ages, it gradually becomes burdened with a plethora of interfaces which break the simplicity of its original architecture. UNIX originally followed the “everything is a file” mantra, only to lose sight of that design with numerous task- specific APIs for transferring files (FTP, HTTP, RCP, etc.), graphics (X11, svgalib), printers (lp, lpr), etc. Plan 9, introduced in 1989, and demonstrated how even a GUI can be represented as a set of files, revitalizing the “everything is a file” idea.
Let us discuss the Types of an Operating System
1. Batch Operating System:
As discussed earlier during batch processing environment it requires grouping of similar jobs which consist of programs, data and system commands.
The suitability of this type of processing is in programs with large computation time with no need of user interaction/involvement. Some examples of such programs include payroll, forecasting, statistical analysis and large scientific number crunching programs., Users are not required to wait while the job is being processed. They can submit their programs to operators and return later to collect them.
But it has two major disadvantages:
Non-interactive environment: There are some difficulties with a batch system from the point of view of programmer or user. Batch operating systems allow little or no interaction between users and executing programs. The turn around time taken between job submission and job completion in batch operating system is very high. Users have no control over intermediate results of a program. This type, of arrangement does not create flexibility in software development.
The second disadvantage with this approach is that programs must be debugged which means a programmer cannot correct bugs the moment it occurs.
Process scheduling (i.e. allocation strategy for a process to a processor), memory management file management and I/O management in batch processing are quite simple.
Jobs are typically processed in the order of submission, that is, in the first come, first served basis.
Memory is usually divided into two areas. One of them is permanently fixed for containing operating system routines and the other part contains only user programs to be executed; when one Program is over, the new program is loaded into the same area. Since there is only one Program in the execution at a time, there is no competition for 110 devices, therefore, allocation and de- allocation for 1/0 devices is very trivial. Access to files is also serial and there is hardly a need of Protection and file access control mechanism.
2. Multiprogramming Operating System : Multiprogramming operating systems compared to batch operating systems are fairly sophisticated. As illustrated in figure 5, multiprogramming has a significant potential for improving system throughput and resource utilization with very minor differences. Different forms of multiprogramming operating system are multitasking, multiprocessor and multi-user operating systems. In this section, we will briefly discuss the main features and functions of these systems. Multitasking Operating Systems: A running state of a program is called a process or a task. A multitasking operating system (also called multiprocessing operating system) supports two or more active processes simultaneously. Multiprogramming operating system is operating system which, in addition to supporting multiple concurrent process (several processes in execution states simultaneously) allows the instruction and data from two or more separate processes to reside in primary memory simultaneously. Note that multiprogramming implies multiprocessing or multitasking operation, but multiprocessing operation (or multitasking) does not imply multiprogramming. Therefore, multitasking operation is one of the mechanism that multiprogramming operating system employs in managing the totality of computer related resources like CPU, memory and I/O devices. The simplest form of multitasking is called serial multitasking or context switching. This is nothing more than stopping one temporarily to work on another. If you have used sidekick, then you have used serial multitasking. While a program is running, you decide that you want to use the calculator, so you pop it and use it. When you stop using the calculator, the Program continues running. Multiuser operating system allow simultaneous access to a computer system through or more terminals. Although frequently associated with multiprogramming, multiuser operating system does, not imply multiprogramming or multitasking. A dedicated transaction processing system such as railway reservation system that hundreds of terminals under control of a single program is an example of multiuser operating system. On the other hand, general purpose time sharing systems (discussed later in this section) incorporate features of both multiuser and multiprogramming operating system. Multiprocess operation without multiuser support can be found in the operating system of some advanced personnel computers and in real systems (discussed later). Time Sharing System:
As we said earlier, the key issue that distinguishes a network operating system from a distributed one is how aware the users are of the fact that multiple machines are being used. This visibility occurs in three primary areas; file system, protection and program execution.
File System: The important issue in file system is related to how a file is placed (accessed) on one system from another in a network. ‘Mere are two important approaches to this problem.
Running a special file transfer program: When connecting two or more systems together, the first issue that must be faced is how to access the rile system available on some other system. To deal with this issue user runs a special file transfer program that copies the needed remote file to the local machine, where they can then be accessed normally. Sometimes remote printing and mail is also handled this way. One of the best known examples of network that primarily support file transfer and mail via special programs is the UNIX’s UUCP (user to user control program) program and its network USENET.
Path name specification: The second approach in this direction is that programs from one machine can open files on another machine by providing a path name telling where the file is located.
A (virtual) subdirectory above the root directory provides access to remote tiles protection:
Program execution is the third area in which machine boundaries are visible in network operating systems. When a user or a running program wants to create a new process, where is the process created? At least four schemes have been used thus far. The first of these is that the user simply says “CREATE PROCESS” in one way or another, and specifies nothing about where. Depending on the implementation, this can be the best or worse Way to do it.
The second approach to process location is to allow users to run jobs on any machine by first logging in there. In this model, processes on different machines cannot communicate or exchange data, but a simple manual load balancing is possible. The third approach is a special command that the user types at a terminal to cause a program to be executed on a specific machine. A typical command might be remote vax4 who to run the who program on machine vax4. In M arrangement, the environment of the new process is the remote machine. In other words, if that process tries to read or write files from its current working directory, it will discover that its working directory is on the remote machine, and that files that were in the parent process’s directory are no longer present. Similarly, files written in the working directory will appear on the remote machine, not the local one. The fourth approach is to provide the “CREATE PROCESS” system call with a parameter specifying where to run the new process, possibly with a new system call for specifying the default site. As with the previous method, the environment will generally be the remote machine. In many cases, signals and other forms of inter-process communication between processes do not work properly among processes on different machines. Now let us see how file system protection and program execution are supported in distributed operating systems.
4. Distributed Operating System A distributed operating system is one that looks to its users like an ordinary centralized operating system but runs on multiple independent CPUs. The key concept here is transparency. In other words, the use of multiple processors should be invisible to the user. Another way of expressing the same idea is to say that user views the system as virtual uniprocessor but not as a collection of distinct machines. In a true distributed system, users are not aware of where their programs are being run or where their files are residing; they should all be handled automatically and efficiently by the operating system. Distributed operating systems have many aspects in common with centralized ones but they also differ in certain ways. Distributed operating system, for example, often allow programs to run on several processors at the same time, thus requiring more complex processor scheduling (scheduling refers to a set of policies and mechanisms built into the operating systems that controls the order in which the work to be done is completed) algorithms in order to achieve maximum utilisation of CPU’s time. Fault-tolerance is another area in which distributed operating systems are different. Distributed systems are considered to be more reliable than uniprocessor based system. They perform even if certain part of the hardware is malfunctioning. This additional feature, supported by distributed operating system has enormous implications for the operating system. I will tell you the Advantages of Distributed Operating Systems There are three important advantages in the design of distributed operating system: 1. Major breakthrough in microprocessor technology : Micro- processors have become very much powerful and cheap, compared with mainframes and minicomputers, so it has
become attractive to think about designing large systems consisting of small processors. These distributed systems clearly have a price/performance advantages over more traditional systems.
2. Incremental Growth : The second advantage is that if there is a need of 10 per cent more computing power, one should just add 10 per cent more processors. System architecture is crucial to the type of system growth, however, since it is hard to give each user of a personal computer another 10 per cent. 3. Reliability: Reliability and availability can also be a big advantage; a few parts of the system can be down without disturbing people using the other parts; On the minus side, unless one is very careful, it is easy for the communication protocol overhead to become a major source of inefficiency. Now let us see how file system, protection and program execution are supported in distributed operating system.
File System: Distributed operating system supports a single global file system visible from all machines. When this method is used, there is one directory for executable programs (in UNIX, it is bin directory), one password file and so on. When a program wants to read the password file it does something like
Open (*/etc/password”, READ-ONLY)
without reference to where the file is. It is upto the operating system to locate the file and arrange for transport of data as they are needed.
The convenience of having a single global name space is obvious. In addition, this approach means that operating system is free to move files around among machines to keep all the disks generally full and busy and that the system can maintain replicated copies of files if it chooses. When the user or program must specify the machine name, the system cannot decide on its own to move a file to a new machine because that would change the (user visible) name used to access the file. Thus in a network operating system, control over file placement must be done manually by the users, whereas in a distributed operating system it can be done automatically by the system itself.
Protection: In a true distributed system there is a unique UID for every user, and that UID should be valid on all machines without any mapping. In this way no protection problems arise on remote access to files; a remote access can be treated like a local access with the same UID. There is a difference between network operating system and distributed operating system in implementing protection issue. In networking operating system, there are various machines, each with its own user to UID mapping but in distributed operating system there is a single system wide mapping that is valid everywhere.
Program Execution: In the most distributed case the system chooses a CPU by looking at the processing load of the machine, location of file to be used etc. In the least distributed case, the system always run the process on one specific machine (usually the machine on which the user is logged in).
An important difference between network and distributed operating system is how they are implemented. A common way to realize a networking operating system is to put a layer of software on top of the native operating system of the individual machines. For example one could write a special library package that could intercept all the system calls and decide whether each one was local or remote. Although most system calls can be handled this way without modifying kernel (kernel is that part of operating system that manages all resources of computer). Historical Development of Operating Systems
1. Open shop
Author Deitel, Harvey M., 1945-
Main Title An Introduction To Operating Systems / Harvey M. Deitel.
Edition Rev. 1st Ed.
Publisher Reading, Mass : Addison-Wesley Pub. Co., C1984.
Author Lister, A. (Andrew), 1945-
Main Title Fundamentals Of Operating Systems / A.M. Lister.
Edition 3rd Ed.
Publisher London : Macmillan, 1984.
Author Gray, N. A. B. (Neil A. B.)
Main Title Introduction To Computer Systems / N.A.B. Gray.
Publisher Englewood Cliffs, New Jersey ; Sydney : Prentice-Hall,
Author Peterson, James L.
Main Title Operating System Concepts / James L. Peterson,
Abraham Silberschatz.
Edition 2nd Ed.
Publisher Reading, Mass. : Addison-Wesley, 1985.
Author Stallings, William.
Main Title Operating Systems / William Stallings.
Edition 6th Ed.
Publisher Englewood Cliffs, Nj : Prentice Hall, C1995.
Author Tanenbaum, Andrew S., 1944-
Main Title Operating Systems : Design And Implementation /
Andrew S. Tanenbaum, Albert S. Woodhull.
Edition 2nd Ed.
Publisher Upper Saddle River, Nj : Prentice Hall, C1997.
Author Nutt, Gary J.
Main Title Operating Systems : A Modern Perspective /Gary J.
Nutt.
Publisher Reading, Mass. : Addison-Wesley, C1997.
Author Silberschatz, Abraham.
Main Title Operating System Concepts / Abraham Silberschatz, Peter Baer Galvin.
Edition 6th Ed.
Publisher Reading, Mass. : Addison Wesley Longman, C1998.
Notes
OPERATING SYSTEMS
Dear students after learning about the different types of operating systems , lets us now discuss the different functions and services of an operating system.
Today I will discuss briefly the services and Functions of an Operating System. They are listed as follows:
With the different types of operating systems in mind, it’s time to look at the basic functions provided by an operating system.
When the power to a computer is turned on, the first program that runs is usually a set of instructions kept in the computer’s read-only memory (ROM) that examines the system hardware to make sure everything is functioning properly. This power-on self test (POST) checks the CPU, memory, and basic input-output systems (BIOS) for errors and stores the result in a special memory location. Once the POST has successfully completed, the software loaded in ROM (sometimes called firmware ) will begin to activate the computer’s disk drives. In most modern computers, when the computer activates the hard disk drive, it finds the first piece of the operating system: the bootstrap loader.
The bootstrap loader is a small program that has a single function: It loads the operating system into memory and allows it to begin operation. In the most basic form, the bootstrap loader sets up the small driver programs that interface with and control the various hardware subsystems of the computer. It sets up the divisions of memory that hold the operating system, user information and applications. It establishes the data structures that will hold the myriad signals, flags and semaphores that are used to communicate within and between the subsystems and applications of the computer. Then it turns control of the computer over to the operating system.
The operating system’s tasks, in the most general sense, fall into six categories:
While there are some who argue that an operating system should do more than these six tasks, and some operating-system vendors do build many more utility programs and auxiliary functions into
their operating systems, these six tasks define the core of nearly all operating systems. Let’s look at the tools the operating system uses to perform each of these functions. Processor Management The heart of managing the processor comes down to two related issues:
LESSON-
RAM space at no cost. This technique is called virtual memory management.
Disk storage is only one of the memory types that must be managed by the operating system, and is the slowest. Ranked in order of speed, the types of memory in a computer system are:
- High-speed cache - This is fast, a relatively small amount of memory that are available to the CPU through the fastest connections. Cache controllers predict which pieces of data the CPU will need next and pull it from main memory into high- speed cache to speed up system performance. - Main memory - This is the RAM that you see measured in megabytes when you buy a computer. - Secondary memory - This is most often some sort of rotating magnetic storage that keeps applications and data available to be used, and serves as virtual RAM under the control of the operating system. The operating system must balance the needs of the various processes with the availability of the different types of memory, moving data in blocks (called pages ) between available memory as the schedule of processes dictates.
Device Management The path between the operating system and virtually all hardware not on the computer’s motherboard goes through a special program called a driver. Much of a driver’s function is to be the translator between the electrical signals of the hardware subsystems and the high-level programming languages of the operating system and application programs. Drivers take data that the operating system has defined as a file and translate them into streams of bits placed in specific locations on storage devices, or a series of laser pulses in a printer.
Because there are such wide differences in the hardware controlled through drivers, there are differences in the way that the driver programs function, but most are run when the device is required, and function much the same as any other process. The operating system will frequently assign high-priority blocks to drivers so that the hardware resource can be released and readied for further use as quickly as possible.
One reason that drivers are separate from the operating system is so that new functions can be added to the driver and thus to the hardware subsystems - without requiring the operating system itself to be modified, recompiled and redistributed.
Through the development of new hardware device drivers, development often performed or paid for by the manufacturer of the subsystems rather than the publisher of the operating system, input/output capabilities of the overall system can be greatly enhanced.
Managing input and output is largely a matter of managing queues and buffers , special storage facilities that take a stream of bits from a device, perhaps a keyboard or a serial port, hold those bits, and release them to the CPU at a rate slow enough for the CPU to cope with.
This function is especially important when a number of processes are running and taking up processor time. The operating system will instruct a buffer to continue taking input from the device, but to stop sending data to the CPU while the process using the input
is suspended. Then, when the process needing input is made active once again, the operating system will command the buffer to send data. This process allows a keyboard or a modem to deal with external users or computers at a high speed even though there are times when the CPU can’t use input from those sources. Managing all the resources of the computer system is a large part of the operating system’s function and, in the case of real-time operating systems, may be virtually all the functionality required. For other operating systems, though, providing a relatively simple, consistent way for applications and humans to use the power of the hardware is a crucial part of their reason for existing. Interface to the World Application Interface Application program interfaces (APIs) let application programmers use functions of the computer and operating system without having to directly keep track of all the details in the CPU’s operation. Let’s look at the example of creating a hard disk file for holding data to see why this can be important. A programmer writing an application to record data from a scientific instrument might want to allow the scientist to specify the name of the file created. The operating system might provide an API function named MakeFile for creating files. When writing the program, the programmer would insert a line that looks like this: MakeFile [1, %Name, 2] In this example, the instruction tells the operating system to create a file that will allow random access to its data (1), will have a name typed in by the user (%Name), and will be a size that varies depending on how much data is stored in the file (2). Now, let’s look at what the operating system does to turn the instruction into action.
APIs have become one of the most hotly contested areas of the computer industry in recent years. Companies realise that programmers using their API will ultimately translate into the ability to control and profit from a particular part of the industry. This is one of the reasons that so many companies have been willing to provide applications like readers or viewers to the public at no charge. They know consumers will request that programs take advantage of the free readers, and application companies will be ready to pay royalties to allow their software to provide the functions requested by the consumers.
User Interface
A User Interface (UI ) brings structure to the interaction between a user and the computer. In the last decade, almost all development in user interfaces has been in the area of the graphical user interface (GUI), with two models, Apple’s Macintosh and Microsoft’s Windows, receiving most of the attention and gaining most of the market share. There are other user interfaces, some graphical and some not, for other operating systems.
Unix, for example, has user interfaces called shells that present a user interface more flexible and powerful than the standard operating system text-based interface. Programs such as the Korn Shell and the C Shell are text-based interfaces that add important utilities, but their main purpose is to make it easier for the user to manipulate the functions of the operating system.
There are also graphical user interfaces, such as X-Windows and Gnome, which make Unix and Linux more like Windows and Macintosh computers from the user’s point of view.
It’s important to remember that in all of these examples, the user interface is a program or set of programs that sits as a layer above the operating system itself. The same thing is true, with somewhat different mechanisms, of both Windows and Macintosh operating systems. The core operating-system functions, the management of the computer system, lie in the kernel of the operating system. The display manager is separate, though it may be tied tightly to the kernel beneath.
The ties between the operating-system kernel and the user interface, utilities and other software define many of the differences in operating systems today, and will further define them in the future.
Let us take the overview of Additional Operating System Functions
Additional functions exist not for helping the user, but rather for ensuring efficient system operations.
Resource allocation- allocating resources to multiple users or multiple jobs running the same time.
Accounting- keep track of and record which users use how much and what kinds of computer resources for account billing or for accumulating usage statistics.
Protection - ensuring that all access to system resources is controlled.
Command-Interpreter System
Many commands are given to the operating system by control statements which deal with:
process creation and management
I/O handling
secondary-storage management main-memory management file-system access protection networking The program that reads and interprets control statements is called variously: control-card interpreter command-line interpreter shell (in UNIX) Its function is to get and execute the next command statement. Operating System Services Program execution – system capability to load a program into memory and to run it. I/O operations – since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O. File-system manipulation – program capability to read, write, create, and delete files. Communications – exchange of information between processes executing either on the same computer or on different systems tied together by a network. Implemented via shared memory or message passing. Error detection – ensure correct computing by detecting errors in the CPU and memory hardware, in I/O devices, or in user programs. List of Additional Operating System Functions Additional functions exist not for helping the user, but rather for ensuring efficient system operations. Resource allocation- allocating resources to multiple users or multiple jobs running at the same time.
________________________________________________________________________**
OPERATING SYSTEMS
Today I will describe you the Operating Systems Structure Since you all know operating system is a very large and complex software, it must be engineered carefully, if it is to be functioned properly and to be modified easily. It should be developed as a collection of several smaller modules with carefully defined inputs, outputs and functions rather than a single piece of software. Let us now examine different types of operating systems.
1. Simple Structure: This type of structures is not well defined .Such type of operating system are as :
LESSON 4:
Making a system call. An illustration of UNIX kernel built on the system’s hardware core.
With in the kernel, individual segments of programs or routines, carry out the kernel’s work. The routines allocate memory resources, schedule CPU time, and manage access to system resources.
The kernel also monitors the system for error conditions and hardware problems. At higher level, the routines provide programs with entry points to kernel services. All UNIX programs use the kernel’s system call.
4. Virtual Machine: 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.
Virtual System Models From the user’s point of view, virtual machine can be made to appear to very similar to existing real machine or they can be entirely different. An important aspect of this technique is that each user can run operating system of his own choice.
To understand this concept, let us try to understand the difference between conventional multiprogramming system and virtual machine multiprogramming. In conventional multiprogramming processes are allocated a portion of the real machines resources. The same machine resources are distributed among several processes.
In virtual multiprogramming system, a single real machine gives an illusion of several virtual machines, each having its own virtual processor, storage and I/O devices possibly with much larger capacity. Process scheduling can be used to share the CPU and make it appear that user’s have their own processors. Virtual memory organization technique can create illusion of very large memory for program execution. Lets us now cover the advantages and disadvantages of Virtual Machines Advantages :