31 Silberschatz Galvin and Gagne 2018 Operating System Concepts 10 th Edition

31 silberschatz galvin and gagne 2018 operating

This preview shows page 30 - 36 out of 60 pages.

Silberschatz, Galvin and Gagne ©2018 Operating System Concepts 10thEdition Multiprogramming and Multitasking Multiprogramming(Batch system) needed for efficiency Single user cannot keep CPU and I/O devices busy at all times Multiprogramming organizes jobs (code and data) so CPU always has one to execute A subset of total jobs in system is kept in memory One job selected and run via job scheduling When it has to wait (for I/O for example), OS switches to another job Timesharing (multitasking)is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactivecomputing Response time should be < 1 second Each user has at least one program executing in memory process If several jobs ready to run at the same time CPU scheduling If processes dont fit in memory, swappingmoves them in and out to run Virtual memory allows execution of processes not completely in memory
Background image
1.32 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts 10thEdition Memory Layout for Multiprogrammed System
Background image
1.33 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts 10thEdition Dual-mode and Multimode Operation Dual-mode operation allows OS to protect itself and other system components User mode and kernel mode Mode bit provided by hardware Provides ability to distinguish when system is running user code or kernel code Some instructions designated as privileged, only executable in kernel mode System call changes mode to kernel, return from call resets it to user Increasingly CPUs support multi-mode operations i.e. virtual machine manager (VMM) mode for guest VMs
Background image
1.34 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts 10thEdition Transition from User to Kernel Mode Timer to prevent infinite loop / process hogging resources Timer is set to interrupt the computer after some time period Keep a counter that is decremented by the physical clock Operating system set the counter (privileged instruction) When counter zero generate an interrupt Set up before scheduling process to regain control or terminate program that exceeds allotted time
Background image
1.35 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts 10thEdition Process Management A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. Process needs resources to accomplish its task CPU, memory, I/O, files Initialization data Process termination requires reclaim of any reusable resources Single-threaded process has one program counterspecifying location of next instruction to execute Process executes instructions sequentially, one at a time, until completion Multi-threaded process has one program counter per thread Typically system has many processes, some user, some operating system running concurrently on one or more CPUs Concurrency by multiplexing the CPUs among the processes / threads
Background image
1.36
Background image
Image of page 36

You've reached the end of your free preview.

Want to read all 60 pages?

  • Fall '19
  • Gagne, Galvin,  Distributed systems,  No

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes