Computer Operating Systems Single-user/Multi-user Operating Systems Dr. E.C. Kulasekere University...
-
Upload
ursula-preston -
Category
Documents
-
view
218 -
download
2
Transcript of Computer Operating Systems Single-user/Multi-user Operating Systems Dr. E.C. Kulasekere University...
Computer Operating Systems
Single-user/Multi-user Operating SystemsDr. E.C. KulasekereUniversity of Moratuwa
Short Course 2003 2
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 1 ExpectationsDefine what an operating system is.List at least four functions performed by an operating system.Briefly explain the difference between a general purpose operating system and a dedicated operating system.classify software according to either business, operating system, utility, education or entertainment categories
Short Course 2003 3
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 1 Expectations (Cont …)
Identify input output devices.Explain the difference between a single-user operating system and a multi-user operating system.Identify some of the available operating systems.Classify common operating systems as single-user or multi-user.
Short Course 2003 4
IEE Sri Lanka
Dr. E.C. Kulasekere
What is an operating system?
is a collection of system programs that together control the operation of a computer system (?).The OS is based on particular hardware.
Short Course 2003 5
IEE Sri Lanka
Dr. E.C. Kulasekere
Abstract view of system components
Short Course 2003 6
IEE Sri Lanka
Dr. E.C. Kulasekere
What does an operating system do?The OS controls the way the the Computer Systems functions. initialize the hardware of the computer system.provide basic routines for device control provide for the management, scheduling and interaction of tasks maintain system integrity and handle errors.Maintains system clean up functions.
Short Course 2003 7
IEE Sri Lanka
Dr. E.C. Kulasekere
Where are operating systems found?The complexity of the OS depends on the type of functions that they provide. Some OSs are meant for managing networks.Some are found in petrol pumps.Some are found in electronic items in homes.Some are found in cars.Embedded devices are some examples as well.
Short Course 2003 8
IEE Sri Lanka
Dr. E.C. Kulasekere
What are General purpose/Dedicated OSs?
Windows operating systems.Many of the Unix operating systems.Embedded systems are not GP OSs.Firmware is also not GP.The characteristic of a GP OS is its ability to run many software on an application platform.
Short Course 2003 9
IEE Sri Lanka
Dr. E.C. Kulasekere
Some available operating systems.
MS-DOSWindows 9xWindows NTWindows XPWindows 200xUnix – SolarisUnix - Linux
Short Course 2003 10
IEE Sri Lanka
Dr. E.C. Kulasekere
Example OS: A security control
Short Course 2003 11
IEE Sri Lanka
Dr. E.C. Kulasekere
What support utilities are required by an Operating
System to perform its tasks?
Short Course 2003 12
IEE Sri Lanka
Dr. E.C. Kulasekere
What are programs?
A set of instructions for a specific platform?Byte code? Machine code?Programming languages (Compilers)Application softwareSpecial purpose software
Short Course 2003 13
IEE Sri Lanka
Dr. E.C. Kulasekere
What are input and output devices?
These are devices controlled by the operating system.Commonly found in most computer systems.Input devices: Keyboard, mouse tablet, sensors.Output devices: monitors, printers speakers, actuators.
Short Course 2003 14
IEE Sri Lanka
Dr. E.C. Kulasekere
What is a single user operating system?
All windows operating systems fall into this category.In essence, a single-user operating system provides access to the computer system by a single user at a time. If another user needs to access the computer resources, he/she has to wait until the current user departs.
Short Course 2003 15
IEE Sri Lanka
Dr. E.C. Kulasekere
What is a multi-user operating system?
It lets more than one user to access the computer system resources at one time.Access is provided via networks.
Short Course 2003 16
IEE Sri Lanka
Dr. E.C. Kulasekere
Multi-user ?
Short Course 2003 17
IEE Sri Lanka
Dr. E.C. Kulasekere
Issues raised by multi-user OSs.
System manages multiple requests to same resource concurrently.Should avoid deadlocks.Serial equipment (printers) hooked up to the multi-user OS should be queued.The OS simulates real time performance by task switching.
Short Course 2003 18
IEE Sri Lanka
Dr. E.C. Kulasekere
Operating system utilitiesThe OS is stored in the hard disk.The part relevant is loaded into RAM at the time of execution.Some of the utility programs of the OS are
Managing files and documentsDevelopment of programs and softwareCommunicating with other computer systems.Managing user requirements for programs, storage space and priority.
Short Course 2003 19
IEE Sri Lanka
Dr. E.C. Kulasekere
Operating system interfaces
This can be a basic command interpreter (SHELL) like the dos prompt or a Unix command window.Shell is also called the command line interpreter (CLI).The interface can be graphical as well.
X-Windows for Unix.Windows GUI
Short Course 2003 20
IEE Sri Lanka
Dr. E.C. Kulasekere
Advantages and problems of multi-user OSs
AdvantagesExpensive hardware can be shared.Better utilization of resources and less idle time for each resource.
ProblemsAs number of users increase the performance degrades.Some resources such as HD space can be expensive since a lot is needed.The software is more complicated making it expensive.
Short Course 2003 21
IEE Sri Lanka
Dr. E.C. Kulasekere
What is a multi-tasking OS?
Ability to run more than one program at a time.A requirement of a multi-user system.Simulates real time (Video games)Increases productivity but also increases coordination complexity.More resources required.
Short Course 2003 22
IEE Sri Lanka
Dr. E.C. Kulasekere
What are application software?Software is another word for program.Category of software that runs on an operating system platform.The operating system and nay associated software does not fall into the category of application software.Enhances the utility value of the operating system. Types: Business, Education, Entertainment, Utility.
Short Course 2003 23
IEE Sri Lanka
Dr. E.C. Kulasekere
ResearchArtwork
Fishing, coastal data Air control
Short Course 2003 24
IEE Sri Lanka
Dr. E.C. Kulasekere
Application Software (Cont …)
Hair dryer,Washing machine,
Kettle, ...
Short Course 2003 25
IEE Sri Lanka
Dr. E.C. Kulasekere
Summary of Definitions
Whether multiple programs can run on it simultaneously: multi-tasking or Single-tasking if notWhether it can take advantage of multiple processors: multi-processing Whether multiple users can run programs on it simultaneously: multi-user
Short Course 2003 26
IEE Sri Lanka
Dr. E.C. Kulasekere
Summary of definitions (Cont …)
Whether it can reliably prevent application programs from directly accessing hardware devices: protected Whether it has built-in support for graphics: GUI BasedWhether it has built-in support for networks: Networked
Short Course 2003 27
IEE Sri Lanka
Dr. E.C. Kulasekere
More classifications
Real-Time Operating System (RTOS): used to control machinery, scientific instruments and industrial systemsSingle-User, Single Task: to manage the computer so that one user can effectively do one thing at a time. Palm OS is an example
Short Course 2003 28
IEE Sri Lanka
Dr. E.C. Kulasekere
More classifications (Cont …)
Single-User, Multi-Tasking: use on their desktop and laptop operating systems today. Examples are windows based OSMulti-User: allows many different users to take advantage of the computer's resources simultaneously. Example can be UNIX.
Short Course 2003 29
IEE Sri Lanka
Dr. E.C. Kulasekere
It's important to differentiate here between multi-user operating systems and single-user operating systems that support networking.
Windows 2000 and Novell Netware can each support hundreds or thousands of networked users, but the operating systems themselves aren't true multi-user operating systems
Short Course 2003 30
IEE Sri Lanka
Dr. E.C. Kulasekere
Popular OS classificationUnix: multi-tasking, multi-processing, multi-user, protected, with built-in support for networking but not graphics. Windows NT: multi-tasking, multi-processing, single-user, protected, with built-in support for networking and graphics. Windows 95/98: multi-tasking, multi-processing, single-user, unprotected, with built-in support for networking and graphics.
Short Course 2003 31
IEE Sri Lanka
Dr. E.C. Kulasekere
Popular OS classification (Cont …)Windows 3.x: single-tasking, single-processing, single-user, unprotected, with built-in support for graphics but not networking. DOS: single-tasking, single-processing, single-user, unprotected with no built-in support for graphics or networking. NetWare: multi-tasking, multi-processing, single-user, unprotected, with built-in support for networking but not graphics.
Short Course 2003 32
IEE Sri Lanka
Dr. E.C. Kulasekere
UNIX: Most popular multi user OSSolaris, from Sun Microsystems. AIX, from International Business Machines (IBM). Digital Unix, from Compaq (which purchased Digital Equipment). IRIX, from Silicon Graphics (SGI) HPUX, from Hewlett-Packard. SCO, from the Santa Cruz Operation. FreeBSD, maintained by a group of individuals. OpenBSD, maintained by a group of individuals with a single coordinator. NetBSD, maintained by a Foundation incorporated in the state of Delaware. Linux, maintained by a loosely coordinated group of volunteers.
Short Course 2003 33
IEE Sri Lanka
Dr. E.C. Kulasekere
NT Based: Most popular single user OS
Developed and promoted by Microsoft.It is multi-taskingMulti-processorNetwork-awareUsed to provide:
Networked file system (NFS)Printer sharingRun shared application software.
Short Course 2003 34
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 2 Expectationslist four typical parts (modules) of an operating system.state three functions performed by a real-time executive.explain the difference between pre-emptive and co-operative switching.discuss the relationship between system performance and system overhead.identify the essential operations that need to be performed in order to switch from one program to another.
Short Course 2003 35
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 2 Expectations (Cont…)
define the terms context switching, system overhead, time-slice, quantum period and scheduling.distinguish between first-in first-out and round robin scheduling
Short Course 2003 36
IEE Sri Lanka
Dr. E.C. Kulasekere
What are the various parts of an OSReal time executive (kernel) is the part of the OS that is responsible for running and coordinating programs. Modularizing the OS helps coordination of programs in a multi-user environment. Typical modules:
KernelProcess managerSchedulerFile manager
Short Course 2003 37
IEE Sri Lanka
Dr. E.C. Kulasekere
What are the various parts of an OS (Cont …)
Short Course 2003 38
IEE Sri Lanka
Dr. E.C. Kulasekere
. . .CPU
memory
device device device
Operating system
utilitiesapplications
software
systemssoftware
hardwarecomponents
. . .CPU
memory
device device device
Operating system
utilitiesapplications
software
systemssoftware
hardwarecomponents
Short Course 2003 39
IEE Sri Lanka
Dr. E.C. Kulasekere
Kernel functionsSwitching between programs.Hardware device control and programming.Memory management.Process management.Scheduling.Inter-process communication.Processing of exceptions and interrupts.
Short Course 2003 40
IEE Sri Lanka
Dr. E.C. Kulasekere
How do OSs run more than one program at a time?
Single-user and multi-user OSs both can be multi-tasking.Single processor or multi processor systems can be multi-tasking.Simulating multi-tasking using
Co-operative switching.Preemptive switching
Short Course 2003 41
IEE Sri Lanka
Dr. E.C. Kulasekere
What is cooperative and preemptive switching?
Co-operative switching means that a task that is currently running will voluntarily give up the processor at some time, allowing other processes to run. Preemptive switching means that a running task will be interrupted (forced to give up) and the processor given to another waiting process.
Short Course 2003 42
IEE Sri Lanka
Dr. E.C. Kulasekere
Issues related to task switchingco-operative switching: one process could hang and thus deny execution of other processes, resulting in no work being done. Eg. Win3.1Pre-emptive scheduling gives more response to all processes and helps prevent (or reduce the number of occurrences of) the dreaded machine lockup. Eg. Win NT.
Short Course 2003 43
IEE Sri Lanka
Dr. E.C. Kulasekere
Issues related to task switching (Cont …)
Only 32-bit programs in Windows 95 are pre-emptive switched. 16-bit programs are still co-operatively switched, which means it is still easy for a 16-bit program to lock up a Windows 95 computer.
Advantages gained out weigh the disadvantages associated with switching.
Short Course 2003 44
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 3 Expectations
describe how an operating system is initially loaded.given a set of characteristics, determine the type of operating system as batch, real-time, time-sharing, interactive or embedded.state an example of a shell
Short Course 2003 45
IEE Sri Lanka
Dr. E.C. Kulasekere
How does an OS load itself?
It can be loaded in two ways:it is already present in ROM (so is permanent, immediately accessible and difficult to update). Eg. Petrol pumps, industrial controllers. Best suited for small and simple OS. it is loaded from disk to RAM when the computer is turned on. Eg. Win 9x. Easier to update and manipulate.
Short Course 2003 46
IEE Sri Lanka
Dr. E.C. Kulasekere
What is the bootstrap process?
describes the task of initially loading the operating system from disk into RAM.
Short Course 2003 47
IEE Sri Lanka
Dr. E.C. Kulasekere
What are the different types of OSs.
BatchInter-activeTime-sharing/multi-userMulti-taskingReal-timeMulti-processorEmbedded
Short Course 2003 48
IEE Sri Lanka
Dr. E.C. Kulasekere
What is a shell?A shell is a program that handles user input and output It provides routines for handling user input from a keyboard or mouse It provides routines for displaying information on the terminal screen.A shell also provides a mechanism to interpret user commands and run additional programs that users request
Short Course 2003 49
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 4 Expectationsdefine the terms file, cluster, inode, symbolic link describe a typical structure for the root file system list four typical entries for a root file entry explain how free space might be managed list the file systems supported by Windows
Short Course 2003 50
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 4 Expectations (Cont …)
describe what access or file control permissions are and why they might be needed explain how the file space may become fragmented, what effect this might have on performance, and how the problem might be corrected
Short Course 2003 51
IEE Sri Lanka
Dr. E.C. Kulasekere
File management
What is a file?What are the typical operations performed on files?How does the above operations different for single and multi user OS s?What are the security risks associated with file access?
Short Course 2003 52
IEE Sri Lanka
Dr. E.C. Kulasekere
What are file control blocks?
FCB is also called the file descriptor is a data structure.The FCB consists of the following:
Filename Location of file on secondary storage Length of file Date and time or creation or last access
Short Course 2003 53
IEE Sri Lanka
Dr. E.C. Kulasekere
Naming filesMS-DOS Uses eight character file names, a dot, then a three-character extension that denotes the type of file. Filenames are not case-sensitive.UNIX Filenames can be up to 254 characters long and are case-sensitive Windows Filenames can be up to 255 characters long and are not case-sensitive File types? Doc,txt and associated programs.
Short Course 2003 54
IEE Sri Lanka
Dr. E.C. Kulasekere
How does an OS keep track of files?
Is it different for single user and multi user systems?How does hardware such as HDs play a role here?As files are created, free sectors are allocated to hold the file contents and marked as allocated.Tables will keep track of the used sectors.
Short Course 2003 55
IEE Sri Lanka
Dr. E.C. Kulasekere
What is a root file system?
The root file system is a table of entries like a directory
Short Course 2003 56
IEE Sri Lanka
Dr. E.C. Kulasekere
How is free space managed?
Free space is unused clusters.Clusters can come in different sizes.How does sector size affect the free space available when the disk is in use?What is a linked list of clusters?What are FAT, FAT32 and NTFS file systems?
Short Course 2003 57
IEE Sri Lanka
Dr. E.C. Kulasekere
Access control and file permissions
In multi-user operating systems, files may be accessed by multiple users Permission rights associated with folders (directories) and files are used to protect or restrict access to files In UNIX this is a rwx format while in NTFS more permissions are available.
Short Course 2003 58
IEE Sri Lanka
Dr. E.C. Kulasekere
Other information
What is a symbolic link or short cut?How are they used in multi-user OS s?What is file system integrity?How can it be checked?Are they the same for UNIX and WINDOWS?
Short Course 2003 59
IEE Sri Lanka
Dr. E.C. Kulasekere
What is fragmentation?An OS reads data from HD in contiguous clusters more efficiently and faster than from non-contiguous clusters.
Short Course 2003 60
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 5 Expectations
List the system requirements for Windows 95, Windows NT and Windows 2000 Professional State the general features of Windows operating systems
Short Course 2003 61
IEE Sri Lanka
Dr. E.C. Kulasekere
Hardware requirementsSystem requirements for Windows 95
386DX or higher4MB memory or higher [8MB recommended]35-40MB disk space3.5" floppy drive or CD-ROM VGA or higher resolution graphics card
System requirements for Windows 98486DX/66MHz or higher 16MB memory or higher 195MB disk space CD-ROM VGA or higher resolution graphics card
Short Course 2003 62
IEE Sri Lanka
Dr. E.C. Kulasekere
Hardware requirements (Cont …)System requirements for Windows NT Workstation 4.0
16 MB RAM Recommended 486/25MHz or higher processor 110 MB available hard-disk space VGA, Super VGA, or video graphics adapter CD-ROM drive.
System requirements for Windows 2000 Professional133MHz Pentium compatible processor 64MB RAM 2GB Hard disk with 650MB available free space Single or dual processor systems
Short Course 2003 63
IEE Sri Lanka
Dr. E.C. Kulasekere
What to look for in the previous slidesThe resource requirements increase.The resource requirements will be higher for a multiple user system.The resource constraints are not a problem in UNIX multi-user systems.Increase in efficiency of operation as the operating system improves.The graphical requirements as the operating system improves hog a lot of resources.
Short Course 2003 64
IEE Sri Lanka
Dr. E.C. Kulasekere
More advance topics in
Operating Systems
Short Course 2003 65
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 6 Expectations
explain what a process is and how an operating system manages each process identify the relationships between the three process states list four items associated with a process control block define the terms thread, process, critical section and semaphore
Short Course 2003 66
IEE Sri Lanka
Dr. E.C. Kulasekere
Chapter 6 Expectations (Cont …)
illustrate how access to a shared resource can be controlled using a semaphore discuss the problems associated with critical sections explain the difference between a foreground and a background task
Short Course 2003 67
IEE Sri Lanka
Dr. E.C. Kulasekere
What is a process?A process or task is a portion of a program in some stage of execution.A process can be periodically communicating with each other as well.Each process has a unique PCB.The process priority is used to determine how often the process receives processor time.How does this scheduling occur? Or priority increase?
Short Course 2003 68
IEE Sri Lanka
Dr. E.C. Kulasekere
What about process states?
Some possible states are:ready - if it can run when the processor becomes free.running - it currently has the processor.blocked - it cannot run when the processor becomes free
Running processes are interrupted to change state. The PCB is saved to recall it back.
Short Course 2003 69
IEE Sri Lanka
Dr. E.C. Kulasekere
What is a PCB?
The data structure for a PCB containsthe location in memory of where the process is.the priority of the process a unique process identification number (called PID) the current process state (ready, running, blocked) associated data for the process
Short Course 2003 70
IEE Sri Lanka
Dr. E.C. Kulasekere
Process synchronization
Problems associated with synchronization.Semaphore method.Critical section method.Use of synchronization in single user systems and multi user systems.Deadlock.