Tuesday, November 5, 2019
M362 Unit 2 Notes Essay
M362 Unit 2 Notes Essay M362 Unit 2 Notes Essay M362 Developing Concurrent Distributed Systems Unit 2 Processes A task is sequence of instructions treated as an element of work. Each application a user is running can be represented by a process that is running or executing. A process is different from a program in that it is the programââ¬â¢s execution ââ¬â the program itself is regarded as static. A platform is a particular combination of software and hardware upon which a process is executing ââ¬â a process is the culmination of a programsââ¬â¢ source code. Source code is static, process is dynamic. Source code is abstract from the platform it is to be running on and therefore allows concentration on overall purpose not availability. Multitasking refers to ability to do more than one task at any one time ââ¬â a system can have multiple processors in order to perform many tasks but it is likely that more tasks will be carried out than the system has processors. Multiple tasks will need to share resources which will create performance bottlenecks. Requirements of multitasking systems: Not to waste hardware resources ââ¬â always be busy doing some task if possible. Keep users productive not in waiting. Mediate access to shared resources. Two types of multitasking operating systems ââ¬â cooperative multitasking (apps are coded to allow other programs to run from time to time) and pre-emptive multitasking (operating system can request that a process give way to another). A batch process is one which will run without any user input, a non-pre-emptive operating system is one which runs a process to completion before allowing another to run. Platform-software Interface Runtime environment is responsible for managing loading and execution of a program and designating storage space. Before execution ââ¬â source code is turned into platform specific machine code by means of a compiler. If the source code is changed in steps (line by line) then we say that it is translated. Operating system mediates between concurrent process to prevent errors by running in two modes ââ¬â user mode and supervisor mode. Main difference here being supervisor mode has option of controlling input and output operations and controlling entry and exit from this mode. This allows user process from causing too much damage if controlled properly. Supervisor mode would be called upon if a user process requests something that is unusual or forbidden in trying to delete a file that is write-protected for example. In this way supervisor mode can be used to protect services and files that are essential to the running of the system. Memory ââ¬â 4 types of memory: (1) Registers ââ¬â high-speed memory in which is stored data that is required immediately like instructions. Size of register referred to as data width. (2) Cache memory ââ¬â holds recently accessed data or results which is likely to be needed again soon. (3) Main memory ââ¬â RAM ââ¬â provides main storage for processes and data. (4) Disk storage ââ¬â persistent storage ââ¬â all other types above are volatile. Hardware interfaces ââ¬â communication between CPU and main memory and external devices is slow as it takes place over ââ¬Å"communication highwayâ⬠known as system bus. Delays are caused by system bus being busy. A hardware device has a device controller which controls the information being passed to and from the hardware device. A device controller acts independently of the main processor and therefore can run in parallel. Processor ââ¬â three basic functions: Read and write binary numbers to memory locations. Perform arithmetic operations up to a certain size. Determine what instruction should be executed next which may involve some sense of evaluation of principles. Program execution takes place in fetch-execute cycle which uses a program counter. The counter is responsible for logging which set of instructions is being used by a program and therefore which instruction set is needed next. The fetch-execute cycle then fetches the next instruction and executes this until
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.