If you can dream it, you can do it.
--Your friends at LectureNotes

Note for Operating Systems - OS by Bput Toppers

  • Operating Systems - OS
  • Note
  • Biju Patnaik University of Technology Rourkela Odisha - BPUT
  • 3 Topics
  • 51 Offline Downloads
  • Uploaded 1 year ago
Bput Toppers
Bput Toppers
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-3

OPERATING SYSTEM Lecture Notes Prepared by Dr. Subhendu Kumar Rath, BPUT Lecture #1 What is an Operating System?  A program that acts as an intermediary between a user of a computer and the computer hardware.  An operating System is a collection of system programs that together control the operations of a computer system. Some examples of operating systems are UNIX, Mach, MS-DOS, MS-Windows, Windows/NT, Chicago, OS/2, MacOS, VMS, MVS, and VM. Operating system goals: • • • Execute user programs and make solving user problems easier. Make the computer system convenient to use. Use the computer hardware in an efficient manner. Computer System Components 1. Hardware – provides basic computing resources (CPU, memory, I/O devices). 2. Operating system – controls and coordinates the use of the hardware among the various application programs for the various users. 3. Applications programs – Define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). 4. Users (people, machines, other computers). Abstract View of System Components Operating System Definitions Resource allocator – manages and allocates resources. Control program – controls the execution of user programs and operations of I/O devices . Kernel – The one program running at all times (all else being application programs). Components of OS: OS has two parts. (1)Kernel.(2)Shell. (1)Kernel is an active part of an OS i.e., it is the part of OS running at all times. It is a programs which can interact with the hardware. Ex: Device driver, dll files, system files etc. (2) Shell is called as the command interpreter. It is a set of programs used to interact with the application programs. It is responsible for execution of instructions given to OS (called commands). Operating systems can be explored from two viewpoints: the user and the system. User View: From the user’s point view, the OS is designed for one user to monopolize its resources, to maximize the work that the user is performing and for ease of use. System View: From the computer's point of view, an operating system is a control program that manages the execution of user programs to prevent errors and improper use of the computer. It is concerned with the operation and control of I/O devices.

Text from page-4

Lecture #2 Functions of Operating System: Process Management A process is a program in execution. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task. The operating system is responsible for the following activities in connection with process management. ✦ Process creation and deletion. ✦ process suspension and resumption. ✦ Provision of mechanisms for: • process synchronization • process communication Main-Memory Management Memory is a large array of words or bytes, each with its own address. It is a repository of quickly accessible data shared by the CPU and I/O devices. Main memory is a volatile storage device. It loses its contents in the case of system failure. The operating system is responsible for the following activities in connections with memory management: ♦ Keep track of which parts of memory are currently being used and by whom. ♦ Decide which processes to load when memory space becomes available. ♦ Allocate and de-allocate memory space as needed. File Management A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. The operating system is responsible for the following activities in connections with file management: ✦ File creation and deletion. ✦ Directory creation and deletion. ✦ Support of primitives for manipulating files and directories. ✦ Mapping files onto secondary storage. ✦ File backup on stable (nonvolatile) storage media. I/O System Management The I/O system consists of: ✦ A buffer-caching system ✦ A general device-driver interface ✦ Drivers for specific hardware devices Secondary-Storage Management Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory. Most modern computer systems use disks as the principle on-line storage medium, for both programs and data. The operating system is responsible for the following activities in connection with disk management: ✦ Free space management ✦ Storage allocation ✦ Disk scheduling Networking (Distributed Systems) ♦ A distributed system is a collection processors that do not share memory or a clock. Each processor has its own local memory. The processors in the system are connected through a communication network. Communication takes place using a protocol. A distributed system provides user access to various system resources. Access to a shared resource allows: ✦ Computation speed-up ♦ ♦ ♦ ♦

Text from page-5

✦ Increased data availability ✦ Enhanced reliability Protection System ♦ Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources. ♦ The protection mechanism must: ✦ distinguish between authorized and unauthorized usage. ✦ specify the controls to be imposed. ✦ provide a means of enforcement. 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: ✦ command-line interpreter ✦ shell (in UNIX) • Its function is to get and execute the next command statement. Operating-System Structures • • • • • • • • System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation Common System Components • • • • • • • • Process Management Main Memory Management File Management I/O System Management Secondary Management Networking Protection System Command-Interpreter System

Text from page-6

Lecture #3 Evolution of OS: 1.Mainframe Systems Reduce setup time by batching similar jobs Automatic job sequencing – automatically transfers control from one job to another. First rudimentary operating system. Resident monitor  initial control in monitor  control transfers to job  when job completes control transfers pack to monitor 2. Batch Processing Operating System:  This type of OS accepts more than one jobs and these jobs are batched/ grouped together according to their similar requirements. This is done by computer operator. Whenever the computer becomes available, the batched jobs are sent for execution and gradually the output is sent back to the user.  It allowed only one program at a time.  This OS is responsible for scheduling the jobs according to priority and the resource required. 3. Multiprogramming Operating System:  This type of OS is used to execute more than one jobs simultaneously by a single processor. it increases CPU utilization by organizing jobs so that the CPU always has one job to execute.  The concept of multiprogramming is described as follows:  All the jobs that enter the system are stored in the job pool( in disc). The operating system loads a set of jobs from job pool into main memory and begins to execute.  During execution, the job may have to wait for some task, such as an I/O operation, to complete. In a multiprogramming system, the operating system simply switches to another job and executes. When that job needs to wait, the CPU is switched to another job, and so on.  When the first job finishes waiting and it gets the CPU back.  As long as at least one job needs to execute, the CPU is never idle. Multiprogramming operating systems use the mechanism of job scheduling and CPU scheduling. 3. Time-Sharing/multitasking Operating Systems Time sharing (or multitasking) OS is a logical extension of multiprogramming. It provides extra facilities such as:  Faster switching between multiple jobs to make processing faster.  Allows multiple users to share computer system simultaneously.  The users can interact with each job while it is running. These systems use a concept of virtual memory for effective utilization of memory space. Hence, in this OS, no jobs are discarded. Each one is executed using virtual memory concept. It uses CPU scheduling, memory management, disc management and security management. Examples: CTSS, MULTICS, CAL, UNIX etc. 4. Multiprocessor Operating Systems Multiprocessor operating systems are also known as parallel OS or tightly coupled OS. Such operating systems have more than one processor in close communication that sharing the computer bus, the clock and sometimes memory and peripheral devices. It executes multiple jobs at same time and makes the processing faster. Multiprocessor systems have three main advantages:  Increased throughput: By increasing the number of processors, the system performs more work in less time. The speed-up ratio with N processors is less than N.  Economy of scale: Multiprocessor systems can save more money than multiple single-processor systems, because they can share peripherals, mass storage, and power supplies.  Increased reliability: If one processor fails to done its task, then each of the remaining processors must pick up a share of the work of the failed processor. The failure of one processor will not halt the system, only slow it down. The ability to continue providing service proportional to the level of surviving hardware is called graceful degradation. Systems designed for graceful degradation are called fault tolerant.

Lecture Notes