hard copy sql

Post on 07-Apr-2016

25 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

sql

TRANSCRIPT

Bhavesh Khomne(250)

TOPICS

1. INTRODUCTION2. SYSTEM CALLS3. INSTALLATION PROCESS4. PROCESS MANAGEMENT5. MEMORY MANAGEMENT6. BOOTING PROCESS7. COMPATIBLE PROCESSORS8. HARDWARE CONFIGURATION

Introduction:• Windows 98 Memphis is a graphical operating

system by Microsoft.• It is a hybrid 16-bit/32-bit monolithic product with an MS-

DOS based boot loader.• Development of Windows 98:

Memphis: Windows Memphis Alpha: Windows Memphis beta: Windows 98 Beta: Windows 98 Release Candidate: Windows98: Windows98 SE

What is System Calls ?

•Programming interface to the services provided by the OS

•Typically written in a high-level language (C or C++)

•Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call use

•Three most common APIs are Win32 API for Windows.

•Example of System Calls:

•System call sequence to copy the contents of one file to another file.

Types of System CallsProcess Control:Create process(aplname,currentdirectory)Exit process(exitcode)Wait for single object(handle,millisec)

File Manipulation: Create file(filename, mode) Read file(file, no of bytes) Write file(file, no of bytes)

Device Manipulation:Set Console Mode(mode, console handle)Read Console(reserved, no of characters to write)Write Console(reserved, no of characters to read)

Cont. Types of System CallsInformation Maintenance:Set Timer(elapse)Sleep(millisec)

Communication: Create Pipe( read, write, size)

Create File Mapping( name, max size high)

Protection:Set file Security()Initialize File Security Descriptor(security descriptor)

Installation Process

What do we need ?

1) Windows 98 CD 2) Windows 98 Product ID/Key 3) About 1-2 Hours

What Is A Process & Process management?

•A process is a sequential program in execution.•Consists of: executable code, data, stack, CPU registers , and other information.•The act of managing the use of the CPU by individual processes is called process management.•The life of a process is bounded by its creation and termination. •The steps in process management.

•Process creation and termination.•Process scheduling & its algorithms.•Inter Process Communication

Process creation•When a new process is to be added to those that are currently being managed by the operating system, the operating system builds the data structures that are used to manage the process and allocates the address space to be used by the process . These actions constitute the creation of a new process. •The common events that lead to the creation of a process.

• New batch job• Interactive logon• Created by OS to provide a service

•In windows98 the process is created using create process() Win32 API.

Termination of a Process•The ending or exiting the process created is called as process termination.•The various ways for terminating a process.

•Normal task completion•Memory unavailable•Time limit exceeded•I/O failure•Parent termination•Parent request

•In windows98 the process is created using create process() Win32 API.

Scheduling CriteriaCPU utilization – keep the CPU as busy as possible

Throughput – # of processes that complete their execution per time unit

Turnaround time – amount of time to execute a particular process

Waiting time – amount of time a process has been waiting in the ready queue

Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)

Scheduling Algorithm

•First-Come, First-Served (FCFS) Scheduling.•Shortest-Job-First (SJF) Scheduling.•Priority Scheduling.•Round Robin

First-come, First Served

·( FCFS) same as FIFO·Simple, fair, but poor performance. ·Average queuing time may be long.·What are the average queuing and residence

times for this scenario?·How do average queuing and residence times

depend on ordering of these processes in the queue?

Example of FCFS:

Process Burst TimeP1 24P2 3P3 3 Assume processes arrive as: P1 , P2 , P3

The Gantt Chart for the schedule is:

Waiting time for P1 = 0; P2 = 24; P3 = 27Average waiting time: (0 + 24 + 27)/3 = 17

P1 P2 P3

24 27 300

Shortest Job First•Process declares its CPU burst length•Two schemes:

•non-preemptive – once CPU assigned, process not preempted until its CPU burst completes.•Preemptive – if a new process with CPU burst less than remaining time of current, preempt. Shortest-Remaining-Time-First (SRTF).

•SJF is optimal – gives minimum average waiting time for a given set of processes.

Example of Non-Preemptive SJF

Example of Preemptive SJF(Shortest-remaining-time-first)

Process Arrival Time Burst TimeP1 0.0 7 P2 2.0 4 P3 4.0 1 P4 5.0 4

• SJF (pre-emptive, varied arrival times)

• Average waiting time = ( [(0 – 0) + (11 - 2)] + [(2 – 2) + (5 – 4)] + (4 - 4) + (7 – 5) )/4

= 9 + 1 + 0 + 2)/4 = 3

• Average turn-around time = (16 + 7 + 5 + 11)/4 = 9.75

P1 P3P2

42 110

P4

5 7

P2 P1

16

Priority Scheduling•Priority associated with each process•CPU allocated to process with highest priority

Preemptive or non-preemptiveExample - SJF: priority scheduling where priority is predicted next CPU burst time.

•Problem: Starvation low priority processes may never execute.

•Solution: Agingas time progresses increase the priority of the process.

Round Robin (RR)Process Burst TimeP1 53 P2 17 P3 68 P4 24

• The Gantt chart is:

• Typically, higher average turnaround than SJF, but better response time• Average waiting time

= ( [(0 – 0) + (77 - 20) + (121 – 97)] + (20 – 0) + [(37 – 0) + (97 - 57) + (134 – 117)] + [(57 – 0) + (117 – 77)] ) / 4 = (0 + 57 + 24) + 20 + (37 + 40 + 17) + (57 + 40) ) / 4 = (81 + 20 + 94 + 97)/4= 292 / 4 = 73

• Average turn-around time = 134 + 37 + 162 + 121) / 4 = 113.5

P1 P2 P3 P4 P1 P3 P4 P1 P3 P3

0 20 37 57 77 97 117 121 134 154 162

Inter Process communication (IPC)

•Inter-Process Communication, which in short is known as IPC, deals mainly with the techniques and mechanisms that facilitate communication between processes.•Windows 98 includes the following inter process communication (IPC) mechanisms to support distributed computing: 1. Windows Sockets2. Remote Procedure Calls (RPCs)3. NetBIOS4. Named pipes5. Mail slots

Windows Sockets•WinSock provides very high level networking capabilities.• It supports TCP/IP (the most widely used protocol), along with many other protocols – AppleTalk, DEC Net, IPX/SPX etc.•WinSock supports Berkeley sockets, along with many other Windows specific extensions.•There are two version that are supported i.e. 1.1 & 2.0•Following are some of the Win32 APIs that are used when working with WinSocket•socket()•bind()•listen()•accept()•connect()•send()•recv()

VMM(Virtual Memory Manager)

1. Windows 98's Virtual Memory Manager (VMM) controls allocating physical and logical memory.

2. When you launch a new application, the Virtual Memory Manager initializes the virtual address space.

3. Windows 98's Virtual Memory Manager provides this large, virtual memory space to applications via two memory management processes: paging, or moving data between physical RAM and the hard disk, and translating physical memory addresses to virtual memory addresses or mapped file I/O.

When does Page faults occurs?

When an application accesses a virtual address in a page marked invalid, the processor uses a system trap called a page fault.

The virtual memory system locates the required page on disk and loads it into a free page frame in physical memory.

When the amount of available page frames runs short, the virtual memory system selects page frames to free and pages their

contents out to disk. Paging occurs transparently for the user and the program or

application.

What is Paging?Paging is an important part of virtual memory implementation in most contemporary general-purpose operating systems, allowing them to use disk storage for data that does not fit into physical random-access memory (RAM).

Random Page Replacement

The characteristics are:Choose a page at randomLow overheadMay replace the page likely to be referenced almost immediatelyRarely used

First-In-First-Out (FIFO)

The page that has been in the main memory for the longest period of time is replacedIn general, if more page frames are allocated to a process, the fewer page faults the process will experienceIn FIFO, it was observed that under certain page reference patterns, actually more page faults occur

Least Recently Used (LRU)

The page not referenced for the longest period of time is removed. (Microsoft Windows 3.1/95/98/NT use this.)A near to optimal algorithmMost algorithm used is either LRU or its variantImplementation•Each page table entry has a counter•whenever a page is referenced, copy the clock into the counter•when a page needs to be replaced, search for a page with the smallest counter value•This is expensive•Stack•keep a stack of page numbers in a double link form•when a page is referenced, move it to the top•the page number at the bottom of the stack indicates the page to be replaced

Optimal page replacement

1. Page fault occurs2. Scan all pages currently in memory3. Determine which page won’t be

needed (referenced) until furthest in the future

4. Replace that pageNot really possible. (But useful as a

benchmark.)Depends on code as well as data.

Not-Used-Recently (NUR)It is an approximation to LRU.Pages not used recently are not likely to be used in the near futureimplemented with 2 hardware bits/page .Bit Value DescriptionReference bit 0 Not reference 1 ReferencedModified bit 0 Not modified 1 ModifiedWhen a page is referenced,set reference bit to 1All reference bits are reset to 0 periodicallyPages are replaced according to the following order1) Unreferenced, Unmodified2) Unreferenced, Modified3) Referenced, Unmodified4) Referenced, Modified

Least Frequently Used

• Page recently used is likely to be used in the near future; page not used in ages is not likely to be used in the near future.

• Algorithm:– “age” the pages

• Maintain a queue of pages in memory.– Recently used at front; oldest at rear.

• Every time a page is referenced, it is removed from the queue and placed at the front of the queue.

• This is slow!

Why is Booting Required ?Hardware doesn’t know where the operating system

resides and how to load it.Need a special program to do this job – Bootstrap

loader. E.g. BIOS – Basic Input Output System.

Bootstrap loader locates the kernel, loads it into main memory and starts its execution.

How Boot process occurs ?

Reset event on CPU (power up, reboot) causes instruction register to be loaded with a predefined memory location. It contains a jump instruction that transfers execution to the location of Bootstrap program. BIOS Interaction:

Booting Process for USB driveRequirements: 1 USB Flash Drive An original copy of Windows 98 SE.

• Steps for process of booting: 1.Download HP USB Disk Storage Format Tool HERE

2.Install HP USB Disk Storage Format Tool and run it3.Insert your USB Flash Drive4.Begin the format process.

5.Browse and locate the “win98boot” folder. 6.Insert your w98 CD. Copy the whole CD to your 2nd flash drive 7.AS copy process will take time till then restart your PC\Laptop. 8.A screen saying "WINDOWS 98" will quickly appear and then disappear. 9.Now your on the command prompt, type "D:" then type "setup /c /it /p a;b" *without quotations. 10.Follow the instructions. 11.The process have successfully booted.

Compatible Processors

Processor Advantages Disadvantages Bottom LinePentium III Fast, scalable. Expensive. The right

choice for performance oriented users skittish about AMD.

Intel Celeron Affordable; fast enough.

No SSE (yet). A good bet for all but the most power-hungry users.

AMD Athlon Faster, cheaper than the Pentium III.

Not all SSE instructions supported; no dual-processor support yet;

A real alternative--if AMD can keep its act together.

Cyrix M II Affordable; adequate for low-end machines.

Sale of the company may make PC makers wary.

Worth considering for a budget-priced home machine.

Hardware Configuration

•A personal computer with a 486DX 66 megahertz (MHz) or faster processor (Pentium central processing unit recommended).•16 megabytes (MB) of memory (24 MB recommended).•One 3.5-inch high-density floppy disk drive.•VGA or higher resolution (16-bit or 24-bit color SVGA recommended).•MSN, The Microsoft Network, Windows Messaging, or Internet access require a 14.4 bits per second (bps) modem (28.8 or faster recommended).Optional components:•Network adapter•DVD-ROM drive and decoder adapter•Second monitor and second video adapter•ATI All-in-Wonder graphics card

top related