You are on page 1of 6

Operating Systems Course

Section 1: Lectures
Text Book: Operating Systems 7
th
Edition William Stallings
Whats OS?!
- OS is the master control software that runs other programs.
- Its main part, the "kernel," resides in memory at all times.
- Its the interface !etween the computer de"ices #$%W& and the user applications
#S%W&.
OS Main Job:
- Is to sol"e the competition !etween applications on the computer main resources
#'(), *emory and Shared +e"ices&.
Operating System
Sol"e competition on
Operating System
Sol"e competition on
'()
'$.,
'()
'$.,
*emory
'$.7, -
*emory
'$.7, -
Shared
.esources
'$./, 0
Shared
.esources
'$./, 0
Section 2: Labs
In the la!s, we will address two out of the three competitions, namely1
1- Memory 7 weeks
2- Share !eso"r#es 2 weeks
'oncerning the competition on memory, we will b"i$ our memory management
system as a part of real OS to manage the memory using % $ang"age "ner &in"x.
3or the competition on the resources, we will "se the multi4threading and concurrency
in the '()T *rame+ork to learn how to handle the competition on any shared
resources.
,art -: Memory management .in 3OS kerne$/
&ang"age: ' under 5inu6
0 $abs:
5a! 71 Intro. 8 running empty operating system
5a! 91 kernel part 1, na"igating kernel source code, e6tending shell commands
5a! 21 kernel part 2, #adding ad"anced commands&
5a! :1 Sheet 7 #'() scheduling pro!lems& ; Introduction to Intel memory
segmentation and paging
5a! /1 Implementing memory management code part 1
)1T!2: Sheet II, III #memory management, and "irtual memory pro!lems&
5a! 01 Implementing memory management code part 2
5a! 71 Implementing memory management code part 3 #$ands on la!&
O"tp"t: *emory management pro<ect.
,art --: %on#"rren#y an threaing .'()T 4rame+ork 1'152'6/
&ang"age: 2ny .=E> framework 7.7%9.? language
3 $abs:
5a! -1 (ro<ect description, #(roducer%'onsumer using .=E> framework&
5a! ,1 @ar!ershop%Airplane pro!lem implementation
5a! 7?1 Barious pro!lems
O"tp"t: 5a! E6am
&abs
Address competitions
on
&abs
Address competitions
on
*emory
7 weeks
*emory
7 weeks
Shared .esources
2 weeks
Shared .esources
2 weeks
Intro 8 En"ironment
7 week
Intro 8 En"ironment
7 week
Cernel code
9 weeks
Cernel code
9 weeks
*emory *anagement
'ode
: weeks
*emory *anagement
'ode
: weeks
Intro 8 (rod%'ons
(ro!lem
7 week
Intro 8 (rod%'ons
(ro!lem
7 week
@ar!ershop%Airplane
(ro!.
7 week
@ar!ershop%Airplane
(ro!.
7 week
Barious (ro!lems
7 weeks
Barious (ro!lems
7 weeks
Lab 1
Introduction & Environment
Introduction
-/ Memory Management:
>he pro<ect for these la!s is to construct a real operating system that will !oot on a ('.
>his operating system is simpler than 5inu6 or Windows D(, !ut it includes some key
operating systems a!stractions including a !oot loader, memory management, and "irtual
memory.
>he pro<ect is di"ided into a series of la!s, each of which enhances the functionality of
your operating system. Each la! !uilds on the pre"ious one, so it is important that you
design, !uild, and test carefully at each step. 'arelessness in early la!s will !e costly
down the road. >here are not a lot of lines of code to write on this pro<ect, so take the time
to understand ea#h phase !efore mo"ing to the ne6t one.
We will pro"ide skeleton code, !ut most you will ha"e to do all the important work.
--/ %on#"rren#y an Threaing:
Eou will write multi4threaded applications using .=E> framework for pro!lems that deal
with concurrency issues like dependency, deadlocks and critical sections using
semaphores.
Environments (VMware & Linux)
We are de"eloping an operating systemFF So, how would we test itGFF
We will use a set of applications called HBirtual *achinesI or emulatorsJ these are
applications that pro"ide a HBirtual En"ironmentI for us, so that one can define a whole
"irtual (' #*emory, peripherals #$ard disks, optical dri"es&, '(), @IOS, floppy etcK&
inside the real ('.
We first ha"e the HBo#hs em"$ator I, in which we will run and test our simple OS 3OS.
>he OS code #originally taken from UTexas CS372& is written in ' language under 5inu6
So we will install 5inu6 on our machinesK
$owe"er, this could !e an annoying e6perience to many students, #e.g. no disk space, no
free partitions etcK&, so what could we do to simplify thisKGFF
We will pro"ide the students a '+, which has 5inu6 preinstalled, and will run "irtually
inside windows D( en"ironment. It will run "irtually using a free product called H7M+are
,$ayerI. See the diagram !elow1


Hard
Disk
&in"x -mage 4rom %8
&in"x
.*OS/ O"r OS
*%-S OS



Bo#hs
.Emulator/
Wino+s 1, &in"x *%-S OS
7M+are ,$ayer
.Birtual *achine/
9o+ to r"n the :irt"a$ &in"x image insie yo"r +ino+s 1,:
1- Install B*ware workstation pro"ided on the OS 'ourse '+
2- 'opy the archi"e file containing the 5inu6 image named Hos_virtual_machine.zipI
from your '+ dri"e to your disk
3- )nLip the archi"e # H.zipI file&
;- +ou!le click the file named Hos_virtual_machine.vmxI to start 5inu6
<- When 5inu6 starts, login using this username and password1
)sername1 os
(assword1 os
)n:ironment .Bo#hs = *OS o"r OS/
+e"eloping an operating system on real hardware can !e difficult and time4consuming.
Instead weMll !e use a freely a"aila!le (' emulator called Bo#hs. >he operating system
youMll de"elop is in some sense <ust a toy operating system, !ut it will !e "real" enough to
run on actual (' hardware. WeMre <ust using @ochs to make de"elopment easy.
9o+ to boot Bo#hs +ith o"r operating system *OS:
1- +ou!le click the 3OSN9??- shortcut on your desktop
2- Open the 5inu6 terminal !y pressing 3:
3- Write the following1
O cd part1 Jget into la!7 directory
O make Jcompile and link the code
O bochs Jrun @ochs emulator
;- then choose / #@egin simulation&
When @ochs first starts, you will see the "ery first "ersion of our 3OS running, you can
write1
3OSO kernel_info
>his will show you some information a!out the OS.
Boot $oaer .re:ision/:
=ow, we will re"ise the (' !oot process studied pre"iously in assem!ly language course.
>he !oot process documentation
>he !oot process slideshow
As it shown pre"iously, 9 main parts are rePuired for loading any OS1
1- !oot loader1 switch from real to protected mode and load the kernel into .A*
2- kernel
>he kerne$ is the central component of most computer operating systems. Its
responsi!ilities include managing the systemMs resources and the communication !etween
hardware and software components.
A kernel pro"ides the lowest4le"el a!straction layer for the resources #especially memory,
processors and I%O de"ices& that applications must control to perform their function.
>erne$ typically makes these facilities a"aila!le to application processes through inter4
process communication mechanisms and system calls.

The &ab %oe Str"#t"re:
It consists of 9 main parts1
1- HbootI folder1 containing the assem!ly code of the !oot loader in Hboot.sI file
2- HkernI folder1 containing the ' code of !oth the shell and the empty kernel
>his is it for the first la!, see you soonK
References
MIT OCW OS Course lab 6828
UTexas OS Course lab CS372H (lab1 & lab2).

You might also like