week 4 - L2 - Operating system Flashcards
OS - definition
An OS is a program that acts as intermedarry between computer user and computer hardware
basically lets humans use computers
Kernel
- when does it run on a computer?
- what is it?
- what does it contain?
The kernel runs on the computer at all time
The kernel is a portion of the OS that is in the main memory
It contains:
- the most used functions
It’s considered to be the nucleus
OS goals
- what are they?
- control/ execute user application programs
- make the computer system convenient to use
- ease the solving of user problems
- use the computer hardware in an efficient manner
O/S quick review
- TOP DOWN- user
- BOTTOM UP - hardware
- SOFTWARE LAYER VIEWPOINT - how is the OS? time wise?what can happen to improve it?
Top down (user) view (calling the OS from above)
- the OS is a convenient application interface
- the OS hides the messy details which must be performed
- the OS presents the user with a virtual mahine easier to use
Bottom up (hardware) view
- the OS performs efficient resource usage and management
- TIME MULTIPLEXING - each program gets to use a resource
- SPACE MULTIPLEXING - each program gets a part of a resource
Software Layer viewpoint
- the operating system is evolvable and also scalable software (it changes and evolves)
- the OS also allows effective development and introduction of new system functions without interfering with service
Service’s provided by the OS Operating System
- what is included with the computer?
- where is the copy of the OS stored?
- the OS is included with the computer
- after installation, a copy of the OS is on the hard disk
service provided by the OS (what it does)
- what are they
- explain the last 2
- program development (editors and debgger)
- program execution
- controlled access to files
- access to I/O devices
- system access
- accounting
- error detection and response
- Accounting o Monitor performance o Collect statistics o Used to anticipate future enhancements o Used for billing users
- Error detection and response
o Internal and external hardware errors
Memory error
Device failure
o Software errors
Arithmetic overflow
Access forbidden memory locations
o Operating system cannot grant request to application
Types of OS
- what 3 types of OS are there
Single user/ Single Tasking OS
Single user/ Multitasking OS
Multi user/ Multitasking OS
Single user / SINGLE TASKING OS
Single user / SINGLE TASKING OS
- Only one user works on it
- It performs one task at a time
- Examples are MS-DOS and Palm OS
- Advantage is that it takes little space on disk
- Also run on inexpensive computers
Single user / MULTITASKING
Single user / MULTITASKING OS
- User performs many tasks at once
- Most common form of OS
- Windows XP and OS X
- Require expensive computers
- Tend to be complex
Multi user / MULTITASKING OS
Multi user / MULTITASKING OS
- Many users use the computer at the same time
- Each user has a unique session
- UNIX, Linux and VMS
- Maintenance can be easy
- Requires powerful computer
Network Operating Systems
- what architecture are they based on?
- what does the server enable?
- what’s managed by the server?
- examples
Network Operating Systems
- Network operating systems are based on a client-server architecture:
o The server enables multiple clients to share resources
- Data, users, groups, security, applications, printers are managed by the server
- Examples o Microsoft Windows server o Novel Open Enterprise Server o Red Hat server o Etc
Distributed OS
- collection of what?
- why are they referred to as? and why?
- how are the programming jobs serviced? by who?
- what other OS is it similar to? And what’s different from it?
Distributed Operating System
- Distributed Operating System uses a collection of independent communicating (networked) but physically separated computational devices(called nodes)
(basically networked computers that are in different places)
- They are referred to as loosely coupled system because each processor has its own memory
- Programming jobs are services by multiple CPUs by exchanging data between nodes
- A distributed operating system is an extension of the network operating system that supports higher levels of communication and integration of the machines on the networks
application software
- what is application software characterized by? version wise?
- what is each version compatible with?
- application software is characterized by a version number
- each version of the application is only compatible with certain versions of the OS
OS versions
- what are they identified by?
- what are the operating system updates called for every OS?
version are identified by name and release, specified in 2 numbers X.Y
- X - the major version of the OS
- Y - the level of upgrade released to make minor changes to the current version
(example ios 13.2, X = 13, Y = 2)
The OS updates or in more general of software are called:
PATCH - Linux
SERVICE PACK - Windows
UPDATE - macOS world
CPU & memory
- what do modern CPUs have that enable processes to have their own address space?
- what are the Important CPU registers?
- explain each of them
Modern CPUs have PROTECTED MODE OPERATION and MEMORY UNIT, to enable processes to have their own address space
Program Counter (PC) Instruction Register (IR) Stack Pointer (SP) Accumulator
- Program Counter (PC)
o Contains the address for the instructions to be fetched - Instruction Register (IR)
o Contains the instructions to be fetched - Stack pointer register (SP)
o Contains the address of the last program request in a stack (last in first out memory data structure, because it’s a stack) - Accumulator
o Which collects the result of computations
System BIOS (Basic Input/ Output System)
- what is BIOS used for?
- what information does it have?
- is it pre-installed and where?
- what firmware is it? what control does it provide?
- what does it load?
Basic input output system BIOS is used to perform hardware initialisation during the booting process
- It provides the main information for the OS related to the hardware
- It is pre-installed on EEPROM(or flash memory)
- BIOS reads some parameters such as the time and data stream, from a small CMOS RAM memory(with battery)
- It is non-volatile firmware (firmware is a software that provides the low level control for the device’s specific hardware)
- It initialised and tests the system hardware components
- It loads the boot loader or directly an operating system
Types of kernels
Monolithic
Microkernel
Hybrid
kernel
- what is it the core of?
- what does it manage?
- when does it load? and what does it handle?
- where is the critical code of the kernel loaded
- where does the kernel perform its tasks(running processes, handling interrupts etc)
- where do users perform their tasks?
The Kernel is the core of the OS
Manages the operations of a computer and hardware
aka CPU and Memory
It’s one of the first programs to load on start-up (after the bootloader) and it handles the rest of the start-up sequence
The critical code of the kernel is loaded in a protected area of the memory
The kernel performs its tasks in the kernel space
Everything a user does is in user space
Functions of the kernel:
process management memory management system calls device management file management security error logging job accounting control over system performance
Microkernel
- what does it contain?
- what happens to non-essential parts of the kernel?
A microkernel ONLY contains core functionality dealing with critical activities
Critical activities like memory management, process scheduling, and inter-process communication
(basically has only the core activities, unlike the monolithic kernel with all activities)
The idea is removing non-essential parts of the kernel and implement them as system and user program
Hybrid kernel
An OS kernel architecture that attempts to combine the benefits of both monolithic and microkernel architectures
Monolithic Kernel
- where do all the ___ run?
- what happens to device drivers in Linux?
- what do device drivers allow?
- what happens when a new device is added
- what is the benefit of a monolithic kernel?
In a monolithic kernel, all services and core functionality run in privileged “kernel mode” in a single address space
services( file system, device drivers)
functionality ( process scheduling, memory allocation, etc)
The device drivers are often made to be part of the kernel (specifically loadable kernel modules)
Device drivers allow the kernel to communicate with the hardware
When a new device is added, its extension is loaded and “joined onto the kernel” making the kernel larger
The main benefit os a monolithic kernel is that it’s fast and efficient because all the kernel services can interact directly with each other
Linux
- what structure does it have?
- what is it a collection of?
Linux
- Modular structure
- Collection of loadable modules: they implement OS functions and execute in kernel mode on behalf of the process
o Dynamic linking
o Stackable modules: hierarchy between clients and libraries
Components of OS
Components of the OS
- user interface
- process manager
- memory manager
- file manager
- device manager