1
Introduction – Outline
- What is an operating system?
- History of operating systems
- Where does the operating system fjt in a
computing system?
- User mode and kernel mode
- What are the general operating system functions?
Introduction Outline What is an operating system? History of - - PowerPoint PPT Presentation
Introduction Outline What is an operating system? History of operating systems Where does the operating system fjt in a computing system? User mode and kernel mode What are the general operating system functions? 1 What is
1
2
– all general purpose computers use an OS – OS makes a computer easier to use
– Some specialized systems that usually do one thing
– User viewpoint – System viewpoint
3
– provide an abstraction over the hardware
– e.g., write(fjleno, buf, len);
– loading program into memory, initializing program
– instead user types: gcc hello.c and then ./a.out
– resource management, security, fairness, performance
4
– manage CPU time, memory space, fjle storage space, I/
– fairly resolve confmicting requests for hardware
– control the various I/O devices and user programs
5
– provide an environment for easy, effjcient program
– execute user programs and make solving user
– make the computer system convenient to use – use the computer hardware in an effjcient manner
– everything that a vendor ships when you order an OS ! – program that is always running on the computer
6
7
– provides basic computing resources (CPU, memory, I/O
– controls and coordinates use of hardware among
– defjne the ways in which the system resources are
8
– initialize CPU registers, device controllers, memory – locate and load the OS kernel
– waits for some event to occur (interrupt-driven)
– processor checks for occurrence of interrupt – transfers control to the interrupt service routine,
– IVT is at a fjxed address in memory (known to CPU) – execute the associated interrupt service routine – return control to the interrupted program
9
– hardware interrupts (sent to the CPU over the system
– software interrupts (software error or system call)
10
– earliest operating systems – each user submits one or more jobs – collect a batch of jobs – process the batch one job at a time, one after the
– Job 2 cannot start until job 1 fjnishes – I/O activity stalls the CPU; CPU under-utilized – No interactivity
11
– a single job cannot keep CPU and I/O devices busy at
– OS is given multiple runnable jobs at a time – when current job has to wait (for I/O for example), OS
– multiple jobs kept in memory simultaneously – I/O and CPU computation can overlap – CPU-bound Vs. I/O bound jobs – OS goal: maximize system throughput
12
– logical extension of multiprogramming – CPU switches jobs so frequently that users can interact
– very fast response time – each user has at least one program executing in
– OS scheduler decides which job will run if several jobs
– If processes don’t fjt in memory, swapping moves them
– virtual memory allows execution of processes not
– OS goal: optimize user response time
13
– for physically separate, heterogeneous, networked
– Hardware: computers with networks – OS goal: ease of resource sharing among machines
– OS itself runs under the control of an hypervisor – VM have own memory management, fjle system, etc. – VM is key feature of some operating systems
– hypervisor no longer optional
14
15
– address space: all memory addresses that an
– address space of one process is separated from
– dual-mode operation (user mode and kernel mode) – distinguish when system is running in user or system
– privileged instructions only operate in kernel mode – system calls / returns change mode
16
– OS sets timer interrupt after specifjc period – hardware decrements counter – when counter zero generate an interrupt – set up before scheduling process to regain control or
17
– is a program in execution – is a unit of work within the system – program is a passive entity, process an active entity – needs resources to accomplish its task
– execute instructions sequentially, until completion
18
– process scheduling – suspending and resuming processes – providing mechanisms for process synchronization – providing mechanisms for process communication – providing mechanisms for deadlock handling
19
– optimizing CPU utilization and computer response to
– keeping track of which parts of memory are currently
– deciding which processes (or parts thereof) and data
– allocating and deallocating memory space as needed
20
– abstracts physical properties to logical storage unit –
– medium controlled by device (i.e., disk drive, tape
– Files usually organized into directories – Access control is provided to determine who can
– OS activities include
21
– distance from the CPU, size, and process technology
22
– Memory management of I/O including bufgering
– General device-driver interface – Drivers for specifjc hardware devices
23
– denial-of-service – worms – viruses – identity theft – theft of service
24
– user identities (user IDs, security IDs) include name
– user ID then associated with all fjles, processes of
– group identifjer (group ID) allows set of users to be
– privilege escalation allows user to change to efgective
25
26