1 / 17

COP 4600 /EEL 4882 Project 4

COP 4600 /EEL 4882 Project 4. Task. I/O Request processing SIO WIO Process state Active (only one) Ready (multiple) Block Done. Input. Input files are the same This time we need actually run instructions inside program script Simulation of SIO, WIO instruction.

eldora
Download Presentation

COP 4600 /EEL 4882 Project 4

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. COP 4600 /EEL 4882Project 4

  2. Task • I/O Request processing • SIO • WIO • Process state • Active (only one) • Ready (multiple) • Block • Done University of Central Florida

  3. Input • Input files are the same • This time we need actually run instructions inside program script • Simulation of SIO, WIO instruction University of Central Florida

  4. Instruction “SIO” and “WIO” • Review SIO 40 DSK2 10 -- Start Dsk2, requesting 10 bytes …… WIO 0 REQ [1,1] -- See if I/O request at [1,1] has finished, if not, block • How do we handle that? • Whenever we execute SIO, generate EIO event in a future time • When WIO occur first: • Check if I/O request still there, if so, block • When EIO occur first: • Remove I/O request University of Central Florida

  5. Interrupt Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Obj1.c: Get EVENT from event queue: LOGON STARTIO WAITIO ENDIO PGMEND Simulator.c: Call event handler: Logon_Service Sio_Service Wio_Service Eio_Service End_Service University of Central Florida

  6. Events • Logon • Generated by Obj1.c: Load_events() • When read logon.dat • SIO/WIO/PGMEND • Generated by Obj2.c:Cpu() • When execute SIO/WIO/END instruction • EIO • Generated by Obj4.c:Sio_Service() University of Central Florida

  7. Scheduler Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Select process to run Which Process to run: FCFS P2 ‘B’ P5 ‘B’ P4 ‘R’ P1 ‘R’ P3 ‘R’ Ready Queue University of Central Florida

  8. Dispatcher Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Obj2.c: XPGM() Obj2.c: Cpu() Run one or several instructions (one cpu burst) University of Central Florida

  9. Event Flow SIO Event Queue: Logon Logon Logon Logon Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Obj3:Logon_Service Script: Editor Editor Logoff P1: SIO 23 PRNT 100 SIO 32 DISK 300 WIO 0 REQ [0,1] END 17 Obj3: Next_pgm University of Central Florida

  10. Event Flow Event Queue: Logon SIO Logon SIO Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Script: Printer Logoff P1: SIO 23 PRNT 100 SIO 32 DISK 300 WIO 0 REQ [0,1] END 17 P2: SIO 27 DISK 3000 SIO 15 PRNT 100 END 30 University of Central Florida

  11. Event Flow EIO Event Queue: SIO WIO Logon SIO Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() P1: SIO 23 PRNT 100 SIO 32 DISK 300 WIO 0 REQ [0,1] END 17 Obj4:SIO_Service University of Central Florida

  12. Event Flow Event Queue: WIO EIO Logon SIO Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() I/O have not finished Obj4:WIO_Service P1: SIO 23 PRNT 100 SIO 32 DISK 300 WIO 0 REQ [0,1] END 17 P2: SIO 27 DISK 3000 SIO 15 PRNT 100 END 30 P1 PRNT Block University of Central Florida

  13. Event Flow Event Queue: EIO Logon SIO WIO Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Obj4:EIO_Service P2: SIO 27 DISK 3000 SIO 15 PRNT 100 END 30 P1: SIO 23 PRNT 100 SIO 32 DISK 300 WIO 0 REQ [0,1] END 17 Ready P1 PRNT Active Ready University of Central Florida

  14. Event Flow Event Queue: PGMEND Logon SIO WIO Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Script: Editor Printer Logoff P1: SIO 23 PRNT 100 SIO 32 DISK 300 WIO 0 REQ [0,1] END 17 Ready queue: P3: SIO 10 DISK 1000 WIO 0 REQ [0,1] END 37 P2 P3 University of Central Florida

  15. Event Flow Event Queue: PGMEND SIO WIO Interrupt() Interrupt_ Handler() Scheduler() Dispatcher() Obj3: End_Service Script: Editor Editor Logoff P1: SIO 23 PRNT 100 SIO 32 DISK 300 WIO 0 REQ [0,3] END 17 P4: SIO 18 PRNT 200 SIO 5 PRNT 200 WIO 19 REQ [0,1] END 13 Obj3: Next_pgm Ready Queue P2 P3 P4 University of Central Florida

  16. Device List SIO(R5) SIO(R7) EIO(R1) R1 R5 R7 DSK1 R3 DSK2 R6 PRNT University of Central Florida

  17. Deadline • Deadline is Arp 4 (Friday) midnight • Late assignments are accepted five days after the due date with a penalty of 20 % off. After five days, assignments will not be accepted. The grade for those assignments will be zero. University of Central Florida

More Related