Objectives of this lecture
Learn what an Operating system (OS) is Differentiate between single user and multi-user OS Differentiate between Batch and Time Sharing OS Learn about Scheduler and Scheduling Algorithms Protection and Security What is an operating system
Is a set of programs that lies between applications a software and computer hardware
a resource manager, with more multiple users using the system efficient and correct use of the available resources is conducted by the operating systems.
Users
Application Programs
Computer Hardware
Operating system
Clients or users (e.g., people, machines, other computers) trying to use the resources to solve problems Application programs (e.g., text editors, compilers, video games, databases, business software) which define how the resources can be used to solve computing problems An operating system (OS) (a computer program) which acts as an intermediary between the users and the hardware. The purpose of the OS is to provide an environment for a user to execute programs conveniently and efficiently A computer hardware (consisting of CPU, Memory, I/O devices) which provides the basic computing resources.
Evolution of Operating Systems
Before compilers were developed: programmers had to reserve a computer in order to use it. programs had to be manually loaded into memory by the programmers physical switches and display lights were used to monitor program execution
Early FORTRAN, COBOL and other compilers:
programming made much easier which is a good thing however, the problem of operating the computer was not solved for example, since application programs were normally kept on tapes, one had to take the following steps to run a FORTRAN program (at that time): i. mount the FORTRAN compiler tape on the tape drive in order to load the compiler ii. read the program through the card reader and write it onto another tape iii.load an assembler tape to assemble the assembly code from the FORTRAN compiler iv. link the assembled code with other library routines, load the program to memory and run CPU idle-time problems the process above of loading, compiling and executing a program is called set-up time notice that the CPU remains idle during this process, which is highly undesirable. Why? professional computer operators (rather than programmers themselves) were hired to improve computer utilization a drawback of computer operators is that they may not be able to debug users' programs. Reducing set-up time: (batch processing) …the first operating systems Batch processing is the process of grouping programs with similar requirements (e.g., programs requiring a FORTRAN compiler) and running them through the computer as a group. Batch processing reduces set-up time but does not eliminate it; we still need a more effective way of minimizing this further Are the first operating systems The user submit a job (written on card or tape) to a computer operator The computer operator place a batch of several jobs on a input device A special program, the monitor, manages the execution of each program in the batch Resident monitor is in main memory and available for execution Monitor utilities are loaded when needed The Monitor Monitor reads jobs one at a time from the input device A monitor instruction branches to the start of the user program Execution of user pgm continues until: end-of-pgm occurs or error occurs Causes the CPU to fetch its next instruction from Monitor
Third generation computers, Characterized by Ics (1965-1980): Multiprogramming
The most representative machine of this generation is IBM 360, which has combined the numeric and non-numeric applications in one machine.
The operating systems were written in assembly language and have soon become very bulky as they have to work both on newer as well as older systems.
One important break from the second generation was “multiprogramming” which was very important for the utilization of the machine. The CPU could be multiplexed between the programs residing in the memory. When one tied up with IO, the other would be tied up with execution.
Another important characteristic of the third generation is “SPOOLING”, which comes from “simultaneous peripheral operation on line.” The job flow from card readers to disk, IO from/to disk, print-out from disk to printers could take place concurrent with CPU operation.
The desire for quick response time speeded up the birth of “timesharing” systems. This has made interactive on-line of systems order of the day.
Examples: IBM 360, 370, 43xx, and 30xx series.
Fourth generation (1980- ): Personal Computers: Workstations and Distributed Systems
Chip technology (development in LSI) allowed mass production, thus the present state of cheap but powerful computers finding their way to homes as well as offices.
The dominant operating systems: UNIX, NT, WindowsXX, etc.
Networking (TCP/IP) allowed operating systems like UNIX to evolve into network operating systems, in network environment.
Distributed operating systems: Multiple processors will appear one single system to the user.
(still to come!), distributed computing, parallel computing, very high speed communication (order of many giga bits per second), www, mobile systems
Multi-User Time Sharing OS
multi-user OS were developed in the 1960s as a result of the high cost of single computers multi-user OS (e.g UNIX ) allow several users to run the same computer at the same time multi-user OS are said to operate in a time-shared environment because they allow the processing power of of the CPU to be shared by many users They are also multi-tasking as they allow more than one tasks to be processed at the same time on the same computer a multi-user OS consists of two main software components called the scheduler and the dispatcher the scheduler arranges the order in which commands are executed on the computer. The dispatcher gives control of the CPU to a job already scheduled by the scheduler the OS also acts as a resource allocator for both hardware and software by managing memory and file spaces, managing requests for CPU and I/O usage etc.
Multiprogramming: Is running two or more programs in the same time frame, concurrently, on the same computer. Multiprogramming is event-driven, meaning that one program is allowed to use a particular resource( such the CPU) to complete a certain activity(event)before relinquishing the resource to another program. In multiprogramming, the operating system uses interrupts, which are signals that temporarily suspend the execution of individual programs.
Multiprocessing: means that a computer with more than one central processing unit can run multiple programs simultaneously, each using its own processor
Time-sharing is a special case of multiprogramming in which several people use one computer at the same time.
Time-sharing is time-driven..each user is given a time slice in which the computer works on that user’s tasks before moving on to another
User tasks.
Functions of the Operating system:
Mange the computer’s resource, such as the PCU, memory, Disk Drive, printer.
Establish a user interface
Execute applications
CPU scheduling: how to serve the program execution (batch, multiprogramming, timesharing, real time)
Memory management: how to allocate the memory
Swapping: how to move data between the main memory and secondary storage
I/O device drivers: how to operate I/O devices
File system: organize mass storage (disk) into files and directories
Utilities: date/time, accounting, file copy, etc.
Command interpreter: allow users to enter commands interactively
System calls: allow user programs access to OS services
Protection: keep processes (and users) from interfering with each other and system
Communication & Resource sharing: allow users/ processes to communicate (within a computer or over networks) and share resources (e.g. laser printers, disks, etc.)
Security: protect machines from intruders and unauthorized people.
Scheduling Algorithms
scheduling is the process of selecting a program from the ready queue that will take control of the CPU in other words, a scheduling algorithm determines access to the CPU clearly, there are many possible job scheduling arrangements e.g., is a scheme which allows every job to execute to completion before the next job starts? a preemptive algorithm allows a job to be stopped after executing for some time or because a higher priority job has arrived. A Nonpreemptive algorithm does not allow such stoppage. FIFO, priority (e.g., shortest-job-first (SJF)) algorithms etc
Protection and Security
a multi-user, time-shared and interactive OS is more complex than a batch processing, single-user OS. Why? resource allocation in a single-user system is relatively simple although it needs to keep mutiple tasks from interfering with each other, too an important consideration in a multi-user OS is the necessity to protect the integrity of the system and of the users of the system as well an OS can implement computer security by allowing access to only authorised users protection is the method or how the system is guarded and security is the measure of protection taken to provide who has the right to access the system in other words, protection is the mechanism for controlling the access of programs, processes, or user to the resources defined by a computer system. protection can improve reliability by detecting errors
Share with your friends: |