Download presentation
Presentation is loading. Please wait.
Published byMorgan Conley Modified over 6 years ago
1
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
OS & Embedded Systems Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
2
Introduction and System Structures
Chapter 1 Introduction and System Structures
3
OS Topics Covered Introduction to an Operating System(OS) OS structure
Functions of an OS OS services System calls System boot
4
What is an operating system?
An example:Windows 10, Android An operating system is a program that manages the computer hardware. It acts as an interface between the computer user and computer hardware. It provides various services with respect to memory, resources, file management. It provides the basis for process management, process scheduling, invoking and execution of threads. Parallel-processing, multicomputing are all various capabilities of certain advanced operating systems.
5
What is the role of an operating system?
A computer system could be divided into four components Hardware(CPU, memory, Hard-disk, USB etc) OS Application program(WORD, Excel etc) Users The user view:Ease of operation, speed, convenience, Very less importance to resource utilization(like single user). Performance. In case of a multiple user system, resource sharing or resource utilization is very important.
6
Operating System User1 User2 User3 Application Program
Computer Hardware
7
System view: the os is a program that directly communicates with the software.
It can be viewed as a resource allocator. CPU time, memory space, file storage space, I/O devices. Why do we need a resource allocator? Resource sharing conflict.
8
The OS have different structures
The OS have different structures. The reason is they are designed to cater the requirements of different applications running on different devices. Ex: The requirement for a mobile os is different as compared to a server os or a laptop os. These are general purpose os. The requirements of an os running on a advanced aircraft is very different from a laptop os. (Real-time operating systems). But these os have some commonality. Job-scheduling or CPU-scheduling is a common point in all os. In a multi-programming environment many programs are executing simultaneously. The os allocates the cpu to the process which is waiting in the job-pool.
9
Functions of OS Process management:
Scheduling Processes and Threads on one or more CPU. Creating and deleting user and system processes. Suspending and resuming processes. Providing mechanism for process synchronization. Providing mechanism for process communication.
10
Functions of OS Memory management:
Which parts of the memory are currently being used and by whom. Deciding which process or data to be moved out of the memory. Allocating and de-allocating memory space as needed by application programs.
11
Functions of OS Storage management: Creating and deleting files
Creating and deleting directories to organize files. Manipulation of files on directories Mapping files onto secondary storage Back-up of files on storage media
12
OS services To provide an environment(services) for the execution of programs. There are some services which are common to all os User Interface CLI(Command Line Interface) BI(Batch Interface) GUI(graphical User Interface)
13
OS services Program Execution: The system must be able to load and run a program. The program execution should stop normally or abnormally(indicating an error). I/O operations: A running program may require I/O operation. Taking input from the user in the form of keyboard interface is a common ex. File system manipulation: The os must be able to support file read/write/save/delete operations through the user program.
14
OS services Communication: The os should be able to support communication between two process either on the same machine or two different machines. These machines are connected via a computer network. Error detection: The os needs to be aware of possible errors. The sources of errors may be from memory, I/O devices, network, user programs etc. For each error the os should take appropriate action to ensure correct and consistent computing results.
15
OS services Resource allocation: The os manages various resources used by tasks running concurrently. The os implements a request and release code. Accounting: The os needs to keep a track of used and available resources. The os does not allocate resources in case of a possibility of a deadlock . The os should also ensure that the system profile and user information is safe and secure.
16
System Calls System calls are an interface to the services made available by an operating system. These calls are generally available as routines in C and C++.This level of detail is not available to the programmer. Most programmers use API(Application Program Interface). The API invokes the system call for the programmer.
17
System Calls Ex: The CreateProcess(), actually calls the NTCreateProcess() in Windows Kernel. Use of API to invoke system calls makes the application portable. Ex: fopen(),fclose(), fread(), fwrite()
18
System Calls Types of System Calls: Process control end, abort
Load, execute Create process, terminate process Wait for time, wait event, signal event Allocate, free memory
19
System Calls File manipulation Create file, delete file Open, close
Read, write and reposition get file attributes, set file attributes
20
System Calls Device management request device, release event
Read, write, reposition Get device attributes, set device attributes Information maintenance Get time or date, set time or date Get system data, set system data Get device, process , file attributes
21
System Calls Communication: Create, delete connection
Send, receive messages Transfer status information Attach or detach remote devices
22
OS Structure Simple structure:
Small, simple and limited systems(Ex:MS-DOS) MS-DOS structure
23
resident system program ROM BIOS Device drivers
MS-DOS structure application program resident system program MS-DOS device drivers ROM BIOS Device drivers
24
The MS-DOS is not functionally well defined, since application programs can directly access the BIOS routines. MS-DOS is prone to errant operation and system crash. On the other hand UNIX OS has a well defined structure. This monolithic structure was very difficult to develop and maintain.
25
Layered approach: With advancement in hardware, os can be broken into pieces. This increases the os control over the application programs. The layered approach makes the system modular. Each layer is implemented with only those operations provided by lower level layers. Each layer hides the existence of data structures, operations and operations from higher level layers.
26
Micro kernels What are micro-kernels?
As UNIX expanded the kernel became large and it became difficult to manage. In a micro-kernel all non-essential features are removed from the os and implemented at system or user level. They provide minimal process and memory management. The kernel implements communication between the client program and services in user space using message passing.
27
Micro-kernel The advantage of a micro-kernel is that any new service required can be added to the user space. Very little or no modification to the original kernel. The resulting os is portable from one hardware to other.
28
System Boot The OS is generally present/distributed in a CDROM or DVD or as an ISO image. To generate a system a special program called SYSGEN is used. This SYSGEN reads certain devices or resources such as memory, devices, CPU. The operating system is then compiled. This phase is known as OS generation.
29
After the OS is generated, it must be made available for use by the hardware.
How does the hardware know where the kernel is or how to load the kernel? The procedure of starting a computer by loading the kernel is known as booting. The kernel is located by a small piece of code known as bootstrap loader. This program loads the kernel into RAM and starts its execution. The bootstrap program can perform different tasks.
30
Run diagnostics to get the state of the machine.
If the diagnostics pass then booting will continue. The OS is then started by the bootstrap loader. The bootstrap loader is present as the firmware and is loaded and executed by hardware.
31
M
32
M
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.