440 likes | 805 Vues
System Software. Grade 12 Computer Studies HG. Computer Overview. Computer. Hardware. Software. System Software. Application Software. Operating Systems. System Utilities. Computer Software. Computer software can be divided into two categories:
E N D
System Software Grade 12 Computer Studies HG
Computer Overview Computer Hardware Software System Software Application Software Operating Systems System Utilities
Computer Software • Computer software can be divided into two categories: • Application Software – this is software that aids the user in performing a specific task e.g. word-processors or media players. • System Software – this is software that controls, manages, supports and maintains the hardware of the computer.
Plan of Action • We’ll first discuss operating systems and all the wonderful things that go with them. • And then we’ll enter the wonderful world of system utilities.
Definition of an Operating System • “A operating system is a suite of software which manages the hardware and software of the computer.” • This means that the OS decides which applications run and when they run as well as which hardware is used by these applications. • It also implies that the OS is responsible for ensuring that applications all run effectively and efficiently and that they have the resources they require to execute.
Why do we need Operating Systems? • In the beginning… • There was only hardware. • If you wanted to use a computer you would need to have intricate knowledge of how the electronics of that hardware worked. • Then IBM created machine language • Computers understand machine language and a programmer can give the computer instructions in machine language. • However this was also nearly impossible for the average person to comprehend
Still haven’t answered the question! • Operating Systems were created in order to “abstract” the user from the complex-ities of hardware and programming. • The idea is that the user needs to know nothing about the hardware or program-ming in order to use the computer. • So… average users can click use applications and the operating system will ensure that the program runs!
Software Interaction Diagram • Software can be seen as having different layers. You don’t need to know how a lower layer works in order to use a higher one! Application Software System Utilities Operating System Computer Hardware
Reality Check • The modern computer is not usually doing one job! It often is doing hundreds of things that keep your computer running. These tasks appear to the user as if they are happening all at once. • In addition users take it for granted that things happen relatively safely and without errors. This is also untrue!
Development of Operating Systems • It is important to understand how the operating system developed. • If we know how the operating system developed we can better understand the needs of previous computers and thus understand why they decided to incorporate certain features which are still in today’s operating systems
Back in the day… • This is how people used to run a program on a computer: • The programmer coded her/his program on coding sheets. • These coding sheets were then typed out onto punch cards. • The punch cards were fed into the machine and the job was processed. • The printed output was then taken back to the programmer. • If something was wrong with the output the programmer would have to recode his program from scratch.
The OS Dream • The dream that developers had from the very beginning was to create an computer system which could: • Be used without expert knowledge • Perform fundamental tasks in the background that could keep the computer operational • And at the “same time” execute programs on behalf of the user • As well as provide a means that the user could input data and get meaningful output from the computer • Many would say we all use such a computer system everyday. Has the dream already come true? Or are we still dreaming?
Development #1:The Batch System • At first computers could only process one job and then another job had to be programmed into the computer. • The first major development was the batch system. • The batch system allowed a number of jobs to be stored on a magnetic tape. The computer would complete the jobs in the order that they were stored on the tape. • Once a job was completed it would move on to the next job on the tape.
Batch Systems Today • Batch systems are stilled used today. • The term is used to refer to any set instructions that can be processed without user intervention. • “Batch” means “many” or “a whole lot” • So if you were to execute a batch of jobs you would be instructing the computer to perform a bunch of operations.
Development #2:Multiprogramming • There were often huge delays while data was read in from magnetic tapes. • The ideal situation was to keep the CPU busy at all times. • The technique that was developed was called multiprogramming. • Multiprogramming is a variety of techniques that allow the computer to share its hardware resources between several independent jobs . • This meant that the computer could give it’s “attention” to whatever user/job needed it.
Development #3:User Interface • Once all these nifty features had been added programmers got bored and decided to do something fun. • So they started developing different user interfaces. • These interfaces started out as text-based systems where users had to type commands they wanted to computer to execute. • Interfaces evolved into what we have today. GUI (Graphical User Interfaces). • GUI’s consists of graphical objects that can be utilised and manipulated in order to perform a task. • GUI’s are necessarily easy to use! A lot of programs don’t behave in a logical intuitive manner (MS Word!).
Features of Modern Operating Systems • What should modern operating systems be able to do? • Users have come to expect certain basic functionalities of a computers operating system. We’ll have a look at what these features are in no particular order. • Coincidentally Windows usually never includes any of these pertinent features yet everyone uses it.
Feature #1:Error Handling • When an error occurs with the execution of a program or a piece of hardware the operating system should react accordingly. • The following are suitable error handling procedures: • The OS should attempt to prevent the error before it occurs. • Failing that the OS should attempt to correct the error when it occurs without user intervention. • If this is not possible the user should be notified of the error. • The error notification should include the cause of the error, RELEVANT information concerning the error and a procedure to follow to correct the error.
Feature #2:Input / Output • The operating system needs to be able to handle input and output in an efficient manner. • For instance a slow output device like a printer should not need to be monitored by the computer while it is printing a document. The print data should be made available to the printer and the CPU should be freed to process other jobs. • Techniques such as buffering and spooling are used to manage input and output. • Spooling – Placing data in a queue for later processing by a device or program. • Buffering – placing data from an input device in memory space until all the data is there and ready for processing.
Feature #3:User Interface • We’ve already discussed user interfaces a few slides ago. • A user interface should be easy and logical to use. • The user should not need any expert knowledge of hardware or programming in order to use the computers interface.
Feature #4:Resource Control and Scheduling • This means that when a program requires the use of hardware resources the OS is responsible for ensuring that the correct resources are allocated to the program. • The OS should also ensure that resources are equally shared among programs and that each has “a turn” to the resource. • However the OS must be careful not to allow one program to access the data another program is currently working on! Why is this important? • The MOST important aspect of the OS in my humble opinion!
Feature #5:Backing Storage Management • Most data and instructions are stored on secondary storage like hard-disks. • The operating system is responsible for ensuring that this data is organised in a logical manner and is readily available when needed. • The OS is responsible for retrieving and loading data from secondary memory into primary memory when needed. • Most OS’s use a technique called virtual memory.
Different kinds of OS’s • Operating Systems come in many shapes, sizes, colours and flavours and all have their own unique way of carrying out the tasks and features we’ve just looked at. • In the next few slides we’ll consider the different ways in which an OS can execute programs on behalf of the user. • (Remember that computers can “seemingly” do many jobs at once)
Method #1:Time-Slicing • The CPU’s processing time is divided up and each process is allocated a time slot in which it can utilise the CPU. • If the process does not finish in the allocated time it must return to the end of the queue and wait for the next “round”. • Time can be allocated to processes according to a set priority.
Method #2:Pre-emptive and Co-operative Multitasking • Two main ways of running numerous processes at the “same time” • Pre-emptive – each process is allocated the process for a set amount of time. When the time is up the next process uses the CPU. The change over is FORCED by the OS. • Co-operative – process co-operate in the use of the processor. A process uses the CPU until is it satisfied that it no longer needs it and then allows another process to utilise it. Is this good or bad? What happens when a program crashes?!
Method #3:Time-Sharing • Although the concept of time-sharing is very similar to that of time-slicing they are not to be confused! • Time-sharing allocates a time slice to USERS that are using the same computer. Therefore each user has a small time slot in which to use the resources of the computer. • These time periods are so small that it appears to each user that they have all the resources of the PC to themselves. • So… time-slicing allocates time to separate processes while time-sharing allocated time to separate users.
Method #4:Threads • Threads are little sub-tasks of a bigger process. • These threads perform operations that relate to the bigger process but both the threads and the process are working towards the same goal. • Unlike separate process that operate in difference memory spaces, threads operate in the same memory space as the process they belong to. • E.g. If you are typing a document called “bob.doc” the main process is you typing the document but various threads are being carried out at the same time. For example there is a thread that is spell-checking as you type and another thread that is auto-saving and yet another that is doing auto-formatting.
Method #5:Multiprocessing • This involves actually having two physical CPU’s. • The operating system must be support multiple processors before this can be useful. • The OS runs different processes on different CPU’s or different threads of the same process on each CPU. • These systems are the only systems that can truly carry out more than one process at a time.
Parts of the OS • Nucleus or Kernel • This term is used interchangeably and refers to the unchangeable aspects of the OS. Such as how the OS handles interrupts and resource scheduling. The kernel also contains information about driver software that is installed. • Shell • This is the part of the operating system that the user sees and interacts with. For example the shell in Windows consists of the task bar, the desktop, icons, buttons and windows. The user uses these to interact with the kernel.
Abstraction abstraction abstraction • It is important to understand that users are abstracted from the operating system to a large degree. Most users have no desire to know how files are stored or how programs are run. They just want the damn computer to do the work. ICONs are a perfect example the user double clicks on a icon and something happens. So most users don’t distinguish between opening a web-page, opening an image and running a program!
House-keeping • The operating system needs to do a lot to keep the computer operational. • In order to achieve this it needs to keep track of certain aspects of the computer. • Windows does this by using something called the registry. • The registry stores all the information, settings and preferences about the hardware, software and users on a computer. • This information in Windows is stored in USER.DAT (user info and settings) and SYSTEM.DAT (hardware and software info and settings)
File Allocation Table • Another important aspect that the OS need to keep track of is the file system. • Files stored on your hard-disk are categorised meticulously so that they can be retrieved. Very much like a filing system. • Windows uses FAT to stored data relating to files and folders. • FAT is a table of all the files and folders on your hard-disk. It stores info on the file name, size and location on the physical disk.
Onwards! • Now that we’ve completed out look at operating systems we can take a closer look at system utilities.
What are System Utilities? • Definition: “System utilities aid the operating system in maintaining and running applications. They also allow the user to construct her/his own software.” • In other words system utilities are the OS’s little helpers.
Examples • BIOS • Compilers and Interpreters • Utility Programs • Disk Utilities (like scan disk) • Compression Programs • Antivirus Utilities
Compilers • Compilers compile directly to machine code. • The compiled code will only work on machines of the same type that is was compiled on. • So a Visual Basic program compiled on a Windows machine will only run on another Windows machine. • A c++ program compiled under linux will only run on another a linux machine. • We call this compiled code “platform specific”
Interpreters • Compilers take the whole piece of code and compile it in one go and then run it. • Interpreters take a different approach and run each line of code one after the other without first compiling it.
The Java Approach • Java compiles it code to run on a “pretend” machine called the java virtual machine. • The java code can only run on the JVM. • Each platform (mac, unix and windows) needs the JVM in order to run java programs. • The allows java to be compiled once and run everywhere. • Why is this a super nifty idea?
Utility Programs • Compression Programs • These compress files so that they take up less space on secondary storage devices. • E.g. winzip, arj, winrar • Antivirus Utilities • Detects and clean viruses • E.g. MacAfee, Norton, AVG, Trend PCCillin
Disk Utilities • Disk-cleanup – cleans unwanted, temporary and unused files in order to save space. • Scan-disk – fixes a variety or errors on disk storage mediums: • Bad or damaged sectors • Lost file fragments • Cross-linked files • Disk-defragmenter – finds scattered file segments of the same file/program and replaces them in a consecutive order in order to increase efficiency.