1 / 21

Operating Systems

Operating Systems. Computer Services. What things can your computer do? Calculator Word processing Web browsing Photoshop Paint program Games. These are all pieces of Software!. Software. Software applications usually have very nice interfaces – Buttons Icons Menus Instructions

ginger
Download Presentation

Operating Systems

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. Operating Systems

  2. Computer Services What things can your computer do? • Calculator • Word processing • Web browsing • Photoshop • Paint program • Games These are all pieces of Software!

  3. Software Software applications usually have very nice interfaces – • Buttons • Icons • Menus • Instructions • Graphics

  4. Computer Components How does the computer perform these functions? • Memory • Disk drive • Circuit Board • Keyboard • Monitor These are pieces of Hardware!

  5. Hardware Hardware components usually have pretty difficult interfaces. Machine Language Program for MIPS Machine [0x00400000] 0x8fa40000 lw $4, 0($29) ; lw $a0, 0($sp) [0x00400004] 0x27a50004 addiu $5, $29, 4 ; addiu $a1, $sp, 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; addiu $a2, $a1, 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; sll $v0, $a0, 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; addu $a2, $a2, $v0 [0x00400014] 0x0c000000 jal 0x00400020 [main] ; jal main [0x00400018] 0x3402000a ori $2, $0, 10 ; li $v0 10 [0x0040001c] 0x0000000c syscall

  6. Operating System User Operating System Hardware

  7. Virtual Environments Operating Systems make the computer applications organized • Hallway • Desk • File Cabinet • Book Shelf

  8. Virtual Environments You’ve seen Operating Systems already: • Windows whatever • UNIX • Mac Usually work with WIMPs (Windows, Icons, Menus, Pointers)

  9. Booting up • If the OS is the program that runs the other programs, how does the OS program get loaded and run in the first place? • When you turn on the computer, it runs a hardwired program called bootstrap code that loads the OS.

  10. OS Services • Provides access to software • Gives interface to user • Knows how to load applications into memory • Provides other communication between the user and the application

  11. OS Services • Provides a secure computing environment - Security for a system (logins and passwords) - Security for internal files and functions(You can’t erase my files; A program crash won’t crash the whole computer) - Security from hardware failure (tries to protect you from crashes with backup measures)

  12. OS Services 3. Provides a file system public_html wedding cps1 index.html<HTML>My Homepage images Comp.gif Guestlist Spreadsheet index.html<HTML>My CPS1Homepage Lab 1

  13. OS Services 4. Provides for Multiprogramming (Multitasking) A process is a program in some state of execution. Many can be running at once, while the processor is waiting on one process, it runs a second. Some processes have priority over the others. It may also interrupt a process because of error or just to give another process a chance to run.

  14. More on Multiprogramming OS Print a file Read from Disk Process 2 RegisterValues Disk A Process 3 RegisterValues Disk A Process 1 RegisterValues Printer

  15. More on Multiprogramming • Several programs are competing for processor time, memory, use of devices, etc… • OS is the manager that says who gets what • OS must be programmed to avoid problems…

  16. Dining Philosophers • Dijkstra: 1965 • Setup for thinking about multiple processes sharing resources

  17. Scenario 1: • Everyone must pick up/put down left utensil first and then right utensil • NO grabbing both at same time!!! • Show Deadlock

  18. Scenario 2: • Number around table • Evens: Left, then right (pick up/put down) • Odds: Right, then left (pick up/put down) • NO GRABBING BOTH AT SAME TIME!!! • Deadlock? • Starvation? • Can you make up something better?

  19. Multiprogramming Potential Problems • Starvation – one process never gets the chance to get a resource • Deadlock – every process waiting for something, and none can run • Dirty Data – if more than one process is accessing a piece of data, there can be problems

  20. Data Sharing: Dirty Data x = 4; x = x + 1; print x; Shared integer x x = x + 6;

  21. Conclusion • Operating Systems provide a bridge between user and computer • They give access to computer functionality • They provide security • They provide file systems • They manage multiprocessing and resource allocation

More Related