cmsc 104, lecture 031 operating systems i an introduction to operating system concepts
DESCRIPTION
CMSC 104, Lecture 033 How Do I Communicate With the Computer Using the OS? You communicate using the particular OS’s user interface. Graphical User Interface (GUI) - Windows Command-driven interface - DOS, UNIX, Linux We will be using the Linux operating system, which is very similar to UNIX.TRANSCRIPT
![Page 1: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/1.jpg)
CMSC 104, Lecture 03 1
Operating Systems I
An Introductionto
Operating SystemConcepts
![Page 2: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/2.jpg)
CMSC 104, Lecture 03 2
What is an Operating System (OS)?
• A computer program
• Performs many operations, such as:
• Allows you to communicate with the computer (tell it what to do)
• Controls access (login) to the computer
• Keeps track of all processes currently running
![Page 3: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/3.jpg)
CMSC 104, Lecture 03 3
How Do I Communicate With the Computer Using the OS?
• You communicate using the particular OS’s user interface.
• Graphical User Interface (GUI) - Windows• Command-driven interface - DOS, UNIX, Linux
• We will be using the Linux operating system, which is very similar to UNIX.
![Page 4: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/4.jpg)
CMSC 104, Lecture 03 4
How Do I Communicate With the Computer Using the OS? (con’t)
• When you log in to the Linux system here, a user prompt will be displayed: linux#[1]% _
where # is the number of the Linux server that you have connected to. You may use any of the Linux servers.
• The number in the brackets will change as you work It is the “number” of the command that you are about to type.
• If this prompt is not on the screen at any time, you are not communicating with the OS.
![Page 5: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/5.jpg)
CMSC 104, Lecture 03 5
OS Introduction
• Computer applications today require a single machine to perform many operations and the applications may compete for the resources of the machine.
• This demands a high degree of coordination
• This coordination is handled by system software known as the operating system
![Page 6: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/6.jpg)
CMSC 104, Lecture 03 6
Evolution of Operating System
• OS for batch jobso Program execution required significant
preparation of equipmento Program execution (job)o OS was a system to simplify program setup
and simplify transition between jobso Physical separation of users and
equipment led to computer operators
![Page 7: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/7.jpg)
CMSC 104, Lecture 03 7
OS Evolution (cont’d)
o Users 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.
![Page 8: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/8.jpg)
CMSC 104, Lecture 03 8
OS Evolution
• OS for Interactive Processingo Allowed programs to carry on dialogue with
user via remote terminals (workstations)o Real-time processingo Users demand timely responseo Machines too expensive to serve only one
usero Common for several users to want
interactive services at the same time
![Page 9: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/9.jpg)
CMSC 104, Lecture 03 9
OS Evolution (cont’d)
• OS for time-sharingo 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 startso By rapidly shuffling jobs, illusion of several
jobs executing simultaneously is created
![Page 10: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/10.jpg)
CMSC 104, Lecture 03 10
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
![Page 11: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/11.jpg)
CMSC 104, Lecture 03 11
Different Operating Systems on the Same Machine ?
• It is possible to have more than one operating system available to be used on a machine.
• Only one operating system is run at a time, though.
• Examples: o VAX -- VMS or Ultrixo PCs -- DOS, Windows, or Linux
![Page 12: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/12.jpg)
CMSC 104, Lecture 03 12
Types of software
• Applications softwareo Performs tasks specific to the machine’s
utilization.• System Software
o Performs tasks common to computer systems in general
o Operating systems vary based on the hardware they’re used on
![Page 13: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/13.jpg)
CMSC 104, Lecture 03 13
Types of software (cont’d)
• Utility softwareo Provides fundamental activities, yet not
included with OSo “Extends” the OSo Distinction between applications and
utilities is often vagueo Distinction between OS and utilities is also
vague
![Page 14: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/14.jpg)
CMSC 104, Lecture 03 14
The OS Shell
• Defines interface between OS and userso Windows GUIo UNIX command lineo UNIX users can choose among a variety of
shells� csh is the “C shell”� tcsh is an enhanced “C shell”
![Page 15: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/15.jpg)
CMSC 104, Lecture 03 15
OS Shell interface
O / S
shell
Users
UsersUsers
![Page 16: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/16.jpg)
CMSC 104, Lecture 03 16
The OS Kernel
• The internal part of the OS is often called the kernel
• Kernel Componentso File Managero Device Driverso Memory Managero Schedulero Dispatcher
![Page 17: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/17.jpg)
CMSC 104, Lecture 03 17
OS File Manager
• Maintains information about the files that are available on the system
• Where files are located in mass storage, their size and type and their protections, what part of mass storage is available
• Files usually allowed to be grouped in directories or folders. Allows hierarchical organization.
![Page 18: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/18.jpg)
CMSC 104, Lecture 03 18
OS Device Drivers
• Software to communicate with peripheral devices or controllers
• Each driver is unique• Translates general requests into
specific steps for that device
![Page 19: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/19.jpg)
CMSC 104, Lecture 03 19
OS Memory Manager
• Responsible for coordinating the use of the machine’s main memory
• Decides what area of memory is to be allocated for a program and its data
• Allocates and deallocates memory for different programs and always knows what areas are free
![Page 20: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/20.jpg)
CMSC 104, Lecture 03 20
OS Scheduler
• Maintains a record of processes that are present, adds new processes, removes completed processeso memory area(s) assignedo priorityo state of readiness to execute (ready/wait)
![Page 21: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/21.jpg)
CMSC 104, Lecture 03 21
OS Dispatcher
• Ensures that processes that are ready to run are actually executed
• Time is divided into small (50 ms) segments called a time slice
• When the time slice is over, the dispatcher allows scheduler to update process state for each process, then selects the next process to run
![Page 22: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/22.jpg)
CMSC 104, Lecture 03 22
OS Summary
• Shell -- interface to user• File Manager -- manages mass memory• Device Drivers -- communicate with
peripherals• Memory Manager -- manages main
memory• Scheduler & Dispatcher -- manage
processes
![Page 23: CMSC 104, Lecture 031 Operating Systems I An Introduction to Operating System Concepts](https://reader036.vdocuments.us/reader036/viewer/2022062412/5a4d1ad57f8b9ab05997291f/html5/thumbnails/23.jpg)
CMSC 104, Lecture 03 23
Utilities
• Operating systems usually come with some associated utility programs
• UNIX usually has the text editors xemacs/emacs and vi
(and sometimes pico)• UNIX has its own sort utility• UNIX has its own mail utility