940 likes | 1.58k Views
Lesson 1: Operating System Basics. What is an Operating System?. OS = Operating System A program that controls the execution of application programs. An interface between applications and hardware. Makes the computer more convenient to use. What is an Operating system?.
E N D
Lesson 1: Operating System Basics
What is an Operating System? • OS = Operating System • A program that controls the execution of application programs. • An interface between applications and hardware. • Makes the computer more convenient to use
What is an Operating system? • Manages the resources of a computer and controls the way they are used. • Allows resources to be used in an efficient manner. • Examples of OS’s?
Where are OS’s used? • In more and more places! • Desktop and Server Computers • DOS + Windows 95/98/ME • Windows NT/2000/XP • Free Unix variants: Linux, FreeBSD, NetBSD, etc. • Commercial Unix variants: Solaris, HP-UX, AIX, etc.
Where are OS’s used? • MacOS • Some Game Consoles • Xbox: Cut-down Windows 2000 • Personal Digital Assistants (PDAs) • PalmOS • Windows CE Windows Mobile
Where are OS’s used? • Embedded Linux • Mobile Phones • Symbian OS • Windows Mobile • Cars (fancy ones)
Where are OS’s used? • In the future also: • Digital Cameras (fancy ones) • MP3 Players (iPods, etc.) • Refrigerators! • Others?
User Program (requests service) from kernel Type, Data details Are sent Service,data and Status returned UNIX system kernel (provides services) to The user Services And System Calls Services offered and system calls
Services Provided by the OS • Program execution • Access to Input/Output (I/O) devices • Disks, screens, keyboards, mice • Printers, cameras, speakers, etc.
Services Provided by the OS • Controlled access to files • System access • Sometimes: Program development • Compilers, editors and debuggers • Error detection and response • Internal and external hardware errors • Memory errors
Services Provided by the OS • Device failures • Software errors • Arithmetic overflow • Division by zero • Access to forbidden memory locations (why?) • Operating system cannot grant request of application
Operating System as Software • The OS functions the same way as ordinary computer software • It is a program that is executed … … but it has special privileges • The OS relinquishes control of the processor to execute other programs
Functions of Operating Systems • Provide a user interface • Run programs • Manage hardware devices • Organized file storage
Types of Operating Systems • Real-time operating system • Very fast small OS • Built into a device • Respond quickly to user input • MP3 players, Medical devices
Types of Operating Systems • Single user/Single tasking OS • One user works on the system • Performs one task at a time • MS-DOS and Palm OS • Take up little space on disk • Run on inexpensive computers
Types of Operating Systems • Single user/Multitasking OS • User performs many tasks at once • Most common form of OS • Windows XP and OS X • Require expensive computers • Tend to be complex
Providing a User Interface • User interface • How a user interacts with a computer • Require different skill sets
Providing a User Interface • Graphical user interface (GUI) • Most common interface • Windows, OS X, Gnome, KDE • Uses a mouse to control objects • Uses a desktop metaphor
Contd: • Shortcuts open programs or documents • Open documents have additional objects • Task switching • Dialog boxes allow directed input
Running Programs • Many different applications supported • System call • Provides consistent access to OS features • Share information between programs • Copy and paste • Object Linking and Embedding
Managing Hardware • Programs need to access hardware • Interrupts • CPU is stopped • Hardware device is accessed • Device drivers control the hardware
Organizing Files and Folders • Organized storage • Long file names • Folders can be created and nested • All storage devices work consistently
Enhancing an OS • Utilities • Provide services not included with OS • Goes beyond the four functions • Firewall, anti-virus and compression • Prices vary
Enhancing an OS • Backup software • Archives files onto removable media • Ensures data integrity • Most OS include a backup package • Many third party packages exist
Enhancing an OS • Anti-virus software • Crucial utility • Finds, blocks and removes viruses • Must be updated regularly • McAfee and Norton Anti-Virus
Enhancing an OS • Firewall • Crucial utility • Protects your computer from intruders • Makes computer invisible to hackers • Zone Labs is a home firewall • Cisco sells hardware firewalls
UNIX • Unix is a multi-user, multi-tasking operating system. • You can have many users logged into a system simultaneously, each running many programs. • It's the kernel's job to keep each process and user separate and to regulate access to system hardware, including cpu, memory, disk and other I/O devices.
History of UNIX • First Version was created in Bell Labs in 1969. • Some of the Bell Labs programmers who had worked on this project, Ken Thompson, Dennis Ritchie, Rudd Canaday, and Doug McIlroy designed and implemented
History of UNIX • the first version of the Unix File System on a PDP-7 along with a few utilities. It was given the name UNIX by Brian Kernighan. • 00:00:00 Hours, Jan 1, 1970 is time zero for UNIX. It is also called as epoch.
History of UNIX • 1973 Unix is re-written mostly in C, a new language developed by Dennis Ritchie. • Being written in this high-level language greatly decreased the effort needed to port it to new machines.
History of UNIX • 1977 There were about 500 Unix sites world-wide. • 1980 BSD 4.1 (Berkeley Software Development) • 1983 SunOS, BSD 4.2, System V
History of UNIX • 1988 AT&T and Sun Microsystems jointly develop System V Release 4 (SVR4). This later developed into UnixWare and Solaris 2. • 1991 Linux was originated.
What is LINUX • Linux is a free Unix-type operating system originally created by Linus Torvalds with the assistance of developers around the world. • It originated in 1991 as a personal project of Linus Torvalds, a Finnish graduate student.
What is LINUX • The Kernel version 1.0 was released in 1994 and today the most recent stable version is 2.6.9 • Developed under the GNU General Public License , the source code for Linux is freely available to everyone.
LINUX Distributions • Mandrake: http://www.mandrakesoft.com/ • RedHat: http://www.redhat.com/ • Fedora: http://fedora.redhat.com/ • SuSE/Novell: http://www.suse.com/ • Debian: http://www.debian.org/
Red Hat • Red Hat Enterprise Linux is a Enterprise targeted Operating System. It based on mature Open Source technology and available at a cost with one year Red Hat Network subscription for upgrade and support contract.
Components of a Linux System • Like most UNIX implementations, Linux is composed of three main bodies of code; the most important distinction between the kernel and all other components
Kernel • Portion of operating system that is always in main memory • Contains most-frequently used functions • Also called the nucleus • Good performance of the kernel is very important
Components of a Linux System (Cont.) • The kernel is responsible for maintaining the important abstractions of the operating system.
Components of a Linux System (Cont.) • Kernel code executes in kernel mode with full access to all the physical resources of the computer. • All kernel code and data structures are kept in the same single address space.
Components of a Linux System (Cont.) • The system libraries define a standard set of functions through which applications interact with the kernel, and which implement much of the operating-system functionality that does not need the full privileges of kernel code.
Shell • Shell is the command interpreter. • It is a interface between a user and the system. • The kernel activates an interactive program called shell for each user logged into the system.
Shell • Shells provide a way to separate users or tasks from each other. • Kernel maintains a unified overall control. • Shell provides a prompt like $ or %. • This is called the command line interface of the shell.
Shell • The user can type any valid UNIX/Linux command. • Can run a shell script and press enter to intimate the shell about the task to perform. • The shell interprets the typed command and searches a predefined path for the executable file by the name of the command typed.
Shell • It checks the syntax of the commands and if all is fine, starts the corresponding executable running and goes into waiting mode. • After the command finishes executing, it exits and control is returned to the shell.