Operating System Assignment: Switching Systems

1524 Words7 Pages

OPERATING SYSTEM ASSIGNMENT-I
Name: K. Sri Sirisha
Class: CSE-3A, Rollno:13951A0539
1.Explain about context switching with necessary diagram? Switching the CPU to another process requires
“performing a state save of the current process and state restore of a different process”. This task is known as a context switch. A context switch is a procedure that a computer’s CPU follows to change from one task to another while ensuring that the tasks do not conflict. A context switch may occur without changing the state of the process being executed.Fast memory that holds the address of the instruction to be executed immediately after the current one.
->In a CPU,the term”context” refers to the data in the registers and program counter at a specific …show more content…

The operating system picks
&begins to execute one of the jobs in memory.
Eventually, the job may have to wait for some task, such as an I/O operation, to complete.

Operating system Job 1 Job 2 Job 3 Job 4 In a non – multiprogramming system, the
CPU would sit idle. In a multiprogramming system, the operating system simply switches to & executes another job. When that job needs to wait the CPU is switched to another job, and so on. Eventually, the first job finishes waiting and gets the CPU back. As long as at least one job needs to execute, the CPU is never idle. Time sharing systems must also provide a file system. The system resides on a collection of disks, hence disk management must be provided. Also time sharing systems provides a mechanism for protecting resources from inappropriate use.
Process Management and OS manages many kinds of activities: ● User programs
● System programs: printer spoolers,name servers, file servers, etc. and Each is encapsulated in a process
● A process includes the complete execution context
(code, data, PC,registers, OS resources in use, etc.)
● A process is not a program and A process is …show more content…

Memory Management and Primary (Main) Memory
● Provides direct access storage for CPU
● Processes must be in main memory to execute and OS must: ● Mechanicsand Keep track of memory in use and Keep track of unused (“free”) memory and Protect memory space and Allocate, deallocate space for processes and
Swap processes: memory disk
● Policies and Decide when to load each process into memory and Decide how much memory space to allocate each process and Decide when a process should be removed from memory.
One OS Structure: Large Kernel and The kernel is the protected part of the OS that runs in kernel mode
● Critical OS data structures and device registers are protected from user programs
● Can use privileged instructions signals terminals character I/O files swapping disk, tape
CPU scheduling page replacement sytem services: shells, compilers, printing, network access system calls user programs hardware: terminals, I/O devices, memory machineindependent machinedependent.
OS Design Issues and Another approach: layered OS
● Divide OS into layers
● Each layer uses services provided by next lower

More about Operating System Assignment: Switching Systems

Open Document