Operating Systems Lecture Notes PDF
Document Details
Dr. Arwa E. Abulwafa
Tags
Summary
These lecture notes provide a comprehensive overview of operating systems. Topics covered include different types of operating systems, system components and different functions. The document details concepts such as hardware, software and user interactions.
Full Transcript
Dr. Arwa E. Abulwafa Introduction File System Management Storage Management Process Management CPU Scheduling Threading Memory Management Virtual Memory Management 2 Lecture (1) 4 Hardware Includes; Input Units, CPU, Output Units and Secondary...
Dr. Arwa E. Abulwafa Introduction File System Management Storage Management Process Management CPU Scheduling Threading Memory Management Virtual Memory Management 2 Lecture (1) 4 Hardware Includes; Input Units, CPU, Output Units and Secondary Storage Examples; Monitor, Keyboard, CPU, Disks, Memory, etc. Software Includes Operating Systems, Application Programs and Compiler and Interpreters. Users The users who use the overall computer system. 5 Application Programs are those programs that you can install in your computer to perform a specific task. These are usually written in high-level languages, such as Python, Java and C++. Examples: Web Browsers, Email, Word, Excel, different Editors, Games etc. 6 7 8 Input Units: Used to input data and instructions to memory Examples; keyboard, mouse, scanner, microphone, camera, etc. Output Units: Used to display the output Examples; printer, monitor, speaker, etc. Main Memory: RAM: to store user’s programs and data. ROM: to store fixed programs used by the computer. Cache Memory: used to increase processor speed. 9 Control Unit: Used to control the sequence of operations. It receives instructions or information directly from the main memory. Processor: Used to perform the required task by the Arithmetic and Logic Unit (ALU). Secondary Storage Unit: Used to store data permanently. Examples; hard disk, optical disk and floppy disk. 10 Arithmetic and Logical Unit (ALU) The arithmetic and logical unit is the combinational digital electronic circuit that can perform arithmetic operations on integer binary numbers and also perform logical operation. The outputs of ALU will change asynchronously in response to the input. 11 It is the Primary Storage and also known as the Main Memory and is the memory directly accessible by the CPU. Types: RAM It is Random Access Memory. It is volatile i.e. it loses its contents when power is off. Can be modified by the user It is quite fast. It is also quite expensive. 12 ROM It is Read Only Memory. It is a Non Volatile; it cannot be changed, it can only be read as required. It contains fixed programs used by the computer, like the system boot program. Cache Memory It is a memory inside the processor chip. Used to store frequently used data. Used to increase the processor speed. 13 Secondary Storage Units are the units used to store data permanently, and are not directly accessible by the CPU. Types: 14 Magnetic Disk: A surface of metal (in case of Hard Disk) or plastic (in case of Floppy Disks) coated with magnetic material. It rotates with a high speed. It is divided into tracks and sectors. Magnetic Disks may be: Hard Disk: large size (120 Giga Byte) and fixed. Floppy Disk: small size (1.44 Mega Byte) and movable. 15 Magnetic Tapes: Used to store large volume of data in large computers like; mainframes for long time. Consists of a plastic film coated by magnetic material. Advantages: Compact (can store huge amount of data). Economical (low cost). No loss of data. Disadvantages: Sequential storage. 16 Compact Disks (CD/ROM): CD/ROM (Compact Disk/Read Only Memory). A plastic surface coated by a reflective material. A laser beam is used to write on CD/ROM. It can store up to 600 Mega Byte. 17 Another Types: Flash Drive This is also known as a pen drive. It helps in easy transportation of data from one system to another. A pen drive is quite compact and comes with various features and designs. Memory Card This has similar functionality to a flash drive but is in a card shape. It can easily plug into a port and removed after its work is done. A memory card is available in various sizes such as 8MB, 16MB, 64MB, 128MB, 256MB etc. 18 It is the program running all the time on the computer to communicate all computer components (usually called Kernel). It does not perform a useful task by it self, but it creates a suitable environment so that other programs can operate efficiently. OS Goals: Convenient for the user. Efficient for the system components. 19 Spooling (Simultaneous Peripheral Operation On-Line) It is a way to process data serially. Example; printer; it can receive more than one print request, so the operating system uses what is called the Print Spooler, which puts those requests in a queue and executes them sequentially (first, second, third, etc.) 20 Batch System. Multi-Programming System. Multi-Tasking (Time Sharing) System. Multi-Processor (Parallel) System. Network Operating Systems. Real-Time Systems. 21 Users send their jobs to the computer operator. Operator organize jobs into a set of batches (each contains similar jobs). Each batch runs separately as a set of jobs. Examples; Payroll Systems, Bank Statements, etc. 22 This system is one of the oldest types of systems, as there is no direct interaction between the user and the computer. The user sends the job to be executed to a person who operates the computer, called an operator, who collects the jobs of all users and classifies them into batches, so that each batch contains a group of similar jobs that are executed on the computer as a single batch. 23 A number of processes are in memory inside the ready queue waiting for the CPU (there is one user). Example; Windows OS. In this system, there are many processes inside the computer that are ready to be executed inside what is called Ready Queue. Thus, the CPU distributes its time among those processes which are for one user. 24 25 Allow a number of users to share the CPU in the same time. This concept is used in the mainframe computers. In this system there are many users so the processor distributes itself among these users so that it serves them all at the same time. Examples; IBM VM/CMS TSO (Time Sharing Option) Windows Terminal Services 26 27 It is a system with more than one processor to maximize the system speed. This system is characterized by the presence of many processors, and thus the user's active processes are distributed among those processors, which increases the speed of completing those processes. 28 29 Systems that operate networks in order to achieve: Resource sharing. Computation speedup. Load balancing. Communication between hosts. This type is a network management and operation system that relies on many network management protocols such as the TCP/IP protocol used in managing the Internet. 30 Systems that performs critical tasks. Real-time Systems are systems that are sometimes required to perform critical tasks that do not require delay in execution, such as operating systems for surgical devices, satellite control devices, or robot operating systems. These critical tasks need to be executed on time, and any delay in them can expose the entire system to collapse. 31 There are two types: Hard Real Time Systems: critical tasks must be performed on time. Soft Real Time Systems: critical task may be a little late without any effect, But, it must get priority over other tasks. 32 Examples: Scientific Experiments, Medical Imaging Systems, Industrial Control Systems, Weapon Systems, Robots, Air Traffic Control Systems, etc. 33 Different activities supported by modern OS are: Process Management Memory Management File Management Storage Management I/O Management Protection Management Networking Management 34 It is a program introduced by the company that produce the hardware, so that the operating system can communicate with the hardware. 35 There are two types of programming languages: High Level Languages: Similar to natural languages. Need Compilers (or Interpreters) to be converted to machine language. Example; Visual Basic, Java, C, etc. 36 There are two types of programming languages: Low Level Languages: Similar to machine languages. Need Assemblers to be converted to machine language. Example; Assembly Language. 37 Both Compilers and Interpreters are used to convert the programs written in high level languages to the machine languages. But there are some differences between them as following: Interpreters convert the program written in high level language to language line by line. Compilers convert the whole program written in high level language to machine language in one step. 38 Compiler Interpreter Compiled code run faster Interpreted code run slower Compiler displays all errors and The interpreter reads a single warning at the compilation time; statement and shows the error if Therefore, you can’t run the any; therefore you must correct program without fixing errors the error to interpret next line. It takes an entire program It takes a single line of code. It generates intermediate It never generate any machine code. intermediate machine code. Display all errors after Displays all errors of each line compilation, all at the same time. one by one. C, C++, C#, Scala, Java. PHP, Perl, Ruby. 39 Input Source Target Compiler Program Program Error messages Output Source Program Interpreter Output Input Error messages 40 Interpreter 41 Compiler 42 There are plenty of Operating Systems available in the market which include paid and unpaid (Open Source). Following are the examples of the few most popular Operating Systems: Windows: This is one of the most popular and commercial operating systems developed and marketed by Microsoft. It has different versions in the market like Windows 8, Windows 10, etc. and most of them are paid. 43 Linux: This is a Unix based and the most loved operating system first released on September 17, 1991 by Linus Torvalds. Today, it has 30+ variants available like Fedora, OpenSUSE, CentOS, Ubuntu, etc. Most of them are available free of charges though you can have their enterprise versions by paying a nominal license fee. Mac OS: This is again a kind of Unix operating system developed and marketed by Apple Inc. since 2001. 44 iOS: This is a mobile operating system created and developed by Apple Inc. exclusively for its mobile devices like iPhone and iPad etc. Android This is a mobile Operating System based on a modified version of the Linux kernel and other open source software, designed primarily for touchscreen mobile devices such as smartphones and tablets. Some other old but popular Operating Systems include Solaris, VMS, OS/400, AIX, z/OS, etc. 45 Operating Systems have been evolving through the years. In the 1950s, computers were limited to running one program at a time like a calculator, But later in the following decades, computers began to include more and more software programs, sometimes called libraries, that formed the basis for today’s operating systems. The first Operating System was created by General Motors in 1956 to run a single IBM mainframe computer, its name was the IBM 704. IBM was the first computer manufacturer to develop operating 46 systems and distribute them in its computers in the 1960s. There are few facts about Operating System evaluation: Stanford Research Institute developed the ON-Line System (NLS) in the late 1960s, which was the first operating system that resembled the desktop operating system we use today. Microsoft bought QDOS (Quick and Dirty Operating System) in 1981 and branded it as Microsoft Operating System (MS- DOS). As of 1994, Microsoft had stopped supporting MS-DOS. 47 Unix was developed in the mid-1960s by the Massachusetts Institute of Technology, AT&T Bell Labs, and General Electric as a joint effort. Initially it was named MULTICS, which stands for Multiplexed Operating and Computing System. FreeBSD is also a popular UNIX derivative, originating from the BSD project at Berkeley. All modern Macintosh computers run a modified version of FreeBSD (OS X). 48 Windows 95 is a consumer-oriented graphical user interface-based operating system built on top of MS-DOS. It was released on August 24, 1995 by Microsoft as part of its Windows 9x family of operating systems. Solaris is a proprietary Unix operating system originally developed by Sun Microsystems in 1991. After the Sun acquisition by Oracle in 2010 it was renamed Oracle Solaris. 49 50