×
DONT COMPLAIN; JUST WORK HARDER
--Your friends at LectureNotes
Close

Note for Operating Systems - OS by Nataraju A.B

  • Operating Systems - OS
  • Note
  • Visvesvaraya Technological University Regional Center - VTU
  • Electronics and Communication Engineering
  • B.Tech
  • 10 Topics
  • 1271 Views
  • 29 Offline Downloads
  • Uploaded 10 months ago
Nataraju A.b
Nataraju A.b
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-3

15ECS553 … OPERATING SYSTEM (CBCS) Lecture Notes (Ver 1.1) Module-1 : Introduction to Operating Systems : OS, Goals of an OS, Operation of an OS, Computational Structures, Resource allocation techniques, Efficiency, System Performance and User Convenience, Classes operating System, Batch processing, Multi programming, Time Sharing Systems, Real Time and distributed Operating Systems (Selected Topics from Ch -1, 2 of Text 1). The operating system (OS) is the intermediary between users and the computer system. It provides the services and features present in abstract views of all its users through the computer system. Abstract views of an Operating system (User’s perspective) A question such as “What is an OS?” is likely to evoke different answers, depending on the user’s interest. For example,  To a school or college student, the OS is the software that permits access to the Internet.  To a programmer, the OS is the software that makes it possible to develop programs on a computer system.  To a user of an application package, the OS is simply the software that makes it possible to use the package.  To a technician in, say, a computerized chemical plant, the OS is the invisible component of a computer system that controls the plant. The operating system is the intermediary between users and the computer system. It provides the services and features present in abstract views of all its users through the computer system. It also enables the services and features to evolve over time as users’ needs change. An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs. An individual user has an abstract view of the computer system, a view that takes in only those features that the user considers important. Abstract view of an Operating System (Designer’s perspective) The typical functionalities are as follows: Page |3

Text from page-4

15ECS553 … OPERATING SYSTEM (CBCS) Lecture Notes (Ver 1.1) • User interface: The user interface accepts commands to execute programs and use resources and services provided by the operating system. It is either a command line interface, as in Unix or Linux, which displays a command prompt to the user and accepts a user command, or is a graphical user interface (GUI), as in the Windows operating system, which interprets mouse clicks on icons as user commands. • Non-kernel routines: These routines implement user commands concerning execution of programs and use of the computer’s resources; they are invoked by the user interface. • Kernel: The kernel is the core of the OS. It controls operation of the computer and provides a set of functions and services to use the CPU, memory, and other resources of the computer. The functions and services of the kernel are invoked by the non kernel routines and by user programs. Goals of an OS: The fundamental goals of an operating system are:  Efficient use: Ensure efficient use of a computer’s resources.  User convenience: Provide convenient methods of using a computer system.  Noninterference: Prevent interference in the activities of its users. The goals of efficient use and user convenience sometimes conflict. For example, emphasis on quick service could mean that resources like memory have to remain allocated to a program even when the program is not in execution; however, it would lead to inefficient use of resources. When such conflicts arise, the designer has to make a trade-off to obtain the combination of efficient use and user convenience that best suits the environment. This is the notion of effective utilization of the computer system. Interference with a user’s activities may take the form of illegal use or modification of a user’s programs or data, or denial of resources and services to a user. Such interference could be caused by both users and nonusers, and every OS must incorporate measures to prevent it. Efficient Use An operating system must ensure efficient use of the fundamental computer system resources of memory, CPU, and I/O devices such as disks and printers. Poor efficiency can result if a program does not use a resource allocated to it, e.g., if memory or I/O devices allocated to a program remain idle. Such a situation may have a snowballing effect: Since the resource is allocated to a program, it is denied to other programs that need it. These programs cannot execute, hence resources allocated to them also remain idle. In addition, the OS itself consumes some CPU and memory resources during its own operation, and this consumption of resources constitutes an overhead that also reduces the resources available to user programs. To achieve good efficiency, the OS must minimize the waste of resources by programs and also minimize its own overhead. Efficient use of resources can be obtained by monitoring use of resources and performing corrective actions when necessary. However, monitoring use of resources increases the overhead, which lowers efficiency of use. In practice, operating systems that emphasize efficient use limit their overhead by Page |4

Text from page-5

15ECS553 … OPERATING SYSTEM (CBCS) Lecture Notes (Ver 1.1) either restricting their focus to efficiency of a few important resources, like the CPU and the memory, or by not monitoring the use of resources at all, and instead handling user programs and resources in a manner that guarantees high efficiency. User Convenience User convenience has many facets, as Table 1.1 indicates. In the early days of computing, user convenience was synonymous with bare necessity—the mere ability to execute a program written in a higher level language was considered adequate. Experience with early operating systems led to demands for better service, which in those days meant only fast response to a user request. Other facets of user convenience evolved with the use of computers in new fields. Early operating systems had command-line interfaces, which required a user to type in a command and specify values of its parameters. Users needed substantial training to learn use of the commands, which was acceptable because most users were scientists or computer professionals. However, simpler interfaces were needed to facilitate use of computers by new classes of users. Hence graphical user interfaces (GUIs) were evolved. These interfaces used icons on a screen to represent programs and files and interpreted mouse clicks on the icons and associated menus as commands concerning them. Non-interference A computer user can face different kinds of interference in his computational activities. Execution of his program can be disrupted by actions of other persons, or the OS services which he wishes to use can be disrupted in a similar manner. The OS prevents such interference by allocating resources for exclusive use of programs and OS services, and preventing illegal accesses to resources. Another form of interference concerns programs and data stored in user files. A computer user may collaborate with some other users in the development or use of a computer application, so he may wish to share some of his files with them. Attempts by any other person to access his files are illegal and constitute interference. To prevent this form of interference, an OS has to know which files of a user can be accessed by which persons. It is achieved through the act of authorization, whereby a user specifies which collaborators can access what files. The OS uses this information to prevent illegal accesses to files. Page |5

Text from page-6

15ECS553 … OPERATING SYSTEM (CBCS) Lecture Notes (Ver 1.1) Operation of an OS The primary concerns of an OS during its operation are execution of programs, use of resources, and prevention of interference with programs and resources. Accordingly, its three principal functions are:  Program management: The OS initiates programs, arranges their execution on the CPU, and terminates them when they complete their execution. Since many programs exist in the system at any time, the OS performs a function called scheduling to select a program for execution.  Resource management: The OS allocates resources like memory and I/O devices when a program needs them. When the program terminates, it deallocates these resources and allocates them to other programs that need them.  Security and protection: The OS implements noninterference in users’ activities through joint actions of the security and protection functions. As an example, consider how the OS prevents illegal accesses to a file. The security function prevents nonusers from utilizing the services and resources in the computer system, hence none of them can access the file. The protection function prevents users other than the file owner or users authorized by him, from accessing the file. The table 1.2 lists out the common tasks performed by an OS, When a computer system is switched on, it automatically loads a program stored on a reserved part of an I/O device, typically a disk, and starts executing the program. This program follows a software technique known as bootstrapping to load the software called the boot procedure in memory—the program initially loaded in memory loads some other programs in memory, which load other programs, and so on until the complete boot procedure is loaded. The boot procedure makes a list of all hardware resources in the system, and hands over control of the computer system to the OS. Program Management Modern CPUs have the capability to execute program instructions at a very high rate, so it is possible for an OS to interleave execution of several programs on a CPU and yet provide good user service. The key function in achieving interleaved execution of programs is scheduling, which decides which program should be given the CPU at any time. Figure 1.3 shows an abstract view of scheduling. The scheduler, which is an OS routine that performs scheduling, maintains a list of programs waiting to execute on the Page |6

Lecture Notes