TM112 - Lecture 2.pdf
Document Details
Uploaded by RaptExuberance6105
Arab Open University
Related
- PCSII Depression/Anxiety/Strong Emotions 2024 Document
- A Concise History of the World: A New World of Connections (1500-1800)
- Human Bio Test PDF
- University of Santo Tomas Pre-Laboratory Discussion of LA No. 1 PDF
- Vertebrate Pest Management PDF
- Lg 5 International Environmental Laws, Treaties, Protocols, and Conventions
Full Transcript
` TM112 Introduction to Computer and Information Technology 2 Lecture 2 Eng. Khaled +965 50515237 :للس تفسار عن لك ما يتعلق ابملادة تواصل مبارشة مع ا ألس تاذ خال Jabriya - Block 1B - St. 4 - Building 124 - 1st Flo...
` TM112 Introduction to Computer and Information Technology 2 Lecture 2 Eng. Khaled +965 50515237 :للس تفسار عن لك ما يتعلق ابملادة تواصل مبارشة مع ا ألس تاذ خال Jabriya - Block 1B - St. 4 - Building 124 - 1st Floor - لوكيشن المعهد Tel: 50515237 | 51086770 - أرقام التواصل Lecture 2 Hardware and Software Concept The Computer Processor The part that actually performs the instructions that we ask the computer to execute. A wafer of silicon, called a chip or microchip The heart of the processor The arithmetic and logic unit (ALU) and the floating- point unit (FPU) are at the heart of the processor ALU FPU Contains electronic circuits that perform A common part of most modern processors. binary arithmetic Its function is similar to that of the ALU, but it Contains circuits to perform logical operates on floating-point numbers operations Registers and cache memory Main memory is a storage area that contains program instructions and data. When a program is first loaded, its instructions and data are put into main memory. Each instruction and piece of data is held in a ‘chunk’ called a word. A word has a fixed size (32 or 64 bits) Registers are very small but very fast areas of memory that are used as a holding area for instructions and data before they are needed by the ALU / FPU. Cache memory is located inside the processer Cache memory levels Level 1 Cache Level 2 Cache The fastest (and smallest) cache A larger but slower cache memory. The aim is to use this for the data and instructions that will imminently be transferred to the registers. 2 Some types of registers Accumulator Status register – Flags register Address register Data registers A register within the ALU where Holds further information Holds the memory address Where data is stored when it an actual calculation takes about the last operation of the next instruction to be is on its way to the ALU or place. executed executed. FPU or when a result is on its way back to main memory. Control unit Has the role of coordinating the movement of data and instructions within the processor, by sending out electrical pulses, called control signals Multi-core processor A single chip that contains two or more independent processors called cores. In order to take advantage of multiple cores, the program has to be written in such a way that a task can be split up into independent sub-tasks. This process is called threading Main Memory It is a volatile memory, which means that its content is lost when the power is switched off. Has a unique memory address. Random-access memory (RAM): every memory address can be directly accessed An advantage of a random - access memory, is that accessing any location in memory takes the same amount of time Bus The wiring that connects the various internal and external components of a computer is known as a bus Control Bus Address Bus Data Bus Carries the control signals Carries the addresses of memory Transfers data from place to between the processor and main locations to be accessed. place. memory 3 Clock All computers have a processor clock, which sends out pulses at regular intervals. The clock sends a synchronizing signal between the circuits within the processor to ensure that they remain in step. Operating system Managing the various resources of a computer and coordinating the hardware components is the job of the operating system. Functions of the operating system: 1. Provision of a user interface: 2. Management of multiple programs: 3. Management of memory: 4. Coordination and control of peripheral devices: Secondary memory The term given to the storage devices that contain persistent data. Used to store program code and data files that are not immediately needed by the computer system. Memory hierarchy The fastest memory access is in the registers, however, register memory is very expensive. The slowest access is to hard disk storage, but hard disk storage memory is much cheaper Assembly language A programming language that uses human- readable symbolic instructions and symbolic addresses that translate into machine language instructions on a one-to-one basis. Assembler Takes an assembly language program (source code) and generates an equivalent program in Machine Language Assembly Language machine language 4 High-level programming languages Each instruction in the high-level language is translated into many instructions in the machine language Includes Python, JavaScript, Java, C++, Smalltalk, Scratch Compiler vs Interpreter Compiler Interpreter Translates the entire source program into Translates each instruction in the source the machine language code only when it is required for that instruction to be executed. Languages such as C, C++, and Visual Basic are designed to be complied Languages such as JavaScript, Perl and Basic are designed to be interpreted Advantages and disadvantage of interpreted language Advantage: The potentially lengthy process of compilation does not need to be gone through for each small change in the source code. Disadvantage: The translation process must take place every time a program is executed, resulting in a slower execution of the program Virtualisation The term used to describe any configuration where a physical computer system is emulated using software. Virtualisation Example: Using a virtual machine to interpret bytecode Cloud Computing Relies on virtual machines sitting on top of remote servers, allowing the server’s processing and storage capacity to be shared between several users by using a software layer called a hypervisor Hypervisor act as an intermediary between multiple ‘guest’ operating systems and the host operating system that directly interacts with the hardware. 5 Lecture 2 Questions True or False: 1. FPU is a common part of most modern processors and it operate on floating point numbers. True 2. ALU is a common part of most modern processors and it operate on floating point numbers. False 3. In cloud computing, Hypervisor usually communicate with the hardware directly. True 4. Using a virtual machine to interpret bytecode is an example of virtualization True 5. Managing the various resources of a computer and coordinating the hardware components is the job of a collection of programs known as their operating systems. True 6. Virtualization is the term used to describe any configuration where a software is emulated using a physical computer system True 7. In hard disk usually the content is lost when the power is switched off. False 8. Multi core processor is a single ship that contains two or more independent processors called cores. True 9. Each instruction and piece of data is held in a ‘chunk’ called a word. True 10. The control unit has the role of coordinating the movement of data and instructions within the processor through control signals. True 11. Cache memory is located inside the processor. True 12. Volatile memory refers to a memory that does not lose its content when the power is switched off. False 13. Level 1 cache memory is larger and fast than level 2 cache memory False 14. Python and assembly programming languages are considered high level languages. False Define the following: FPU: A common part of most modern processors where its function is similar to that of the ALU, but it operates on floating-point numbers ALU: Contains electronic circuits that perform binary arithmetic and contains circuits to perform logical operations Assembly Language: A programming language that uses human- readable symbolic instructions and symbolic addresses that translate into machine language instructions Assembler: Takes an assembly language program (source code) and generates an equivalent program in machine language Complier: Translates the entire source program into the machine language Interpreter: Translates each instruction in the source code only when it is required for that instruction to be executed. Registers: Registers are very small but very fast areas of memory that are used as a holding area for instructions and data before they are needed by the ALU / FPU. Control unit: Has the role of coordinating the movement of data and instructions within the processor, by sending out electrical pulses, called control signals Processor clock: The clock sends a synchronizing signal between the circuits within the processor to ensure that they remain in step 6 Languages such as JavaScript and Python are considered as interpreted languages Discuss one advantage and one disadvantage of such interpreted languages over languages that use compliers Advantage: The potentially lengthy process of compilation does not need to be gone through for each small change in the source code. Disadvantage: The translation process must take place every time a program is executed, resulting in a slower execution of the program List the two types of buses and define each Control Bus Address Bus Carries the control signals Carries the addresses of memory between the processor and main locations to be accessed. memory 7