Operating Systems I An Introduction to Operating System

  • Slides: 20
Download presentation
Operating Systems I An Introduction to Operating System Concepts CMSC 104 1

Operating Systems I An Introduction to Operating System Concepts CMSC 104 1

OS Introduction Computer applications today require a single machine to perform many operations and

OS Introduction Computer applications today require a single machine to perform many operations and the applications may compete for the resources of the machine. l This demands a high degree of coordination l This coordination is handled by system software known as the operating system l CMSC 104 2

Evolution of Operating System l OS for batch jobs o Program execution required significant

Evolution of Operating System l OS for batch jobs o Program execution required significant preparation of equipment o Program execution (job) o OS was a system to simplify program setup and simplify transition between jobs o Physical separation of users and equipment led to computer operators CMSC 104 3

OS Evolution (cont’d) o User’s left jobs with the operator and came back the

OS Evolution (cont’d) o User’s left jobs with the operator and came back the next day (batch jobs) o Users had no interaction with computer during program execution. Maybe okay for some applications, but not for all. CMSC 104 4

OS Evolution l OS for Interactive Processing o Allowed programs to carry on dialogue

OS Evolution l OS for Interactive Processing o Allowed programs to carry on dialogue with user via remote terminals (workstations) o Real-time processing o Users demand timely response o Machines too expensive to serve only one user o Common for several users to want interactive services at the same time CMSC 104 5

OS Evolution (cont’d) l OS for time-sharing o To accommodate multiple real-time users, the

OS Evolution (cont’d) l OS for time-sharing o To accommodate multiple real-time users, the OS rotates its various jobs in and out of execution via time-sharing o Each job gets a predetermined “time slice” o At end of time slice current job is set aside and a new one starts o By rapidly shuffling jobs, illusion of several jobs executing simultaneously is created CMSC 104 6

OS Evolution (cont’d) o without time slicing, a computer spends most of its time

OS Evolution (cont’d) o without time slicing, a computer spends most of its time waiting for peripheral devices or users o A collection of tasks can be completed in less time with time-sharing than when completed sequentially CMSC 104 7

Different Operating Systems on the Same Machine ? It is possible to have more

Different Operating Systems on the Same Machine ? It is possible to have more than one operating system available to be used on a machine. l Only one operating system is run at a time, though. l Examples: l o VAX - VMS or Ultrix o IBM PCs - DOS or Linux CMSC 104 8

Types of software l Applications software Performs tasks specific to the machine’s utilization. l

Types of software l Applications software Performs tasks specific to the machine’s utilization. l Generally transportable l l System Software Performs tasks common to computer systems in general l Operating systems vary based on the hardware they’re used on l CMSC 104 9

Types of software (cont’d) l Utility software o providing fundamental activities, yet not included

Types of software (cont’d) l Utility software o providing fundamental activities, yet not included with OS o “extend” the OS o Distinction between applications and utilities is often vague o Distinction between OS and utilities is also vague CMSC 104 10

The OS Shell l Defines interface between OS and users o Windows GUI o

The OS Shell l Defines interface between OS and users o Windows GUI o UNIX command line o UNIX users can choose among a variety of shells �csh is the “C shell” �tcsh is an enhanced “C shell” o Shell programming CMSC 104 11

OS Shell interface Users O/S Users shell CMSC 104 12

OS Shell interface Users O/S Users shell CMSC 104 12

The OS Kernel The internal part of the OS is often called the Kernel

The OS Kernel The internal part of the OS is often called the Kernel l Kernel Components l o File Manager o Device Drivers o Memory Manager o Scheduler o Dispatcher CMSC 104 13

OS File Manager Maintains information about the files that are available on the system

OS File Manager Maintains information about the files that are available on the system l Where files are located in mass storage, their size and type and their protections, what part of mass storage is available l Files usually allowed to be grouped in directories or folders. Allows hierarchical organization. l CMSC 104 14

OS Device Drivers Software to communicate with peripheral devices or controllers l Each driver

OS Device Drivers Software to communicate with peripheral devices or controllers l Each driver is unique l Translates general requests into specific steps for that device l CMSC 104 15

OS Memory Manager This unit is responsible for coordinating the use of the machine’s

OS Memory Manager This unit is responsible for coordinating the use of the machine’s main memory. l It decides what area of memory is to be allocated for a program and it’s data l It allocates and deallocates memory for different programs and always knows what areas are free. l CMSC 104 16

OS Scheduler l Maintains a record of processes that are present, adds new processes,

OS Scheduler l Maintains a record of processes that are present, adds new processes, removes completed processes o memory area(s) assigned o priority o state of readiness to execute (ready/wait) CMSC 104 17

OS Dispatcher Ensures that processes that are ready to run are actually executed l

OS Dispatcher Ensures that processes that are ready to run are actually executed l Time is divided into small (50 ms) segments called a time slice. l When the time slice is over, the dispatcher allows scheduler to update process state for each process, then selects the next process to run l CMSC 104 18

OS Summary Shell -- interface to user l File Manager -- manages mass memory

OS Summary Shell -- interface to user l File Manager -- manages mass memory l Device Drivers -- communicate with peripherals l Memory Manager -- manages main memory l Scheduler & Dispatcher -- manage processes l CMSC 104 19

Utilities Operating Systems usually come with some associated utility programs l UNIX usually has

Utilities Operating Systems usually come with some associated utility programs l UNIX usually has the text editors emacs and vi (and sometimes pico) l UNIX has it’s own sort utility l UNIX has it’s own mail utility l CMSC 104 20