OS Module 1 2 3 4
OS Module 1 2 3 4
❖ OS is a resource manager
➢ Manages all resources
➢ Decides between conflicting requests for efficient and fair resource use
❖ OS is a control program
Controls execution of programs to prevent errors and improper use of the computer
Operating System Structure
● Multiprogramming 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 interactive
computing
● 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 don’t fit in memory, swapping moves them in and out
to run
● Virtual memory allows execution of processes not completely in
Memory Layout for Multiprogrammed System
Operating-System Operations
Operating System Mode
Operating System Mode
● The User Mode is concerned with the actual interface between the user and the
system.
-It controls things like running applications and accessing files.
● The Kernel Mode is concerned with everything running in the background.
-It controls things like accessing system resources, hardware
controlling functions and processing program instructions.
short
keywords or abbreviations or presses special keys on the keyboard to
enter data and instructions.
2. Graphical User Interface
•With a graphical user interface (GUI), you interact
with menus and visual images.
Module 2
What is an Operating System?
● A process includes:
● program counter
● stack
● data section
● Multiple parts
● The program code, also called text section
● Current activity including program counter, processor
registers
● Stack containing temporary data
> Function parameters, return addresses, local variables
● Data section containing global variables
● Heap containing memory dynamically allocated during
run time
● Program is passive entity, process is active
● Program becomes process when executable file loaded
into memory
● Execution of program started via GUI mouse clicks, command
line entry of its name, etc
● One program can be several processes
● Consider multiple users executing the same program