os lecture-01 (intro.)

Upload: banda-e-wali

Post on 05-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 OS Lecture-01 (Intro.)

    1/16

    Operating System

    Lecture # 01

  • 8/2/2019 OS Lecture-01 (Intro.)

    2/16

    Course Outline

    The course will consist of: 32 lectures

    4-8 assignments

    4 exams (3 midterm and 1 final)

    Grading Criteria: Two Best Midterm:40%

    Final Exam: 40%

    Assignments: 20%

  • 8/2/2019 OS Lecture-01 (Intro.)

    3/16

    Textbook

    Operating system concepts 7th Edition bySilberschatz, Gagne & Galvin

  • 8/2/2019 OS Lecture-01 (Intro.)

    4/16

    Overview of Lecture #1

    Introduction and purpose of the course

    Organization of a computer system

    Purpose of a computer system Requirements for achieving the purpose Setting the

    stage for OS concepts and principles

    Outline of topics to be discussed

    What is an Operating System?

  • 8/2/2019 OS Lecture-01 (Intro.)

    5/16

    Organization of a Computer

    System

    The major high-level components of a computer system are:

    1. Hardware:2. Operating system:

    3. Applications programs:

    4. Users:

  • 8/2/2019 OS Lecture-01 (Intro.)

    6/16

    Organization of a Computer

    System

    1. Hardware

    Which provides basic computing resources (CPU, memory, I/Odevices, storage devices).

    2. Operating system

    Which manages the use of the hardware among the variousapplication programs for the various users and provides the user arelatively simple machine to use.

    3. Applications programs

    That define the ways in which system resources are used to solve thecomputing problems of the users (compilers, database systems,video games, business programs).

    Application programs enables the users to use the computer system.

    4. Users

    Which include people, machines, other computers. (can be one userat a time or multi le users simultaneousl

  • 8/2/2019 OS Lecture-01 (Intro.)

    7/16

    Layered view of a Computer

    System

  • 8/2/2019 OS Lecture-01 (Intro.)

    8/16

    Purpose of a Computer

    Computer systems consist of software and hardware that are combinedto provide a tool to implement solutions for specific problems in anefficient manner and to execute programs.

    Figure 1.2 shows the general organization of a contemporary computersystem and how various system components are interconnected.

    Viewing things closely will reveal that the primary purpose of acomputer system is to generate executable programs and execute them.

  • 8/2/2019 OS Lecture-01 (Intro.)

    9/16

  • 8/2/2019 OS Lecture-01 (Intro.)

    10/16

    Where these executable programs resides before it executes (run it)by either double clicking on an icon (windows environment) or

    typing command in command line????

    Process of Executing a Program:

    1. Programs are on the disks (in form of some file).

    2. The operating system load this program into the main memoryfrom the disk.

    3. And instructs the CPU (set the CPU state, brings the CPU intoready state) to execute the program instruction by instruction (OSuses program counter that points the next instruction that is to

    executed).

    4. After that the CPU gets into the CPU cycle to fetch the nextinstruction, decode it, and execute it.

  • 8/2/2019 OS Lecture-01 (Intro.)

    11/16

    Setting the Stage for OS Concepts

    and Principles

    The above issues require the operating system to provide the followingservices and much more:

    Manage secondary storage devices

    Allocate appropriate amount of disk space when files are created

    De-allocate space when files are removing Insure that a new file does not overwrite an existing file

    Schedule disk requests

    Manage primary storage

    Allocate appropriate amount of memory space when programs areto be loaded into the memory for executing

    De-allocate space when processes terminate

    Insure that a new process is not loaded on top of an existing process

    Insure that a process does not access memory space that does not

    belong to it

  • 8/2/2019 OS Lecture-01 (Intro.)

    12/16

    Setting the Stage for OS Concepts

    and Principles Minimize the amount of unused memory space Allow execution of programs larger in size than the available main

    memory

    Allow simultaneous execution of processes by scheduling (timeallocation) the CPU(s)

    Prevent Deadlocks between concurrent processes

    Insure integrity of shared data

    Main memory management (paging, segmentation)

    Virtual memory management (used in case when a programs need more

    memory then a computer system has, there a portion of secondarystorage is used as memory called virtual memory)

    Synchronize executions of cooperating processes

    Allow a user to manage his/her files and directories properly

    User view of directory structure

    Provide a mechanism that allows users to protect their files and

  • 8/2/2019 OS Lecture-01 (Intro.)

    13/16

    What is an Operating System?

    There are two views about this.

    1. Top-down view (user view)

    2. Bottom-up view (OS view)

    The top-down view is that it is a program that acts as an intermediarybetween a user of a computer and the computer hardware, and makesthe computer system convenient to use.

    It is because of the operating system that users of a computer systemdont have to deal with computers hardware to get their work done.

    Users can use simple commands to perform various tasks and let theoperating system do the difficult work of interacting with computerhardware.

    Thus, you can use a command like copy file1 file2 to copy file1 tofile2 and let the operating system communicate with the controller(s)

    of the disk that contain(s) the two files.

  • 8/2/2019 OS Lecture-01 (Intro.)

    14/16

    What is an Operating System?

    A computer system has many hardware and software resources thatmay be required to solve a problem:

    CPU time, memory space, file storage space, I/O devices etc.

    The operating system acts as the manager of these resources, facingnumerous and possibly conflicting requests for resources, the operatingsystem must decide how (and when) to allocate (and de-allocate) themto specific programs and users so that it can operate the computersystem efficiently, fairly, and securely.

    So, the bottom-up view is that operating system is a resource managerwho manages the hardware and software resources in the computersystem.

    A slightly different view of an operating system emphasizes the need tocontrol the various I/O devices and programs.

    An operating system is a control program that manages the execution of

    user programs to prevent errors and improper use of a computer.

  • 8/2/2019 OS Lecture-01 (Intro.)

    15/16

    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.

  • 8/2/2019 OS Lecture-01 (Intro.)

    16/16

    Summary

    Introduction and purpose of the course

    Organization of a computer system

    Purpose of a computer system Requirements for achieving the purpose Setting

    the stage for OS concepts and principles

    Outline of topics to be discussed What is an Operating System?