Software: The Operating System (OS) <ul><li>Software  is another term for computer program.  </li></ul><ul><li>The  operat...
OS Development - History <ul><li>Computers and Operating Systems: Shared History </li></ul><ul><li>Early OS were not desig...
OS Development - History <ul><li>The Unix Operating System </li></ul><ul><li>In the 1970’s a new operating system called  ...
OS Development - History <ul><li>PC Operating Systems </li></ul><ul><li>In the microcomputer world, the  MS-DOS  operating...
OS Components <ul><li>User Interface </li></ul><ul><ul><li>Allows you use the computer </li></ul></ul><ul><li>Program Exec...
OS Components <ul><li>Memory Management Subsystem </li></ul><ul><li>Arranges for programs to share memory. For example, a ...
OS Components: Memory Manager
OS Components: Memory Management <ul><li>A fundamental problem with computing systems is the lack of sufficient RAM capaci...
OS Components:  Virtual Memory <ul><li>A virtual memory system employs disk storage to provide the  illusion  that a machi...
OS Components: Virtual Memory
OS Components: Booting a Computer <ul><li>The question arises as to how the operating system gets started? Remember, this ...
OS Components: Booting a Computer <ul><li>The operating system code is stored on disk.  </li></ul><ul><li>The ROM program ...
OS Components: Programming Support <ul><li>In order to write programs, language translators such as  compilers ,  interpre...
Review Questions <ul><li>What is an OS ? </li></ul><ul><li>What are the main components of an OS ?  </li></ul><ul><li>Name...
Upcoming SlideShare
Loading in …5
×

Comp10080 Os L12

226 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
226
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Comp10080 Os L12

  1. 1. Software: The Operating System (OS) <ul><li>Software is another term for computer program. </li></ul><ul><li>The operating system is important software that comes with your computer </li></ul><ul><li>There is a whole field of computer science concerned with the study of operating systems </li></ul><ul><li>Definition: The operating system is the software that enables you use a computer </li></ul><ul><li>An operating system manages both the computer's hardware and software for you. </li></ul><ul><li>It allows you use the computer by providing a user interface which enables you give the computer commands. There are 2 kinds of user interface: </li></ul><ul><li>Graphical user interfaces (GUIs) dominate. A GUI allows you use a mouse to select commands from menus usually displayed in windows on the screen. </li></ul><ul><li>MS-Windows and the Macintosh operating system (Mac OS) interface are widely used GUIs </li></ul><ul><li>A command interpreter is a user interface program that displays a prompt on the screen and the user enters a command using the keyboard. </li></ul><ul><li>Note that many systems provide both GUIs and command interpreters. So, on a Unix system, you may use the Unix command interpreter or a windows-based GUI - e.g. X-windows . On a personal computer you may to choose to use MS-Windows or Command Prompt. </li></ul>
  2. 2. OS Development - History <ul><li>Computers and Operating Systems: Shared History </li></ul><ul><li>Early OS were not designed as such - software was developed as the need arose and eventually OS systems “emerged” </li></ul><ul><li>Numerous different types of computers were manufactured by many computer companies </li></ul><ul><li>Each manufacturer’s hardware was different from that of their competitors. </li></ul><ul><li>For this reason, traditionally, each computer type had its own unique operating system developed for it. </li></ul><ul><li>This is because the operating system was totally dependent on the hardware of the computer it was to manage. </li></ul><ul><li>The operating system could only be used on the particular machine it was designed for. </li></ul><ul><li>This meant that if you bought a different type of computer, you had to learn how to use a new operating system. </li></ul><ul><li>While this may have suited manufacturers, who did not want you to buy a competitor's machine, it certainly did not suit users. </li></ul><ul><li>For example, Digital developed the VMS operating system for their VAX range of computers and IBM developed the MVS , VM and other operating systems for their mainframe series of computers. </li></ul>
  3. 3. OS Development - History <ul><li>The Unix Operating System </li></ul><ul><li>In the 1970’s a new operating system called Unix was developed at Bell Labs. </li></ul><ul><li>Unix was designed to be a portable . </li></ul><ul><li>This meant that it could be moved from one type of computer to another different type of computer which used different hardware, without too much difficulty. </li></ul><ul><li>Unix has to be tailored for each machine, but it is designed to make this tailoring relatively straightforward </li></ul><ul><li>By the late 1980's, Unix had been implemented on every common make of computer, from the Digital VAX to IBM mainframes, from the humble microcomputer to powerful supercomputers </li></ul><ul><li>It is the only operating system that has been implemented on such a diverse range of hardware platforms. </li></ul><ul><li>As a result, Unix and more often Linux (a variant of Unix) is now one of the most commonly used operating systems in the world </li></ul><ul><li>It is very commonly used by Computer Scientists </li></ul><ul><li>Linux is free and comes with a wealth of software and software development tools: E.g. Open Office is a free “version” of MS Office </li></ul>
  4. 4. OS Development - History <ul><li>PC Operating Systems </li></ul><ul><li>In the microcomputer world, the MS-DOS operating system was very widely used on IBM microcomputers ( PC s) and their clones in the 1980s. </li></ul><ul><li>When IBM introduced their PC to the market in the early 1980s, many of their competitors in effect copied the machine producing IBM compatibles or clones. </li></ul><ul><li>Their competitors then acquired the same operating system for the clones, from a company called Microsoft who had developed the operating system for IBM! </li></ul><ul><li>The IBM PC operating system was called PC-DOS while that of its clones was called MS-DOS. For practical purposes they were almost identical. </li></ul><ul><li>MS-DOS became the most widely used operating system in the 1980/90s since there were hundreds of million PCs in use around the world using MS-DOS. </li></ul><ul><li>In the mid-1980s Apple developed the Macintosh with a successful GUI based on one developed by Rank Xerox . </li></ul><ul><li>The Macintosh GUI with its WIMP (Windows, Icons, Mouse, Pull-down menus) technology introduced GUIs as the design paradigm of choice </li></ul><ul><li>Microsoft superseded MS-DOS by their Windows (GUI-based) operating system. Numerous versions of Windows have been released over the years: e.g. Windows 95, Windows 98, Windows ME, Windows 2000, Windows NT and Windows XP. Windows Vista was released released in 2007. </li></ul>
  5. 5. OS Components <ul><li>User Interface </li></ul><ul><ul><li>Allows you use the computer </li></ul></ul><ul><li>Program Execution Subsystem </li></ul><ul><ul><li>Allows you run programs </li></ul></ul><ul><ul><li>Manages the computers memory </li></ul></ul><ul><li>Filing Subsystem </li></ul><ul><ul><li>Allows you save/retrieve files on disk </li></ul></ul><ul><ul><li>Manages disk storage (CD/DVD) </li></ul></ul><ul><li>I/O Subsystem </li></ul><ul><ul><li>Carries out ALL I/O for ALL programs </li></ul></ul><ul><ul><ul><li>Reads from keyboard </li></ul></ul></ul><ul><ul><ul><li>Displays information on screen </li></ul></ul></ul><ul><ul><ul><li>Reads/Writes files </li></ul></ul></ul>
  6. 6. OS Components <ul><li>Memory Management Subsystem </li></ul><ul><li>Arranges for programs to share memory. For example, a multi-user system running 4 user programs, might have its memory shared as illustrated in the figure below </li></ul><ul><li>A memory map as shown in the figure is a simple illustration of how memory is allocated </li></ul><ul><li>Note that the operating system itself is a program and so it must also be stored in memory and that it occupies a significant portion of memory </li></ul><ul><li>It also occupies a significant amount of disk storage space </li></ul><ul><li>It is important to be aware of the fact that the operating system, in managing the computers resources, uses a significant amount of those resources itself. </li></ul><ul><li>The resources are CPU time, memory space and disk storage space </li></ul>
  7. 7. OS Components: Memory Manager
  8. 8. OS Components: Memory Management <ul><li>A fundamental problem with computing systems is the lack of sufficient RAM capacity to store very large programs or a large number of programs </li></ul><ul><li>As RAM capacity increases (doubles every 1.5 years approximately), so too, does program size , including the size of the operating system. </li></ul><ul><li>A simple solution to this problem is to use disk storage to store portions of programs not currently required by the processor and to swap information between disk and RAM as it is required by the processor . </li></ul><ul><li>The disadvantage of this solution is that it slows down program execution time given the time it takes to access disk storage (100,000 times slower than accessing RAM). </li></ul><ul><li>One strategy called swapping , swaps entire programs between disk and RAM for execution. </li></ul><ul><li>When a program has been swapped into RAM it can execute for a while and it is swapped out to disk and the next program is swapped into RAM. </li></ul><ul><li>This allows you execute many more programs than you have RAM capacity to cater for. </li></ul><ul><li>However, swapping does not allow you write programs larger than the available RAM </li></ul><ul><li>Virtual Memory ( which also uses disk storage) solves this problem </li></ul>
  9. 9. OS Components: Virtual Memory <ul><li>A virtual memory system employs disk storage to provide the illusion that a machine has a very large RAM which is called its virtual memory . </li></ul><ul><li>In this manner, a machine which has say 256 megabytes of actual RAM, can operate, as is if it had several gigabytes of RAM </li></ul><ul><li>The trick is to store much of the information on disk and copy it into RAM as it is required . </li></ul><ul><li>The operating system and memory management hardware keeps track of what is stored in RAM and what is stored on disk, transferring information from disk as it is required. </li></ul><ul><li>Information is usually transferred in small units called pages , the technique being referred to as paging . </li></ul><ul><li>Virtual memory may be visualised as a large linear address space, much larger than the actual physical address space, as illustrated in the figure below </li></ul><ul><li>A mapping function is required to map addresses between the two address spaces </li></ul>
  10. 10. OS Components: Virtual Memory
  11. 11. OS Components: Booting a Computer <ul><li>The question arises as to how the operating system gets started? Remember, this is the software that allows you use the computer </li></ul><ul><li>In order for any program to execute, it must be in the computers memory. But the RAM of a computer loses its contents when the computer is switched off </li></ul><ul><li>How then is the operating system loaded into RAM and executed when a computer is switched on? </li></ul><ul><li>The answer lies in using Read-Only Memory or ROM which retains its contents permanently </li></ul><ul><li>The operating system itself is not stored in ROM. There is normally only a very small amount of ROM available and it would not be large enough to hold an operating system </li></ul><ul><li>Also, since its contents cannot be modified, it would not be possible to correct any errors (bugs) in the software that unfortunately arise in complex programs like operating systems. Thus it would not be a good idea to store the operating system in ROM, even if it was possible </li></ul><ul><li>Instead, what happens is that a small program is stored on the ROM which is used to get the operating system loaded and executed </li></ul>
  12. 12. OS Components: Booting a Computer <ul><li>The operating system code is stored on disk. </li></ul><ul><li>The ROM program loads a part of the operating system, called the bootstrap program from a fixed location on disk (called the boot block ) into RAM and switches control to this program. </li></ul><ul><li>This bootstrap program in turn loads the rest of the operating system from disk into RAM and switches control to it. </li></ul><ul><li>This process is called bootstrapping ( booting ) after the notion of pulling yourself up by your boot laces! </li></ul><ul><li>One advantage of this technique, is that it means that the same computer can use a different operating system by placing an appropriate bootstrap program in the boot block for the operating system you wish to boot up. </li></ul><ul><li>In addition, the ROM contains self-test code to ensure that the hardware is functioning properly when the machine is switched on. This code is called power-on self test code ( POST code) </li></ul>
  13. 13. OS Components: Programming Support <ul><li>In order to write programs, language translators such as compilers , interpreters and assemblers are required. </li></ul><ul><li>These translators have to have knowledge of the operating system in order to produce machine code programs that can be executed by the operating system. </li></ul><ul><li>In addition programs called linkers and loaders are used to allow external subprograms such as library functions and system calls to be invoked from a program. </li></ul><ul><li>Linkers and loaders arrange for the external subprograms to be integrated with a program and look after the loading of the program into a suitable area of memory. </li></ul><ul><li>Such software may come with an operating system or be purchased separately. In either case, it is essential to have such software if users intend to write computer programs </li></ul><ul><li>Linux provides a range of compilers and interpreters e.g. C compiler, Perl interpreter. </li></ul>
  14. 14. Review Questions <ul><li>What is an OS ? </li></ul><ul><li>What are the main components of an OS ? </li></ul><ul><li>Name 3 Operating Systems including at least one non-MS OS </li></ul><ul><li>What is Virtual Memory and why is it used ? </li></ul><ul><li>Can a CPU run 2 programs at the same time ? </li></ul><ul><li>What is a GUI ? What does WIMP mean ? </li></ul><ul><li>What is a command interpreter ? </li></ul><ul><li>Explain what happens when a computer is booted up. </li></ul><ul><li>Why is Rom required for booting ? </li></ul>

×