1 / 31

Hardware & Operating System Overview Ch.1 and Ch.2

Hardware & Operating System Overview Ch.1 and Ch.2. About Your Book. Published in 1979 Mainframe Assembler Language What is Assembler Language? No JCL Using a mainframe emulator in class. Why Learn Assembler?. Directly manipulate hardware Device Driver programs

nike
Download Presentation

Hardware & Operating System Overview Ch.1 and Ch.2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hardware & Operating SystemOverviewCh.1 and Ch.2 CIS20 - Linge

  2. About Your Book • Published in 1979 • Mainframe Assembler Language • What is Assembler Language? • No JCL • Using a mainframe emulator in class CIS20 - Linge

  3. Why Learn Assembler? • Directly manipulate hardware • Device Driver programs • Processor-specific instructions, such as for sound cards or printers • Unusual performance issues • Real-time applications, such as flight simulators or patient monitoring devices • Game programming • Disassembling (reverse engineering?) • Learn the hardware – really well! CIS20 - Linge

  4. Class Organization/Outline • Intro to IBM Mainframe Hardware • Intro to the Operating System • Program Development & Documentation • Defining Data/Instruction Formats • Defining Character Data • Packed Decimal Arithmetic • Binary Arithmetic • Subroutine Linkages Continued on the next slide CIS20 - Linge

  5. Class Organization - continuedClass Outline (Week-to-Week) • Program Debugging Strategies • Processing I/O and File Organization • Dummy Sections • Subroutines & Parameter Passing • Creating & Manipulating Tables & Arrays • Sorting Strategies • Bit Manipulation CIS20 - Linge

  6. IBM Mainframe Computers IBM S/390 – G6 CIS20 - Linge

  7. Mainframe - defined • A large powerful computer, often serving many connected terminals and most often used by large complex organizations. • A state-of-the-art computer for mission critical tasks. In the "ancient" mid-1960s, all computers were mainframes, since the term referred to the main CPU cabinet. Today, it refers to a class of ultra-reliable medium and large-scale servers designed for enterprise-class and carrier-class operations. • The first mainframe vendors were Burroughs, Control Data, GE, Honeywell, IBM, NCR, RCA and Univac, otherwise known as "IBM and the Seven Dwarfs." CIS20 - Linge Answers.com

  8. Memory Processor CIS20

  9. Memory • Electronic/High-Speed • Holds programs and data • Programs included: • Operating system • Application programs • Volatile • Relatively expensive • Size: MB, GB, and more CIS20 - Linge

  10. Early Memory Visual shows 12-bits of memory – core storage – each ring or donut in the visual represents a single bit of memory. The wires running through the “core” of each donut can change the direction of the power thereby flipping the bit back and forth to represent either “bit on” or “bit off.” R. Linge

  11. Processor • Manipulate data • Execute program instructions • 4-steps per instruction • Fetch • Decode • Execute • Store • 3 different instruction lengths • 2 bytes, 4-bytes, 6-bytes • Interrupts – 6 types • Supervisor call, I/O, External, Machine Check, Program Check, Restart CIS20 - Linge

  12. 4-steps or Phases of Execution per Instruction • Fetch the instruction – Obtain next instruction from memory into the processor • Decode – 2, 4, or 6-byte instruction length plus update IC in PSW to point at next instruction • Execute – carry out the instruction • Store – place result of instruction in its designated field CIS20 - Linge

  13. Instruction Lengths Many instructions have each instruction length – for example, there are at least 3 ADD instructions. They all work the same way. The second operand (R2 or M2) is added to the first operand (R1 or M1) and the result is stored in the first operand location. The R operand is a General Purpose Register and the M operand represents a location in memory. CIS20 - Linge

  14. Programs in Execution Hold Done Ready Running Waiting Initially, programs enter the system by being queued on the HOLD queue. After all needed resources are assigned to the program, it can re-queue on the READY queue. From there, it can move to the RUNNING queue while it is assigned a processor and the program will probably move often between the READY, RUNNING, and WAIT queues as it goes through its execution. Finally, when the program completes, it will move to the DONE queue where the operating system will un-assign the assigned resources R. Linge

  15. Interrupts 1 2 R. Linge

  16. At any point in time, there could be a large number of programs sitting in the READY queue waiting to get access to a processor when it becomes available. These programs cannot re-queue anywhere unless directed by the operating system as the result of an interrupt occurring. Let’s say that your program is currently running, so it is on the RUNNING queue, then your program wants to read a record from an input file. When it request the input (from the operating system), an interrupt occurs (Supervisor Call). As a result of any interrupt type, the CURRENT PSW is saved in the appropriate OLD PSW location and the appropriate NEW PSW content becomes the CURRENT PSW. So the next instruction to be executed comes from the program pointed to by the appropriate NEW PSW, which just happens to be the o/s program to service that type of interrupt (Supervisor Call). After the reason for this interrupt is determined and the appropriate action has been taken, processor control is given to another o/s routine, called the Dispatcher, to determine which program to move from the READY to the RUNNING queue. When it is the turn of the program that wanted to read that input record eventually gets processor control back, its PSW has been preserved, so it can be restored and now the program can return to the exact point where it left off when the interrupt originally occurred. CIS20 - Linge

  17. Program Status Word CIS20 - Linge

  18. In the PSW (previous slide), the mask fields are used in effect to disable some of the interrupts from occurring. This doesn’t really disable the interrupt since interrupts are unpredictable, but to indicate to the operating system to ignore (for now) the interrupt if it does occur. You would not want a machine check failure to occur while you were in the midst of handling a machine check that has just occurred. There are other ways to disable interrupts. For example, if you don’t want a Supervisor Call interrupt to occur, don’t attempt to execute an instruction that forces a Supervisor Call, such as request I/O. The condition code field is where the condition code is kept for instructions that set the condition code, such as a COMPARE instruction to indicate the result of the compare the condition code can be tested by subsequent instructions, as a Branch-On-Condition instruction. The instruction address field is where the next sequential instruction (to be executed) is remembered so it can be located when the current instruction completes, the next instruction can be fetched. Addressing mode establishes whether memory is restricted to the first 16MB (24-bit addressing) or up to 2GB (31-bit addressing) can be addressed. Finally, the Wait State bit indicates that there is nothing on the READY queue to dispatch. CIS20 - Linge

  19. Program Interrupts & Queues Done Hold Ready Running Waiting R. Linge

  20. I/O Devices • Input into memory • Output from memory • Some devices are input only, some devices are output only, but some devices are both input and output • Be sure to read: Characteristics of direct storage access devices – bottom of page 9 through the end of page 14 : (Input/Output Equipment) CIS20 - Linge

  21. Major Features of Main Frame Operating Systems • Support thousands of interactive users • Self-healing ? • Virtual memory • Data Security • Managing many devices and files • Managing work CIS20 - Linge

  22. Single-User/Single-Tasking System In early memory only one program at a time could be executed. In the bottom (beginning at 0K – in the Resident Area of Memory) lived the operating system and most of upper memory, operating system programs were moved in and out (Transient Program Area) based on demand. In between, lived the application program to be executed, up to its maximum size allowed, which was the difference between to top of the Resident Area and the bottom of the Transient Area. Free Spaces was what was left that the program did not use. R. Linge

  23. FixedPartitions In the next system, called Multi-Programming with a Fixed Number of Tasks (MFT). But some things remained the same – namely the top and bottom of memory was still essentially the operating system and whatever amount of memory was left over could be occupied by up to 52 programs, which included programs such as what we call “print drivers” today. Multiple programs could each run in a separate partition. Between these partitions are fixed walls so partitions were all the same size, but customizable at Boot Time. R. Linge

  24. Variable (Dynamic) Partitions • Fixed Ptns seemed to cause as many problems as it solved, such as: • Keep free memory in contiguous blocks so its use could be maximized • How about a different approach? • Section the program into smaller pieces so it might fit into fragments of memory CIS20 - Linge

  25. Multi-Programming with a Variable Number of Tasks: Initially each program entering memory will load provided there is sufficient memory. The walls can now move around. In this example, the operating system lives solely in the bottom of memory (but it also still lives at the top – just not shown anymore. Where one program ends, the next one begins. Let’s see what happens as we go through a few programs ending and a few new programs beginning. Continue to the next slide  • Job1 = 10K • Job2 = 15K • Job3 = 20K • Job4 = 50K R. Linge

  26. At this point in time, program (job) JOB1 and JOB4 have completed from the previous slide. Job1 was 10K and Job4 was 50K, but these programs were not in contiguous, so there is now 60K of free memory and all of it is reusable, but only in 50K (or less) and 10K (or less) chunks. The 50K free area could be further cut into smaller pieces. Let’s see what happens when another program comes along. Continue to the next slide  When jobs complete, memory becomes available But… memory is now fragmented R. Linge

  27. So here comes Job5 that wants 5K of memory. And here comes Job6 that wants 30K of memory. There is still some available memory, but it is still non-contiguous. In this example, it wouldn’t matter which algorithm was used to get these programs into memory. First Fit would place Job5 into the first available area from the bottom. That’s where Job 5 is located here. The same algorithm would place Job6 where it is now. Best Fit algorithm would place the two jobs in the same areas of memory. Best fit looks at all the available areas and chooses the area that is the same size as the job or the next size smaller. Continue to the next slide  CIS20 - Linge

  28. Now Job3 has finished leaving the free space between Jobs 2 & 6 (20K). The jobs that are still executing cannot be relocated to make the free space a large contiguous free area, so we now have 3 free areas for a total of 45K, yet the largest area still free is 20K – two 20K areas are available. Continue to the next slide  CIS20 - Linge

  29. Jobs 7 & 8 arrive, but is there sufficient memory available? Job7 needs 10K of memory and Job 8 needs 30K. There is 35K memory available, but the space is not contiguous, so there is not sufficient space for Job 8 at this time. Job8 must wait until 35K of contiguous space becomes available. This style of memory management is better than what preceded it, but it still is not as efficient as it could be managed. R. Linge

  30. In more recent versions of operating systems, memory management has taken on a newer look altogether. Partitions and regions have become address spaces. … fuscia, aqua, and yellow. Green is still the operating system. Implications are that each program has all of memory between the parts of the operating system – sounds like our original system. When a program is dispatched its address space is shifted so that it lines up with the operating system – for example, the aqua address space would be aligned with the green o/s and fuscia would no longer be aligned. If there is no addressability with all address spaces but one, this is the ultimate security of memory. This is handled by way of virtual memory which is large enough to hold an unlimited number of programs ready to run. R. Linge

  31. Be sure to read Ch.2 in your textbook After reading Ch.1 PLUS, there is also a “lecture” available in e-College on this material which may be more useful to those preferring to read text rather than look at diagrams and pictures End of Slide Set for Ch.1 and Ch.2 R. Linge

More Related